[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gettext] v0.18.3.2 Javascript Developer Comments
From: |
Daiki Ueno |
Subject: |
Re: [bug-gettext] v0.18.3.2 Javascript Developer Comments |
Date: |
Mon, 14 Apr 2014 14:46:51 +0900 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
James D Holby <address@hidden> 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