James D Holby <[email protected]> writes:

>> Could you elaborate what you mean with "developer comments"?
>
> In the PO files they can contain:
>
> #. Programmer comment
>
> The manual mentions we can add keywords to extract comments to be extracted
> into the PO file so that the developer can give context to the translator.
>
> However, it doesn't seem that these are currently extracted or recognized in
> 0.8.13 with JavaScript and adding the -c/--add-comments options.

It's strange.  With this simple test.js:

  /* comment 1 */
  gettext('test string 1');

  // comment 2
  gettext('test string 2');

I get the following PO:

  #. comment 1
  msgid "test string 1"
  msgstr ""

  #. comment 2
  msgid "test string 2"
  msgstr ""

by calling xgettext as follows:

  xgettext --add-comments --omit-header --no-location -o - test.js

gettext-tools/tests/xgettext-javascript-1 actually contains a similar
test, though it uses a different option: --add-comments=TRANSLATORS:

Regards,
-- 
Daiki Ueno

Reply via email to