[development] Auto locale module (and an interesting bug(?))

Gabor Hojtsy gabor at hojtsy.hu
Sun Dec 24 15:13:55 UTC 2006


Hi All,

I have been working on an automatic locale file import module, so that we 
can provide install profiles which automatically import the PO files for 
modules enabled, without any user intervention (turn on locale module, add 
language, file upload).

The alpha quality code works, imports all PO files I have thrown at it. I 
have left two debug messages in the code, because I experienced very 
interesting database behaviour while testing the code, and would 
appreciate your feedback.

Project here with CVS link: http://drupal.org/project/autolocale

My problem is that although I do a SELECT on the system table and go 
through that list sequentially I get:

# Handling themes/engines/phptemplate/phptemplate.engine
# Handling themes/garland/page.tpl.php
# Handling modules/system/system.module
   # Importing modules/system/po/general.hu.po
   # Importing modules/system/po/system-install.hu.po
   # Importing modules/system/po/system-module.hu.po
# Handling themes/engines/phptemplate/phptemplate.engine
# Handling themes/garland/page.tpl.php
# Handling modules/system/system.module
   # Importing modules/system/po/general.hu.po
   # Importing modules/system/po/system-install.hu.po
   # Importing modules/system/po/system-module.hu.po
# Handling modules/autolocale/autolocale.module
# Handling modules/block/block.module
# Handling modules/color/color.module
# ....

Seems like it does go through the phptemplate engine, the garland theme 
and the system module twice. I have absolutely no idea why it would do 
this, since these appear in the database only once.

I would appreciate if someone would be able to test and provide tips. This 
module/install profile would invalidate the need to merge the smaller PO 
files used by translators and really only import needed strings finally. I 
am going to beta test the concept with the Hungarian translation if the 
above issue can be resolved.

Have a merry christmas,
Gabor (who is now off to christmas dinner :)


More information about the development mailing list