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 fileFor 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