HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Different (grammar) article for different nouns

lifeisfoolifeisfoo Zombie plugins finder ✭✭✭

In some files, inside Vanilla source code, generics quantificator or common phrases are (re)used for localization, e.g.: 'All %s', '%s not found'.

Here is my translation strings:

$Definition['All %s'] = 'Tutti i %s';
$Definition['messages'] = 'messaggi';
$Definition['notifications'] = 'avvisi';

But a correct translation is (see the articles):

"All messages" = "Tutti i messaggi"
"All notifications" = "Tutti gli avvisi" 

Is there a (clean) way to handle these translations ?

There was an error rendering this rich post.

Answers

  • whu606whu606 I'm not a SuperHero; I just like wearing tights... MVP

    @lifeisfoo

    Have you checked the existing Italian locales to see how they handle this?

    Is there a reason not to put the articles with the nouns, e.g. 'i messagi'?

  • lifeisfoolifeisfoo Zombie plugins finder ✭✭✭

    These strings aren't present in the current transifex version.

    If I translate "messages" with "i messaggi", when "messages" is used in another context the translation will be corrupted.

    Here's a example:

    sprintf(T('You do not have any %s yet.'), T('messages'));
    

    Here "messages" should be translated as "messaggio" (like the singular form!):

    'You do not have any messages yet.'  = 'Non hai ancora nessun messaggio.'
    

    P.s.
    My reference is VF >=2.1

    There was an error rendering this rich post.

  • businessdadbusinessdad Stealth contributor MVP

    I dealt with multilingual applications very often, in my career. Our dear language, Italian, has many complex rules that don't "map" easily to other languages.

    At the time, the solution we adopted was to write entirely different sentences, instead of composing them with sprintf. The issue, in this case, is that the same key phrase is used in multiple places, therefore I don't see an easy way to achieve the desired result without touching some Core files. I may be mistaken, though.

  • lifeisfoolifeisfoo Zombie plugins finder ✭✭✭

    I totally agree with you @businessdad: the most simple solution is to write many sencences. Obviously a developer think in a pragmatic way: why should I add another string when I can use a generic one (see "All %s")? Moreover, if my native language "fit" perfectly in this system, I could not even imagine that with a foreign language this could be a problem.

    @Todd,@Lincoln Can you, main core developers, try to use only fixed strings to avoid these problems in vanilla localization? Or vanilla solves these problems in another way we don't know?

    There was an error rendering this rich post.

Sign In or Register to comment.