-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Information for localizers
You may encounter encoded entities (tags). For example, <b>test</b>
is the encoding of <b>test</b>
. Note, that encoded entities start with an ampersand and end with a semicolon. There are no spaces in between any of that. Sometimes, you may encounter incorrectly double-escaped encodings like &lt;
(instead of <
). Please, leave those as they are.
Sometimes strings have variables (placeholders) which look like the pictures below.
or |
In these cases you should:
- Use your mouse and click on the placeholder to insert it into the cursor position of your translation. You do not need to modify anything within the placeholder.
- The text inside the
ex
tags of the placeholder is an example for you, the translator, of values that would be used in this placeholder. - When placeholders contain URLs, you may receive a warning from Transifex about a missing URL:
You can ignore such warnings. - If you do not use Transifex edit for translating, please, see the Manual handling of placeholders section below.
Sometimes you may encounter other types of placeholders such as double square or double squiggly brackets. Do not translate terms inside these placeholders (for example, [[user]]
or {{user}}
should be left as is).
Sometimes strings support single/plural versions. Such strings support ICU plural rules and look similar to this:
{COUNT, plural, =0 {Open all in &private window} =1 {Open in &private window} other {Open all ({COUNT}) in &private window}} |
If you see ’
in the text, that is an encoded apostrophe(’
). For example, you’re
is just you're
in which case you don't need to preserve this encoded sequence in the translation.
Other common codes:
-
–
- en dash(–
) -
—
- em dash(—
) -
‘
- opening single quote(‘
) -
…
- ellipsis(…
) -
Note: standalone
&
(or&amp;
),<
(or&lt;
), or>
(or&gt;
), if needed in the localized string, should be left as they are. For example,Bob & Jim
, orSystem > Settings
should stay that way.
In branded feature names, such as "Brave", "Brave Rewards", and "Brave Ads", do not translate Brave, but do translate the feature name ("Rewards", "Ads", etc.).
If you are translating strings containing placeholders outside the Transifex editor the source string would look similar to this:
When translating:
- Use
<ph
to replace<ph
- Leave
name="EXTENSION_NAME"
part as is, then - Use
>
to replace>
- Leave
$1
($2
, etc.) as is - If present, replace
<ex>
with<ex>
and</ex>
with</ex>
- Replace
</ph>
with</ph>
- DO NOT replace
<
and>
when they surround other elements, such asa
(<a...
and<a/>
should not be modified).
The text inside the resulting <ex>...</ex>
tags doesn't need to be translated - it's an example for you, the translator, of values that would be used in this variable.
In the example in the graphic above, the translation should look like this:
Source: | <ph name="EXTENSION_NAME">$1</ph> (extension ID "<ph name="EXTENSION_ID">$2<ex<abacabadabacabaeabacabadabacabaf</ex<</ph>") is not allowed in Brave. |
Translation: | <ph name="EXTENSION_NAME">$1</ph> (translate this "<ph name="EXTENSION_ID">$2<ex>do not translate this</ex></ph>") translate this too. |
As noted above, you may encounter other encoded tags inside the <ph>
tags: for example, <ph name="BEGIN_BOLD1">&lt;b1&gt;</ph>
. These encoded tags inside <ph>
tags should be left as they are, in this case resulting in:
Source: | <ph name="BEGIN_BOLD1">&lt;b1&gt;</ph> |
Translation: | <ph name="BEGIN_BOLD1">&lt;b1&gt;</ph> |