Things to look for when porting to Drupal 6:
- menu hook needs array to be parsed for title and description (code is in potx.inc, but commented out for Drupal 5)
- watchdog hook changed, so message should be grabbed without a t() wrapper present
- format_plural() changed and now accepts extra parameters
Also for supporting the Drupal 6 'translations' directory format:
- pot PO files where they belong under the code or build up an independent directory structure with the files
- note that to put general.pot to a proper place we should know the "default module" in case we are dealing with a module set (the default module is the one the others are based on, and which is a base requirement... this is sometimes named after the project, sometimes not)
Comments
Comment #1
hass CreditAttribution: hass commentedsubscribe
Comment #2
Gábor Hojtsy- .info files are in a new format, so we need to parse them with Drupal 6's drupal_parse_info_file(), but it does not seem like we have any new keys to look after for translatable strings
- JavaScript files can also contain Drupal.t() and Drupal.FormatPlural(), and luckily we just have code right in Drupal 6, which we can lift for potx
Huh, quite a few stuff to do for Drupal 6.
Comment #3
Gábor HojtsyAlso:
- _locale_get_iso639_list() was renamed to _locale_get_predefined_list()
(There are other issues with how translations are exported, but they are not extraction related, so I will not list them here).
Comment #4
Gábor HojtsyJust committed a port of the interface, so the module interface now works nicely in Drupal 6. The extraction itself need to be fixed through with the issues listed up here.
Comment #5
Gábor HojtsyWell, this took nearly all my Sunday, but here it is: http://drupal.org/cvs?commit=84560
So if someone steps up with better menu hook error reporting, or any bugs or missing functionality in the Drupal 6 version, feel free to step up. I consider this done for now, and will not actively look for missing stuff (only fix issues I came across myself or reported in the issue queue).
The Drupal 6 directory structure task will be handled differently it is not a parsing issue, so I was mistakenly mentioning it here.
Comment #6
(not verified) CreditAttribution: commented