potx-cli does not generate all strings from Drupal core
| Project: | Translation template extractor |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | by design |
Jump to:
Continuing from the translations mailing list, running the latest potx from the 6.2 branch does not generate all po templates strings from Drupal 6.4. Below is the list of strings not generated:
Built-in interface A serialized array of function names (like
user_current_to_arg) to be called to replace a part of the router path with
another string.
modules/system/system.install:684 el edit delete
Built-in interface An HTTP error @status occurred. \n at uri
misc/drupal.js el edit delete
Built-in interface An error occurred. \n at uri\n(no information available).
misc/drupal.js el edit delete
Built-in interface An error occurred. \n at uri\n at text
misc/drupal.js el edit delete
Built-in interface Boolean indicating whether the node should displayed on the
front page.
modules/node/node.install:66 el edit delete
Built-in interface Server error. Requested function %method does not exist.
includes/xmlrpcs.inc:206 el edit delete
Built-in interface Server error. Requested method %methodname not specified.
includes/xmlrpcs.inc:152;291 el edit delete
Built-in interface Server error. Requested method %methodname signature not
specified.
includes/xmlrpcs.inc:294 el edit delete
Built-in interface The title of this node, always treated a non-markup plain
text.
modules/node/node.install:35 el edit delete
Built-in interface You must enter a mask.
modules/user/user.admin.inc:715;737 el edit deleteWhat I did was to run potx-cli.php against the latest Drupal 6.4 from command line and generate the po templates files. I then updated the Greek translation against these po templates and imported it into Drupal. It seems that the above strings never existed in the po templates file.
After looking into the problem a bit more, I discovered that the 2nd, 3rd and 4th strings from the list above do indeed exist in the po templates (and so in the Greek translation), but it seems they are not imported into Drupal. What's different between these strings and the other is the existence of the new line character (\n) inside msgid, which seems to create some kind of a failure during the import.

#1
Most of those strings doesn't exist in core of 6.4 version.
Those were corrected as follows.
A serialized array of function names (like user_current_to_arg) to be called to replace a part of the router path with another string.
=> msgid "A serialized array of function names (like user_uid_optional_to_arg) to be called to replace a part of the router path with another string."
Boolean indicating whether the node should displayed on the front page.
=> msgid "Boolean indicating whether the node should be displayed on the front page."
Server error. Requested function %method does not exist.
=> msgid "Server error. Requested function @method does not exist."
Server error. Requested method %methodname not specified.
=> msgid "Server error. Requested method @methodname not specified."
Server error. Requested method %methodname signature not specified.
=> msgid "Server error. Requested method @methodname signature not specified."
The title of this node, always treated a non-markup plain text.
=> msgid "The title of this node, always treated as non-markup plain text."
You must enter a mask.
=> DELETED
#2
Looks like this is not a problem then.
#3
@GoofyX: Surely an issue exists that some string containing '\n' appears marked untranslated. But, it's not an issue of potx but an issue of core.
The same issue is reported at http://drupal.org/node/217371.