#7698 [Translation] not entire sentences
Opened 5 years ago by slev. Modified 5 years ago

Unfortunately, there are many "concatenated" translations In FreeIPA WebUI.
For instance JS code,

    that.create_add_dialog = function() {                                       

        var entity_label = that.entity.metadata.label_singular;                 
        var pkey = that.facet.get_pkey();                                       
        var other_entity_label = that.other_entity.metadata.label;              

        var title = that.add_title;                                             
        title = title.replace('${entity}', entity_label);                       
        title = title.replace('${primary_key}', pkey);                          
        title = title.replace('${other_entity}', other_entity_label)

where 'title' is:

"Add ${other_entity} Managing ${entity} ${primary_key}"

So, in English text looks good.
But ... in, for example, Russian it looks strange :)
A screenshot is attached.

Concerning to string's preparation:
https://www.gnu.org/software/gettext/manual/gettext.html#Preparing-Strings

Entire sentences are also important because in many languages, the declination of some word in a sentence depends on the gender or the number (singular/plural) of another part of the sentence. There are usually more interdependencies between words than in English. The consequence is that asking a translator to translate two half-sentences and then combining these two half-sentences through dumb string concatenation will not work, for many languages, even though it would work for English. That’s why translators need to handle entire sentences.

So, a text is being translated should not consists of more than one translatable piece of a text.

A list of affected:

  • title of all popup dialogs
    • add dialog
    • remove dialog

A List will be continued.

Plan to improve: replace all affected concatenated strings with entire ones.

This issue will be split into several ones to easily track and prepare PRs:
https://pagure.io/freeipa/issue/7699
https://pagure.io/freeipa/issue/7702
https://pagure.io/freeipa/issue/7704
https://pagure.io/freeipa/issue/7707
https://pagure.io/freeipa/issue/7712


Login to comment on this ticket.

Metadata
Attachments 1