• Page:
  • 1

TOPIC:

What does "X is translated separately" mean? 8 years 6 months ago #1

  • eyolf
  • eyolf's Avatar Topic Author
  • Offline
  • Junior
  • Junior
  • Posts: 217
One of the new translation items has the following:
No events exist for the next %s day.
No events exist for the next %s days.

I18N: tanslation for %s==1 is unused; it is translated separately as "tomorrow"

I take this to mean that this is "translated" in English into "No events exist for tomorrow". But how do we deal with it in other translations? How free is the singular form translation allowed to be? Does it have to include the number placeholder so that the correct form can be chosen?
webtrees 1.7.9 • php 7.2
http://oestrem.com/webtrees

Please Log in or Create an account to join the conversation.

Re: What does "X is translated separately" mean? 8 years 6 months ago #2

How plurals are handled is different among languages.
The call in the code inserts the number into the translation, but also pulls different translations based on the language's plural singular rules. The system is asking you for separate translations for 'day' and 'days' but the comment informs you that the first one won't actually be used. The reason it asks is that the function called to switch the languages demands them both. When the number is one, code outside of the translation code catches it and tries to translate "No events for tomorrow" That is probably confusing, and I don't know whether the code will clear it up, but
if ($filter==0) {
				if ($endjd==$startjd) {
					$summary = WT_I18N::translate('No events exist for tomorrow.');
				} else {
					// I18N: tanslation for %s==1 is unused; it is translated separately as "tomorrow"
					$summary = WT_I18N::plural('No events exist for the next %s day.', 'No events exist for the next %s days.', $endjd-$startjd+1, WT_I18N::number($endjd-$startjd+1));
				}
			} else {
				if ($endjd==$startjd) {
					$summary = WT_I18N::translate('No events for living people exist for tomorrow.');
				} else {
					// I18N: tanslation for %s==1 is unused; it is translated separately as "tomorrow"
					$summary = WT_I18N::plural('No events for living people exist for the next %s day.', 'No events for living people exist for the next %s days.', $endjd-$startjd+1, WT_I18N::number($endjd-$startjd+1));
				}
			}
--
Wes Groleau
UniGen.us/
PHP 7.2.15; MySQL 5.6.40; Apache

Please Log in or Create an account to join the conversation.

Re: What does "X is translated separately" mean? 8 years 6 months ago #3

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 13364
Norwegian uses the same plural rules as English, so you might be thinking, why not translate the singular as "tomorrow" and the plural as "the next %d days"

The answer is that the two translations are *NOT* for singular and plural.

They are for the "first plural rule" and the "second plural rule".

In other languages, it is possible that the first plural rule is used for numbers other than 1. Perhaps 101, 201, 301, etc.

Now, the expression "the next 1 day" doesn't sound very natural. So, we translate this separately.

if (N is 1) {
"tomorrow"
} else {
"the next N days"
}
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Re: What does "X is translated separately" mean? 8 years 6 months ago #4

  • eyolf
  • eyolf's Avatar Topic Author
  • Offline
  • Junior
  • Junior
  • Posts: 217

fisharebest wrote: Norwegian uses the same plural rules as English, so you might be thinking, why not translate the singular as "tomorrow" and the plural as "the next %d days"

The answer is that the two translations are *NOT* for singular and plural.

They are for the "first plural rule" and the "second plural rule".


In that case, it is more than a little misleading that the two lines are named "English singular" and "English plural"...

Now, the expression "the next 1 day" doesn't sound very natural. So, we translate this separately.

if (N is 1) {
"tomorrow"
} else {
"the next N days"
}


Exactly. The reason I asked is that there are three text strings in the English version ("the next N day", "the next N days" and "tomorrow") but only two available slots in the translation. But I see now that the "tomorrow" version had already been translated elsewhere, so it didn''t show up in the filtered list.
webtrees 1.7.9 • php 7.2
http://oestrem.com/webtrees

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum