[4822] I18N issue with $txt['members']

Started by ke, August 23, 2011, 07:29:00 AM

Previous topic - Next topic

ke

From Themes/default/BoardIndex.template.php (version 2.0):

', $context['common_stats']['total_posts'], ' ', $txt['posts_made'], ' ', $txt['in'], ' ', $context['common_stats']['total_topics'], ' ', $txt['topics'], ' ', $txt['by'], ' ', $context['common_stats']['total_members'], ' ', $txt['members'], '. ', !empty($settings['show_latest_member']) ? $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br />

In German, $txt['members'] should read Mitgliedern here because the preposition von ($txt['by']) requires dative case. However, with many other occurrences of $txt['members'], the nominative form Mitglieder is required. A correct translation is not possible this way. Other languages probably have similar issues. To fix this, I propose that the above message get its own $txt entry, rather than composing it from many small strings.

Angelina Belle

The SMF developers and localization team will discuss this. Thanks for bringing it up.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Angelina Belle

In the example you give, would it also be proper to use dative form of the noun "topics" following the preposition "in"?   (English: "in 23 topics").  If not in German, then how about in other languages, like Slavic and Balkan languages, Hungarian, Armenian, and Greek? (as well as Latin and Sanskrit).

I have reported this as a feature for 2.1 -- to distinguish between nominative and dative case of nouns. It could be tough for English-speakers to remember to get this one right.
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

poolhall

Quote from: AngelinaBelle on August 29, 2011, 08:20:36 AM
I have reported this as a feature for 2.1 -- to distinguish between nominative and dative case of nouns. It could be tough for English-speakers to remember to get this one right.
there are 6 cases in Russian, even more in some other languages (14 in Estonian, I believe). There must be a more complex solution.

emanuele

#4
Could you list where these cases are so we can have a more comprehensive view of the problem?


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Dzonny

Serbian language has 7 cases. As i can see Finnish has 15 (info), and Russian 6 of them (info).
From what i think, the best would be to change those strings to merged ones, but i'm not sure about that completly because some languages which don't need to change nouns to different cases will have to translate strings on the same way, so we'll have the few exactly the same translated strings.
I'm about to test this and see what's the best to do. Feel free to post all your thoughts and suggestions about this.

poolhall

Quote from: emanuele on September 05, 2011, 08:15:39 AM
Could you list where these cases are so we can have a more comprehensive view of the problem?

okay, a few examples:









Case
Example word:     
topic
Example:     
January         
Example:     
author         
Example: 
permissions
Именительный (Nominative)  темаянварьавторправа доступа
Родительный (Genitive)  темыянваряавтораправ доступа
Дательный (Dative)темеянварюавторуправам доступа
Винительный (Accusative)темуянварьавтораправа доступа
Творительный (Instrumental)           темойянварёмавторомправами доступа
Предложный (Prepositional)темеянвареавтореправах доступа

Dzonny

Well, we don't need all of those cases. We would need just nominative and dative for "members" if i'm right?

poolhall

Quote from: Dzonny on September 05, 2011, 07:01:50 PM
Well, we don't need all of those cases. We would need just nominative and dative for "members" if i'm right?

In theory, it would be every possible case (not just nominative and dative) with every possible noun used in language strings. In reality it would be less, for example, in English it is just "1 reply" or "2 or more replies", in Russian it would be 21 ответ (nominative), 22 ответа (genitive singular), 25 ответов (genitive plural), so with numerals there would be 2 possible cases (but 3 noun variations).

Aleksi "Lex" Kilpinen

Quoting myself from the team boards
Quote
In Finnish:

by 27 members =  27 jäseneltä ( possibly jäsentä )

=> Currently used translation for "19 Posts in 3 Topics by 2 Members."   
=> "19 viestiä 3 aihetta kirjoittanut 2 jäsentä." 
=> Which would be "19 messages 3 topics written by 2 members" in english.

from X-number of members = Jäseneltä / Jäseniltä depending on context.
to members = Jäsenille
to 1 member = Jäsenelle

Literally "Many members" = Monia jäseniä / Monta jäsentä
One member = Yksi Jäsen
Two members = Kaksi Jäsentä

So in short - No, making extra strings for these does not sound like a viable option IMO. What would sound more doable, would be to allow some flexibility for translators to rewrite the whole sentence. ( For example, containing the whole thing in one language string with expressions to show the right data )

So - I agree with the OP. It should be made one big language string instead of a puzzle of many incompatible parts.
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

emanuele

Quote from: poolhall on September 05, 2011, 04:58:25 PM
Quote from: emanuele on September 05, 2011, 08:15:39 AM
Could you list where these cases are so we can have a more comprehensive view of the problem?

okay, a few examples:
[SNIP]
My question was more: can you point us to the places (the strings or the positions in the templates) in SMF where you know a string is misused because should be translated in two different ways for your language? Sorry for the misunderstanding.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Aleksi "Lex" Kilpinen

As we have an open bug report on this, and as we are discussing the fix for this particular case already - please report any similar cases you might find elsewhere in SMF, so they can be worked out at the same time :) Thank you.

The bug report for those interested: http://dev.simplemachines.org/mantis/view.php?id=4822
Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

poolhall

Quote from: emanuele on September 06, 2011, 05:08:08 AM
Quote from: poolhall on September 05, 2011, 04:58:25 PM
Quote from: emanuele on September 05, 2011, 08:15:39 AM
Could you list where these cases are so we can have a more comprehensive view of the problem?

okay, a few examples:
[SNIP]
My question was more: can you point us to the places (the strings or the positions in the templates) in SMF where you know a string is misused because should be translated in two different ways for your language? Sorry for the misunderstanding.
In Russian there are no such places, I believe. The translation of a noun every time would be the same, but cases would be different. Example, in boardview, in Replies / Views column, the words views / replies have a wrong case in Russian ~50% of the time.

poolhall

From practical point of view, I think it would be enough in Russian language strings to take care of 3 cases for some nouns (such as member, topic, replies, views, names of the months and days) used with numerals.

Angelina Belle

So this would be adding 2 more cases for about 30 nouns, and asking developers to use them correctly in templates?
And, something different in other languages, which have different rules?
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

emanuele

Quote from: poolhall on September 06, 2011, 10:43:44 AM
From practical point of view, I think it would be enough in Russian language strings to take care of 3 cases for some nouns (such as member, topic, replies, views, names of the months and days) used with numerals.
Fine, but please give practical references to code in SMF or at least to a page and a position where the current translation for a string (e.g. $txt['members']) doesn't fit with the Russian grammar rules like ke did in the first post.

Is the string in the first post of this topic problematic in Russian too?
There are other similar situations in SMF? If so where?

Of course I'm not asking you to review the entire SMF, just provide the examples you have at your hands, in future if you discover others you will be able to post here again. ;)


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

poolhall

emanuele, the same example from the ke's post:

the code in BoardIndex.template.php:
', $context['common_stats']['total_posts'], ' ', $txt['posts_made'], ' ', $txt['in'], ' ', $context['common_stats']['total_topics'], ' ', $txt['topics'], ' ', $txt['by'], ' ', $context['common_stats']['total_members'], ' ', $txt['members'], '. ', !empty($settings['show_latest_member']) ? $txt['latest_member'] . ': <strong> ' . $context['common_stats']['latest_member']['link'] . '</strong>' : '', '<br />

results in the following string in my forum: "2,337,893 Сообщений в 13,418 Тем от 10,107 Пользователей.", which means "2,337,893 messages in 13,418 topics by 10,107 members."

This is how these three are translated in index.russian-utf-8.php:
$txt['posts_made'] = 'Сообщений';
$txt['topics'] = 'Тем';
$txt['members'] = 'Пользователей';


Because the case in Russian changes depending on a qualifying numeral, in this particular example the two of the three nouns are incorrect (it must be: "2,337,893 Сообщения в 13,418 Темах от 10,107 Пользователей."). If I refresh the page, all 3 words may become correct or incorrect because there are 3 possible variations for the first word and two variations - for the two other words.

Quote from: emanuele on September 06, 2011, 12:15:00 PM
There are other similar situations in SMF? If so where?

Everywhere where single word nouns, such as members, messages, topics, replies, views, etc. are used with their qualifying numerals. :)

Angelina Belle

This is adding 60 words, at least? The English-speaking developers will simply not use them "properly", even if they exist in the russian translations. They will never understand how to choose between all the cases of the words.

How will we get it right in some future version of SMF?
Never attribute to malice that which is adequately explained by stupidity. -- Hanlon's Razor

Dzonny

#18
QuoteSo - I agree with the OP. It should be made one big language string instead of a puzzle of many incompatible parts.
As Lex said, we will make new string with whole phrase, so translators can deal with that string we're talking about. However, we would like to hear if there is some other specific phrase which should be changed in order to get better translation?

@Angel, you're right, we can't just add 60 strings and ask translators to translate them. It would be better to solve this with merging few smaller strings in one bigger IMO, like we did in this case. But i don't think it's necessery if translators can deal with these phrases on their way. In serbian we did manage to do so, even if we have 7 cases.

In order to get best feedback, we should maybe post in translation board and ask translators to say their opinion about this problem?

Illori

I think a thread was posted there already asking for feedback in this thread.

[opinions needed] issue with $txt['members']

Advertisement: