Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Vanilla 2.6 is here! It includes security fixes and requires PHP 7.0. We have therefore ALSO released Vanilla 2.5.2 with security patches if you are still on PHP 5.6 to give you additional time to upgrade.

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 ?

Need a custom plugin? Contact me via vanilla private messages | Explore my GitHub repository | See my latest vanilla plugins

Comments

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

    @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

    Need a custom plugin? Contact me via vanilla private messages | Explore my GitHub repository | See my latest vanilla plugins

  • 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?

    Need a custom plugin? Contact me via vanilla private messages | Explore my GitHub repository | See my latest vanilla plugins

Sign In or Register to comment.