Import: all found language files should be imported
hass - April 8, 2007 - 18:42
| Project: | Auto locale import |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | minor |
| Assigned: | Unassigned |
| Status: | postponed (maintainer needs more info) |
Jump to:
Description
We should import all existing language files on the disk and not only the files for active modules.
If we don't import all, we have for all inactive modules the descriptions in English (under "admin/build/modules"). This is not good, while users in foreign languages likes to read the descriptions in their language and choose to activate a module if they like. Remind, this will happen very often with installer profiles... but however this is bad at all for other situations, too.

#1
#2
Core modules decidedly have all .info file information stored in general.po, which gets imported in install time. I have experienced this problem before, and came up with this solution for core. It is true that this is not a solution for contributed modules however.
Importing all the translations for all modules would go against one of autolocale's principle roles however: to optimize your database utilization. Why import translations for modules you are not going to use? We might be able to come up with some Drupal tricks to only import the .info file related strings from the PO files of disabled modules, and that is probably a good todo item for Drupal 6.
As far as I see, both the resource utilization requirements of importing all PO files at once (in one HTTP request) and the subsequent database pollution is prohibitive of a complete import solution.
#3
You have an idea of how can we fix this without importing all translations?
#4
not really, only idea is loading it into memory, but many/most host will not have enough... :-(.
#5
What we can do is to have modulename-info.pot files, which should not get folded into the language.po files, so we can have a small set of strings to load for all contrib modules present, even if not installed. But that would add a required small .po file to all translations.
#6
Or we can somehow make special cases in the import code to only grab .info strings, but that would still require full parsing of all .po files, which is a very looooong time, and would not fit in with the use case people expect when trying to enable modules. So that way does not seem to be viable.