[development] Auto locale module (and an interesting bug(?))
Gabor Hojtsy
gabor at hojtsy.hu
Wed Dec 27 16:25:15 UTC 2006
On Sun, 24 Dec 2006, Gabor Hojtsy wrote:
> 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).
>
> Project here with CVS link: http://drupal.org/project/autolocale
>
> [...]
>
> 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.
The bug was that the name of my module and install profile was the same,
so the module _install hook was called twice (once as the module's install
hook and near the end of the install process as the install hook of the
profile). Renaming the profile effectively solved the problem.
I have extended the functionality of the module to also provide the
ability to wipe an existing language and import PO files from the server
folders into the database for that language. I would very much appreciate
UI suggestions, testing and such. I am already beta-testing the profile
with the Hungarian translation.
You can read more here about the suggested new locale package format and
how it works:
http://drupal.hu/english/node/7
Gabor
More information about the development
mailing list