Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In includes/locale.inc
, _locale_export_po_generate
outputs the following:
_locale_export_string($string['source']);
as a value for msgid without testing the string is non-empty.
But there should be only one empty msgid in a po file: inside its header.
msguniq
from gettext
will abort on a duplicate empty msgid and such a po file will be unusable until you manually remove the duplicated empty msgid.
Other than that, msgid should not contains "\r" escape-sequence (msg* utils will throw a warning on them).
Comments
Comment #1
drzraf CreditAttribution: drzraf commentedhttp://git.savannah.gnu.org/cgit/gettext.git/tree/gettext-tools/doc/gett...
Comment #2
Gábor HojtsyHow do those source strings end up in your database? For example t() ensures NOT to save an empty string under any circumstance to the db (and potx module which is used as a backend for localize.drupal.org will not extract empty strings either and flag those as warnings). I'd look at how do those get into the database in the first place.
Comment #3
drzraf CreditAttribution: drzraf commentedD6->D7 upgrade is the answer