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

Re: [PATCH 1/5] i18n: keep the last \n even when text is poisoned

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Mar 9, 2012, 01:11 UTC
Message-ID
<CACsJy8AcUy9FZiiehGc7mEL4i+XP6u0pmH1rGoR-WZnhYT1UMQ@mail.gmail.com>
In-Reply-To
<20120308220131.GA10122@burratino>
2012/3/9 Jonathan Nieder <jrnieder@gmail.com>:
Show 7 quoted lines
> I realize this was not the motivation behind the above patch, but if
> the translation of some message has to end with a newline for git to
> function correctly, would we consider that a bug?
>
> I am of two minds on that:
>
>  - on one hand, translators tend to be trustworthy, reasonable folks
We trust msgfmt and it does check \n in msgstr if there is in msgid.
>  - on the other hand, anything we can do to make the translation
>   process less fussy seems like time well spent

That's at the cost of more code to split \n out of the strings, and there are 113 of them (some not published yet).

> The latter wins out for me, so I would prefer not to have this patch
> so the test suite can detect important newlines that should be not be
> part of the translatable string.

It's the former for me, but that's probably because I'm also a translator :) Anyway for tricky cases where msgfmt fails to detect, there's the role of l10n coordinators, who should review translation and catch these errors.

> Just my two cents,
> Jonathan
-- 
Duy
Previous: Jonathan NiederNext: Nguyen Thai Ngoc Duy
Message 4 of 15 in “i18n-ize relative dates, git-help and parseopt”
  1. 0/5 i18n-ize relative dates, git-help and parseoptNguyễn Thái Ngọc Duy, Mar 8, 2012
  2. 1/5 i18n: keep the last \n even when text is poisonedNguyễn Thái Ngọc Duy, Mar 8, 2012
  3. Jonathan NiederMar 8, 2012
  4. Nguyen Thai Ngoc DuyMar 9, 2012
  5. Nguyen Thai Ngoc DuyMar 9, 2012
  6. Ævar Arnfjörð BjarmasonMar 9, 2012
  7. 2/5 i18n: mark relative dates for translationNguyễn Thái Ngọc Duy, Mar 8, 2012
  8. Jonathan NiederMar 15, 2012
  9. Johannes SixtMar 15, 2012
  10. Jonathan NiederMar 15, 2012
  11. Nguyen Thai Ngoc DuyMar 16, 2012
  12. 3/5 i18n: parseopt: lookup help and argument translations when showing usageNguyễn Thái Ngọc Duy, Mar 8, 2012
  13. Jonathan NiederMar 8, 2012
  14. 4/5 i18n: help: mark parseopt strings for translationNguyễn Thái Ngọc Duy, Mar 8, 2012
  15. 5/5 i18n: help: mark strings for translationNguyễn Thái Ngọc Duy, Mar 8, 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.