Understanding Segments

A segment is a piece of text extracted from a linguistic file. It is sometimes called a “String”.

Segment Statuses

With WebTranslateIt segments have statuses. The segment status is displayed by an indicator to its right.

Right border Segment Status
Plain Green Proofread (segment translated and reviewed)
Dotted Orange Not Proofread (segment translated but not reviewed)
Dotted Red Not Translated
Double Yellow To Verify (segments translated, but then the source text was changed after that. Or, segment translated by machine translation)
Solid Grey Hidden (segment hidden by a manager)
Dotted Grey Obsolete (Segment not found in the master file during last sync)

A Segment in the Translation Interface

Let’s consider this project.

The first segment has a yellow background and its left border is blue. It means this segment is selected. Now, use the Down () key or click on the segment below. It moves just like on a spreadsheet tool. Now the segment below is selected.

Selected segments have special features and are receptive to keyboard shortcuts. Press the H key in the translation interface to learn more about it.

Press Enter or click on the translation pencil. Now that segment is open and accepts translations.

Segment’s Anatomy

A segment is composed of 6 elements:

  1. A key
  2. An option button
  3. A discussions button
  4. A proofreading button
  5. The source text
  6. The target text

Key

The key is the unique identifier of a segment if your language file supports this. If it doesn’t then it is a generated hash of the source text. Clicking on the key links to the Segment Details page, where you can view the translation history and comments.

Option button

Click on the options button to see more actions for this segment:

  • Copy source to target: Copy the source text to the target text. Useful if the source text contains lots of code.
  • Segment history: Open the history page for that segment.
  • View in all languages (manager and observers only): lets you see the segment for all different languages.
  • Show details: View details on that segment (labels, categories, word count, write developer comments and upload screenshots…)
  • Add a label (manage only): To quickly add a label to that segment.
  • Hide Segment (manager only): Move the segment to the “Hidden” category
  • Obsolete Segment (manager only): Move the segment to the “Obsolete” category
  • Flag translation as to verify (manager only): Move the segment to the “To Verify” category
  • Delete Segment (manager only): Delete this segment.

Discussions button

Click on the comments button to toggle a comment box.

Proofread/Unproofread button

Click on the proofread button to mark the segment as proofread. Click it again to mark the segment as unproofread. For more information about segment statuses, check Segment Statuses

Target text

Hover the target text. The cursor transforms into edit mode and the area highlights in darker grey.

Click on it to open the segment.

  1. Translation area: Write here the translation for the source text. This area auto-expands if you need more space.
  2. Save button: Click to save the translation.
  3. Save and next button: Saves the current translation, then jumps to the next translation.
  4. Skip validation button: Allows translators to save a translation even though the validation checks failed.
  5. Cancel: Close the opened segment
  6. Suggestions from the TermBase: You get such suggestions if one word in the text matches a term defined in your project term base. Click on a term to paste it the translation area.
  7. Suggestions from Translation Memory. Click on a suggestion to paste it in the translation area.

Plural Segments

You will sometimes notice segments like this one.

These segments are plural segments. Some language file formats (such as Gettext .po and Ruby .yml) offer advanced support for plural segments.

What is a plural segment?

Some language file formats interpolate a variable that is used to pick a pluralization from the translations according to the pluralization rules defined by CLDR.

Let’s start with English. In English there are only one singular and one plural form for a given segment. It’s easy to understand. Let’s have a look at this YAML plural segment:

plural_example:
  one: "%{count} message"
  other: "%{count} messages"

This allows a web application to display a segment differently depending on the plurality of the variable %{count}.

It will display for instance:

0 messages # uses rule “other” if %{count} == 0
1 message  # uses rule “one” if %{count} == 1
2 messages # uses rule “other” if %{count} == 2
1234 messages # uses rule “other” if %{count} == 1234

Other languages (Arabic, Japanese, Russian, Chinese and many more) have different grammars that have additional or fewer plural forms.

WebTranslateIt knows about the language’s plural rules and display the right amount and text boxes accordingly.

In Russian, plural rules are more complicated:

ru:
  less_than_x_minutes:
    one: "меньше %{count} минут"
    few: "меньше %{count} минут"
    many: "меньше %{count} минуты"
    other: "меньше %{count} минуты"

There are 4 plural rules, therefore WebTranslateIt’s interface displays 4 translation boxes.

In Chinese or Thai, there are no plural rules:

zh:
  less_than_x_minutes:
    other: "不到 %{count} 分钟"

Therefore WebTranslateIt’s interface displays only 1 translation box.

If you’re using Ruby on Rails with languages having complex plural rules, please check plural rules gotchas

Characters Limit

Managers can set a limit for the maximum characters allowed for a translations. This limit can be set under the Segment Details modal window.

Translators can indentify segments having a translation length limit by looking for a specific badge:

If a translator’s text length is close to the segment limit the character counter will turn orange while typing.

If the translator’s text length exceeds the segment limit the character counter turns red, and will raise a validation error when trying to save the translation.

In order to save the segment, the translator should try to reduce the translation length, or bypass the validation error by clicking on the “Skip Validation” button.