-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use translation with plurals for x days/weeks/months ago #112
Comments
Recent discussion on fedora-trans list suggests the current plural handling is incorrect. Please consider to reopen this issue. Email content quoted as below for your convenience:
|
@alick, thank you for your remark. Are you able to reopen the issue or open a new one? I'm sorry but I don't know anything about Chinese language so I am hardly able to solve the problem. Is it because Chinese does not have plural/singular number? Please explain how does it appear now. Is it possible to translate into Chinese such expressions like "Last week" / "n weeks ago" and "Yesterday" / "n days ago"? Is it a limitation of zanata that it cannot handle a translation if an English singular and plural strings are intentionally different? Or is zanata absolutely right and we have a bug in gnome-abrt? Are you able to provide a patch or describe the correct solution which also preserves this fancy appearance in English? |
@rluzynski The real problem will be appear in Russian, whose Plural form is
The first form includes 1, 21, 31, ... |
Hmm, for Russian, perhaps thing is not as bad as I originally though. But for inexperienced translators, they may translate as-is. So the conservative choice is used some thing like:
|
Thank you, @definite and @alick, for explaining and for pointing out the case with Russian. Actually, the Russian users will never see the bug with "21 months ago" because instead they will see "Last year" or "2 years ago", similarly they will never see "21 weeks" nor "21 days ago". But they will see "21 years ago"... in year 2036. But that's not an excuse. Indeed, it looks like we have to handle the case of 1 separately and explicitly, without relying on Unfortunately, I cannot reopen the issue but I hope it is not necessary. |
Thanks for rapid reply! ----- Original Message -----
Ding-Yi Chen Red Hat, Asia-Pacific Pty Ltd Red Hat, Inc. |
It turned out that we can't fully rely on ngettext() for some languages which don't have plurals (Chinese, Japanese, Korean) or use the singular form for some plural cases (21, 31, ... in Russian). Fixes abrt#112
It turned out that we can't fully rely on ngettext() for some languages which don't have plurals (Chinese, Japanese, Korean) or use the singular form for some plural cases (21, 31, ... in Russian). Fixes #112 Signed-off-by: Jakub Filak <jfilak@redhat.com>
Translation of the relative date format telling when an issue occurred ("yesterday", "last week", "3 days ago", "4 years ago") may be impossible for some languages because of the following wrong assumptions:
My suggestion is that instead of a complex algorithm which first determines the translated singular name of the period (day, month, week, year), and then either prepends it with a translated word "Last" or applies the translated format "{0:d} {1!s}s ago" you can achieve the correct result simply using
ngettext
with the following pairs of singular/plural:Isn't it simple? The function
fancydate
is in the source filetools.py
.The text was updated successfully, but these errors were encountered: