Export function of the translate interface does not compatible with the import function.
The export/import function works well on the "default" (Built-in) text group, but does not works with the each others text groups, like menu, taxonomy, type etc…
The export create an output like this:
#: term:2:name
msgid "New"
msgstr ""When importing this file, the _locale_import_read_po() parse it line by line, and collect the comments above the msgid, and store it in array, and trim only the first character (#).
$current = array(
'#' => array(0 => ': term:2:name')
);
_locale_import_shorten_comments() will use this array. ($current['#'])
Join the items of array, and cut off one more character from the beginning of each line. (:)
And trim the whole string to 130 characters. If the comment is longer than 130 character, the location data is lost.
Now the location information is: term:2:name with the leading space.
This string will be stored in {locales_source}.location
The tt() function will never find this.
tt('term:2:name', 'New');
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | drupal-1143368.patch | 4.6 KB | sweetchuck |
Comments
Comment #1
sweetchuckQuick patch.
Comment #2
gábor hojtsyI think this is a duplicate of #384794: Preceding white space inserted in locales_source, please reopen if not.