Download & Extend

path information for errors in po-files

Project:Auto locale import
Version:5.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Hello,

you should view the directory of the po-file with the error(s).

Valgard

Comments

#1

What do you mean?

#2

See 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:

//  drupal_set_message(t('Imported translation file @filename', array('@filename' => basename($filepath))));
    drupal_set_message(t('Imported translation file @filename', array('@filename' => $filepath)));

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).

#3

Status:active» closed (duplicate)

Committed that patch.

#4

Status:closed (duplicate)» active

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.

nobody click here