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

Re: [l10n] date: Note for translators not included in .po files

From
Jiang Xin <worldhello.net@gmail.com>
Date
Apr 17, 2014, 01:41 UTC
Message-ID
<CANYiYbGC0MsYFMv2kUjDxE64tO_gXb6gtFoRMNv4zpyTcHdT+w@mail.gmail.com>
In-Reply-To
<CAN7MxmV5tzvGTTG+aOL73fLhbXc7YeOWvYwLkMyad0=mvffMHQ@mail.gmail.com>
2014-04-17 6:51 GMT+08:00 Brian Gesiak <modocache@gmail.com>:
Show 6 quoted lines
> A note for translators in date.c is not included in git.pot.
> Namely, the following note from date.c:147 is not included
> (https://github.com/git/git/blob/v1.9.2/date.c#L147):
>
> /* TRANSLATORS: "%s" is "<n> years" */
>

Comments for translators will be extracted to pot file automatically, when run xgettext with "--add-comments" option.

       -c, --add-comments
              place all comment blocks preceding keyword lines in output file

For example, the comments in the following code blocks will be extracted.

       /* TRANSLATORS: "will be extracted." */
       strbuf_addf(&sb, Q_("%lu year", "%lu years", years), years);
        strbuf_addf(&sb,
               /* TRANSLATORS: "will be extracted." */
               Q_("%lu year", "%lu years", years), years);

But if the comment is not right before the l10n markers, such comments will not be extracted. E.g.

        /* TRANSLATORS: "WARNING: will NOT be extracted." */
        strbuf_addf(&sb,
                Q_("%lu year", "%lu years", years), years);
        /* TRANSLATORS: "WARNING: will NOT be extracted." */
        strbuf_addf(&sb, Q_(
                "%lu year", "%lu years", years), years);
I will scan all the codes and make a fix.
Show 10 quoted lines
> This is a very useful note for translators (in fact, I think
> the zh_CN translation for date.c:149 might be a little off
> because this note was not included. My Mandarin is rusty,
> but I believe "<n> years, <m> months ago" should be expressed
> without a comma).
>
> According to po/README, the l10n coordinator is responsible
> for updating the git.pot file. Would it be possible to update it based
> on v1.9.2 and include the above comment?
>

I could generate a new git.pot for "maint" branch, but fixes for codes may only contribute to "master" branch.

-- 
Jiang Xin
Previous: Brian GesiakNext: Jiang Xin
Message 2 of 13 in “[l10n] date: Note for translators not included in .po files”
  1. Brian GesiakApr 16, 2014
  2. Jiang XinApr 17, 2014
  3. 0/3 extract proper comments for l10n translatorsJiang Xin, Apr 17, 2014
  4. 1/3 i18n: Fixes uncatchable comments for translatorsJiang Xin, Apr 17, 2014
  5. 2/3 i18n: Only extract comments marked by special tagJiang Xin, Apr 17, 2014
  6. Junio C HamanoApr 17, 2014
  7. Jiang XinApr 18, 2014
  8. Junio C HamanoApr 18, 2014
  9. Junio C HamanoApr 18, 2014
  10. 3/3 i18n: Remove obsolete comments for translatorsJiang Xin, Apr 17, 2014
  11. Jiang XinApr 17, 2014
  12. Junio C HamanoApr 17, 2014
  13. Jiang XinApr 17, 2014

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.