[translations] xxx-module.hu files

Gabor Hojtsy gabor at hojtsy.hu
Wed May 23 17:48:34 UTC 2007


Bèr, you probably mean xxx-module.hu.po files. These are admittedly 
against the current guidelines (although I cannot access drupal.org to 
check now due to the scheduled downtime, which manifests itself in DB 
errors unfortunately).

A few points:

  - the guideline is in place so people can identify files to import
    (by hand)

  - autolocale module for Drupal 5.x can automatically import translation
    files in {langname}.po or something.{langname}.po name format.

  - Drupal 6.x-dev automatically imports files in the same name format
    as autolocale (in Drupal install time, when you install modules
    enable themes and when you add a language)

The idea behind allowing some prefix before the language code and .po 
extension is that you can segment the translation job. Theoretically you 
could also match the translation files to modules, when having more 
modules in the same folder. Take views module for example. It has 4 
modules in the same folder with one shared po subfolder. Now with the 
current guideline, you need to have only one {langname}.po file, so you 
need to merge the translations for all four modules into one big PO file 
and import them all at once. There is no way to optimize this by 
providing matching named PO files, so you can optimize DB usage by only 
loading translations for the modules you actually use.

Now unfortunately Drupal 6.x does not do module <-> po file matching for 
module suites, it blindly imports everything matching the above 
mentioned patterns when you enable a module, so it would import 
translations for all four modules in views for the given language in its 
current state. It would be nice to fix this up with an improved naming 
convention, maybe with the one we are already using in the Hungarian 
translation (the extractor script generates such filenames), and coding 
some logic into Drupal 6 so it can better identify relevant PO files for 
module suites.

Anyway, there is a problem with only allowing one file per language for 
a contrib module suite. It would not be a problem, if it would be a 
module, and not a suite of modules. As far as I remember, the PO naming 
guidelines date back to the day before these big module suites, where 
you are not necessarily interested in turning all the modules on. So I 
would say that the naming convention is ready for a change. (And an 
optimizing patch should hit Drupal 6 :)

(BTW smaller PO files also help Drupal 6 to build a batch and not time 
out while parsing a big PO file, although the existing monolithic PO 
files for views are small enough already for not timing out :).

Gabor

Bèr Kessels wrote:
> In the contribs I just found a few xxx-module.hu po files. According to the 
> handbook[1] they should have been named 'hu.po'. 
> Did I miss a change in policy, and if so, can someone explain the new policy 
> so that I can update the handbook page?
> If I did not miss omething, is it okay if I rename the files when I encounter 
> them to the proper naming scheme?
> 
> Bèr
> 
> [1] http://drupal.org/node/11396
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> translations mailing list
> translations at drupal.org
> http://lists.drupal.org/mailman/listinfo/translations



More information about the translations mailing list