How to use HTML entities in translations in Transifex?


(Anton) #1

Issue

For correct translation in Russian, I sometimes need to use html entities. Is it allowed and how do I do it the right way?

Example

Key: js.number.short.thousands
Original English text: {{number}}k

Preferred Russian translation: {{number}} тыс.

Alternative Russian translation #1: {{number}} тыс. - space is used instead, but it does not look good and allows for wrapping; half-space looks much more natural. The first impression says “it’s written incorrectly”.

Alternative Russian translation #2: {{number}}тыс. - no space is used, looks really bad.


(Sam Saffron) #2

we need to ensure we treat it as safe html, we need a code change to support this properly.


(Anton) #3

Please push a note in this thread when there is such an update, and I’ll update the translations accordingly. Thanks!


(Anton) #4

For records: another key in Russian to use html entity:
js.number.format.delimiter should be set to  


(Kane York) #5

It’s possible that typing it in directly will do the right thing - have you tried that yet?


(Anton) #6

What exactly are you proposing?

A. Type in html entity in Transifex.
or
B. Copy the UTF8-character and type it into the Transifex.

Even if “B” works, it will make it very confusing for those looking into transifex - e.g. seeing a half-space in the translation is confusing - someone would think there is no translation at all, and Transifex will show a notice too. Also, if used inside a string, a half-space might be overridden easily by a full space.

Re solution “A”, I have not even tried it because of this comment from @codinghorror :


(Mittineague) #7

I’ve found that different characters play better with certain text editors, databases, etc. when it comes to copy-paste bites. (or typing from a keyboard that has that character)

I imagine the process involves a few steps and so “string manipulation” happening somewhere seems more likely to occur, if it’s going to happen.

Would it be possible?.

eg. is there at least full UTF-8 support everywhere?
Or might there (forbid) be an ASCII or likewise bottle-neck somewhere?

EDIT
well that’s a limited range “GO!” as far as

Transifex uses the UTF-8 encoding for most of the formats it supports. That is, all files that are uploaded to Transifex or downloaded from it have to be encoded in UTF-8.

The UTF-8 encoding is not used only in cases the format specification says so, like in the case of JAVA .properties files, where the encoding used is ISO-8859-1, or Apple .strings files, where the encoding is UTF-16.