If you install a module like "Views" or "CCK" you will have many submodules. Today autolocale will import the single PO file for every submodule. I think - if all views submodules are checked and saved, we don't need to import the single PO file 4 times. It's ok if this happen only once... additional the import will be much faster...

Comments

hass’s picture

CCK: 8 times the same file
Localizer: 8 times the same file

Gábor Hojtsy’s picture

Status: Active » Postponed (maintainer needs more info)

I see. Maybe you can prepare a patch to collect the file names first choosing only unique ones to import, not collecting file names for every module...

It would not be ideal still by the way, as we import all PO files under a module folder, even if those PO files belong to another module which happens to be in the same folder, but you don't enable them... Heh.

Anyway, let's fix the multiple import issue first and then get on to identifying PO files properly.

hass’s picture

Status: Postponed (maintainer needs more info) » Active
Gábor Hojtsy’s picture

Title: Single PO imported more then once for splitted modules » Single PO imported more then once for modules in the same folder
Project: Auto locale import » Drupal core
Version: 5.x-1.x-dev » 7.x-dev
Component: Code » language system

Drupal 6 does collect files as a unique list, and only imports them multiple times if you enable multiple modules in different HTTP requests from the same folder. Because Drupal 6 does not track whether a file was imported before or not. As autolocale is not in active development (D6 includes all the functionality), I am moving this issue to D7, because collecting the list of files would require serious API and DB changes, and this is still just a minor issue, nothing becomes broken, just the import takes a bit more time.

Gábor Hojtsy’s picture

Title: Single PO imported more then once for modules in the same folder » All .po files are imported from translations folder

Marked http://drupal.org/node/148749 as duplicate and generalizing this issue a bit.

So the issue at hand is that when you have multiple .module files in the same folder, and .po files are imported for a module, all .po files are imported from the translations subfolder. So all disabled sister modules get their .po files imported and when you import more modules in succession, all make the same .po files imported multiple times.

I hope this becomes a smaller issue with Drupal 6, as it supports/encourages breaking modules into smaller files, so having more modules in the same folder becomes inconvenient anyway. Anyway, we can look into fixing this in Drupal 7 by looking at .po file name patterns.

plach’s picture

Component: language system » locale.module

Cleaning-up the "language system" issue queue as per http://cyrve.com/criticals.