Re: Question about grammatical case when “humanizing” dates

2018-05-08 Thread Fòram na Gàidhlig


Sgrìobh Claude Paroz na leanas 07/05/2018 aig 07:54:
> Le 07. 05. 18 à 08:34, Fòram na Gàidhlig a écrit :
>> Hi Max,
>>
>> thanks for looking into this!
>>
>> To answer your question: Always, always, always present the translators
>> with full sentences, no exceptions. Even if the current hard-coding
>> should work for 50 languages that have been tested, language #51 will
>> come along and have a different word order and screw things up.
>>
>> So, the string markup should be "X days ago" and "In X days", with no
>> hard-coded word order at all. You're already taking the plural forms
>> into account by using npgettext, so that bit is correct.
> 
> Hey GunChleoc,
> 
> You know I'm already convinced with this rule, however it's very
> difficult (if possible at all) in the present use case, because the
> composed string is highly dynamic. It can be:
> 
> 3 days ago
> 2 weeks, 3 days ago
> 1 year, 3 months ago
> ...
> 
> We'll try to come with an improved situation with the patch. Anyone with
> a still better implementation idea is welcome to participate.
> 
> Claude
> 
>>> When reviewing the changes in my pull request
>>>  


That's a tougher situation - I guess we'll need to separate the "x days"
bit then with npgettext and have a "X, Y ago" string? Or maybe 2 of
those, one for day/month and one for month/year?

-- 
You received this message because you are subscribed to the Google Groups 
"Django internationalization and localization" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-i18n+unsubscr...@googlegroups.com.
To post to this group, send email to django-i18n@googlegroups.com.
Visit this group at https://groups.google.com/group/django-i18n.
For more options, visit https://groups.google.com/d/optout.


Re: Question about grammatical case when “humanizing” dates

2018-05-07 Thread Claude Paroz

Le 07. 05. 18 à 08:34, Fòram na Gàidhlig a écrit :

Hi Max,

thanks for looking into this!

To answer your question: Always, always, always present the translators
with full sentences, no exceptions. Even if the current hard-coding
should work for 50 languages that have been tested, language #51 will
come along and have a different word order and screw things up.

So, the string markup should be "X days ago" and "In X days", with no
hard-coded word order at all. You're already taking the plural forms
into account by using npgettext, so that bit is correct.


Hey GunChleoc,

You know I'm already convinced with this rule, however it's very 
difficult (if possible at all) in the present use case, because the 
composed string is highly dynamic. It can be:


3 days ago
2 weeks, 3 days ago
1 year, 3 months ago
...

We'll try to come with an improved situation with the patch. Anyone with 
a still better implementation idea is welcome to participate.


Claude


When reviewing the changes in my pull request