Currently the extraction errors from _potx_process_file() are silently irgnored.
We should catch them and collect them somewhere, and probably add the to the produced pot-file in a comment.

The extraction itself works fine, it's just about being able to tell module owners they have invalid translatable arguments in their modules.

Comments

gábor hojtsy’s picture

I would not add them into comments, but we can show them the errors on the web interface as Drupal errors or messages.

gábor hojtsy’s picture

Status: Active » Fixed

The current potx module implementation (committed a few minutes ago) uses drupal_set_message($message, 'error') to record extraction errors when on the web interface. This shows the errors to the user in the theme or can be used in the extraction process to grab the errors noted (drupal_get_messages('error')) and present it somewhere out of the web interface. (The errors are known before the actual output is built and the script terminates execution).

Building on this (or a slightly refined) API, the 'Localization server' project will implement an error collection for modules.

Anonymous’s picture

Status: Fixed » Closed (fixed)