Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
All that is needed is to remove the "basename()" function in the message that announces a translation file has been imported (currently on line 70 of the "autolocale.install" file:
Quite often, when importing translation files I get the following message:
The translation file %filename contains an error: the plural formula could not be parsed.
(or "El archivo de traducción %filename contiene un error: no se pudo analizar la fórmula de plural." in Spanish)
With the current autolocale module as it is, it is impossible to tell which file contains the errors, since it simply lists the name of the file (for example "Imported translation file es.po"), without any clue to which module it belongs to.
Removing the basename() function as indicated above, you get to see the location of each translation file imported (as in "Imported translation file sites/all/modules/links/po/es.po"), therefore being able to determine where the import was interrupted by an error (I assume).
Erm, wait... Error messages are not printed by autolocale, but by locale module. So is this still applicable? Then we need to reclassify this for locale module.
Comments
Comment #1
gábor hojtsyWhat do you mean?
Comment #2
Carlos Miranda Levy commentedSee the fix in http://drupal.org/node/141191 -- the patch is for an earlier version
All that is needed is to remove the "basename()" function in the message that announces a translation file has been imported (currently on line 70 of the "autolocale.install" file:
Quite often, when importing translation files I get the following message:
With the current autolocale module as it is, it is impossible to tell which file contains the errors, since it simply lists the name of the file (for example "Imported translation file es.po"), without any clue to which module it belongs to.
Removing the basename() function as indicated above, you get to see the location of each translation file imported (as in "Imported translation file sites/all/modules/links/po/es.po"), therefore being able to determine where the import was interrupted by an error (I assume).
Comment #3
gábor hojtsyCommitted that patch.
Comment #4
gábor hojtsyErm, wait... Error messages are not printed by autolocale, but by locale module. So is this still applicable? Then we need to reclassify this for locale module.