By default, when generating a PO file using the msginit
command of the gettext
package according to their source, the
msgstr
values are prepopulated with the corresponding msgid
values, so you get sth like this in your PO file..:
#. Message for unknown errors
#: /Http/Response.php:367
msgid "An unknown error occurred."
msgstr "An unknown error occurred."
created with a command like this:
msginit --input=mydomain_source.pot \
--locale=fr_FR.UTF-8 \
--no-wrap \
--no-translator \
--output-file="mydomain-fr_FR.po"
The .pot file of course does not contain any msgstr
values, and has been generated using the xgettext command.
The desired output should instead not hold any msgstr
values:
#. Message for unknown errors
#: /Http/Response.php:367
msgid "An unknown error occurred."
msgstr ""
Is there a way to prevent this in gettext, or is this a bug? Or actually intended behaviour?? We're only having this problem with the msginit
command, when using the msgmerge
command of the gettext package, no default msgstr values get pasted.