git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 03/10] i18n: mark relative dates for translation

From
Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Date
Apr 25, 2012, 11:25 UTC
Message-ID
<4F97DF3D.1000507@in.waw.pl>
In-Reply-To
<4F97DAE4.4070706@viscovery.net>
On 04/25/2012 01:07 PM, Johannes Sixt wrote:
Show 24 quoted lines
> Am 4/25/2012 12:46, schrieb Nguyen Thai Ngoc Duy:
>> 2012/4/25 Junio C Hamano <gitster@pobox.com>:
>>>>       /* Give years and months for 5 years or so */
>>>>       if (diff < 1825) {
>>>> ...
>>>>       }
>>>>       /* Otherwise, just years. Centuries is probably overkill. */
>>>> -     snprintf(timebuf, timebuf_size, "%lu years ago", (diff + 183) / 365);
>>>> -     return timebuf;
>>>> +     strbuf_addf(timebuf,
>>>> +              Q_("%lu year ago", "%lu years ago", (diff + 183) / 365),
>>>> +              (diff + 183) / 365);
>>>>  }
>>>
>>> This is just a tangent, but could we possibly come here and say "1 year
>>> ago"?
>>
>> Nice catch. Singular form here is unnecessary. If you plan to revert
>> that, please put a comment so nobody will attempt to convert it to
>> Q_() again next time while searching for possible candidates.
> 
> I am sure that there are languages (Russian? Polish?) where a variation is
> needed not only for the singular, but also for plural depending on the
> number, so we still want to have this wrapped in Q_().
Yeah, both Polish and Russian...
Polish:
Plural-Forms: nplurals=3; \
  plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);
Russian:
Plural-Forms: nplurals=3; \
              plural=n%10==1 && n%100!=11 ? 0 : \
                     n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;
Looking at http://www.gnu.org/savannah-checkouts/gnu/gettext/manual/html_node/Plural-forms.html, basically all languages which have nplurals=3 or nplurals=4.
Zbyszek
Previous: Johannes SixtNext: Nguyen Thai Ngoc Duy
Message 9 of 43 in “i18n relative dates, help, remote, apply, index-pack and bundle”
  1. 00/10 i18n relative dates, help, remote, apply, index-pack and bundleNguyễn Thái Ngọc Duy, Apr 23, 2012
  2. 01/10 Makefile: feed all header files to xgettextNguyễn Thái Ngọc Duy, Apr 23, 2012
  3. 02/10 Add three convenient format printing functions with \n automatically appendedNguyễn Thái Ngọc Duy, Apr 23, 2012
  4. Jonathan NiederApr 23, 2012
  5. 03/10 i18n: mark relative dates for translationNguyễn Thái Ngọc Duy, Apr 23, 2012
  6. Junio C HamanoApr 24, 2012
  7. Nguyen Thai Ngoc DuyApr 25, 2012
  8. Johannes SixtApr 25, 2012
  9. Zbigniew Jędrzejewski-SzmekApr 25, 2012
  10. Nguyen Thai Ngoc DuyApr 25, 2012
  11. Jonathan NiederApr 25, 2012
  12. Junio C HamanoApr 25, 2012
  13. Jonathan NiederApr 25, 2012
  14. 04/10 i18n: help: mark strings for translationNguyễn Thái Ngọc Duy, Apr 23, 2012
  15. Jonathan NiederApr 23, 2012
  16. Junio C HamanoApr 23, 2012
  17. Jonathan NiederApr 23, 2012
  18. help: replace underlining "help -a" headers using hyphens with a blank lineNguyễn Thái Ngọc Duy, Apr 25, 2012
  19. Junio C HamanoApr 25, 2012
  20. 05/10 i18n: make warn_dangling_symref() automatically append \nNguyễn Thái Ngọc Duy, Apr 23, 2012
  21. 06/10 i18n: remote: mark strings for translationNguyễn Thái Ngọc Duy, Apr 23, 2012
  22. Junio C HamanoApr 25, 2012
  23. Nguyen Thai Ngoc DuyApr 26, 2012
  24. 07/10 i18n: apply: mark strings for translationNguyễn Thái Ngọc Duy, Apr 23, 2012
  25. Junio C HamanoApr 25, 2012
  26. apply: remove lego in i18n string in gitdiff_verify_nameNguyễn Thái Ngọc Duy, May 6, 2012
  27. Junio C HamanoMay 7, 2012
  28. apply: remove lego in i18n string in gitdiff_verify_nameNguyễn Thái Ngọc Duy, May 8, 2012
  29. Junio C HamanoMay 8, 2012
  30. apply: remove lego in i18n string in gitdiff_verify_nameNguyễn Thái Ngọc Duy, May 9, 2012
  31. 08/10 i18n: apply: update say_patch_name to give translators complete sentenceNguyễn Thái Ngọc Duy, Apr 23, 2012
  32. 09/10 i18n: index-pack: mark strings for translationNguyễn Thái Ngọc Duy, Apr 23, 2012
  33. 10/10 i18n: bundle: mark strings for translationNguyễn Thái Ngọc Duy, Apr 23, 2012
  34. Junio C HamanoApr 25, 2012
  35. Nguyen Thai Ngoc DuyApr 26, 2012
  36. bundle: remove stray single-quote from error messageJonathan Nieder, Apr 26, 2012
  37. Jonathan NiederApr 23, 2012
  38. Junio C HamanoApr 23, 2012
  39. Ævar Arnfjörð BjarmasonApr 23, 2012
  40. Nguyen Thai Ngoc DuyApr 24, 2012
  41. Junio C HamanoApr 24, 2012
  42. Nguyen Thai Ngoc DuyApr 25, 2012
  43. Jonathan NiederApr 25, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.