if i add a localization by hand i get a watchdog entry. if i do the same with autolocale i do not get any entry. The checkbox "remove translation first" is checked...

CommentFileSizeAuthor
#2 autolocale.module_watchdog.patch2.15 KBhass

Comments

gábor hojtsy’s picture

Priority: Normal » Minor

Well, autolocale does not emit any watchdog messages at all. Let me know if you have a patch.

hass’s picture

Status: Active » Needs review
StatusFileSize
new2.15 KB

Net yet, but now i created a patch against 5.x branch.

If you wonder why i removed the basename() in autolocale.install... this have been done to get helpful info out of the drupal_set_message(). I find it not very helpful if i see N-times "de.po" have been imported and don't know what de.po files have been imported.

Carlos Miranda Levy’s picture

Great patch.
Works like a charm. I have tested it and it's really useful.
The additional info on the screen (and on watchdog) is particularly useful when broken translation files exist.

With the traditional locale module import feature, when you try to import a translation file that's broken (I see this often for improper plural formula definition), you get is an error message in the form of:

The translation file %filename contains an error: the plural formula could not be parsed.

There is no watchdog entry for this error and the translation file is not imported. Not much of a problem when you're importing only one file with the import feature of the locale.module.

But with the autolocale.module, there is no way of telling which file is broken since the error is shown with no %filename info.

Thanks to this patch, at least you can tell which translation files were successfully processed.

gábor hojtsy’s picture

Status: Needs review » Fixed

Thank you, committed. If you find similar problems with Drupal 6 (which has the autolocale functionality built-in), please file issues and submit patches against Drupal 6.

Anonymous’s picture

Status: Fixed » Closed (fixed)