Closed (won't fix)
Project:
Auto locale import
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Mar 2007 at 20:24 UTC
Updated:
31 Oct 2010 at 23:08 UTC
Please have a look to bug http://drupal.org/node/130538 and think about - if there should be done something in autolocale module or not!?
Comments
Comment #1
hass commentedAdditional check out http://drupal.org/node/130691
Comment #2
gábor hojtsySo to summarize, the problem is that improper contrib translations could mess up your existing translations. This is easily fixed by not using the overwrite method for imports, but opting for the 'keep' method. As far as I see, there should be no general problem by using that method, so I modified the code to use 'keep'.
Comment #3
hass commentedBut if you simply say "keep" it is possibly that a module translation is imported first and then we say "keep" if the core translation is imported... this will result the same problems...
We should use a filter like looking FIRST for "drupal*.[$locale].po" to install the core files located in the autolocale po directory (should be with 'overwrite') and everything else like modules and themes with 'keep', but only AFTER core translation has been imported. Isn't it?
Comment #4
gábor hojtsyWe don't know what is a core module, unless we add a definitive list of core modules into autolocale. Modules can be placed anywhere, intermixed with core modules.
Comment #5
hass commentedwe don't need to know about core modules or not. core module translations are inside the core PO files named like "de.po"... we only need to do establish an file naming convention for "autolocale". for e.g. we say:
1. if you'd like to import core files with "autolocale" it should be named "drupal*.[$locale].po" (for e.g.
drupal-5.x-1.x-dev.de.po,drupal-5.x-1.x-dev-installer.de.poordrupal-5.x-1.x-dev-1.ru.po,drupal-5.x-1.x-dev-2.ru.po,drupal-5.x-1.x-dev-3.ru.po,drupal-5.x-1.x-dev-installer.ru.po). In this case "autolocale" will import this Core PO's first.2. we look for modules and themes PO files and import them with 'keep' for not destroying the prior imported core files
Comment #6
gábor hojtsyNo, core translations are not in one file. Core translations can be in any number of files. You'd better read the reasons behind autolocale development the first place: http://drupal.hu/english/node/7 Look, a core translation could easily be 30-40 files. This functionality will be built into Drupal 6 core as it seems now, so we need to think in "core level solutions" as far as autolocale advancement goes.
How would you distinguish the core modules from the contrib modules in this case? Sure, we tell people not to unzip modules into the modules folder, but use the sites/all/modules or sites/$sitename/modules folders, but noone can stop people from putting modules directly into the modules folder.
Comment #7
hass commentedok, i understand you are a step forward i don't know about. if you will not have one file for a core translation in future that will be difficult... i have no idea how to solve this without a positive list of core modules...
But however we try to turn it, 'keep' is no solution for the above problem... if the buggy "de.po" of CCK is imported first and then the drupal core files with 'keep' i have the same situation as i have with 'overwrite' mode. i only thought to use 'overwrite' for core to solve the order of imports... and solving the problem that modules overwrite the core translation, today.
Comment #8
gábor hojtsyWell, autolocale imports component (module, theme) PO files in the order of appearance in the system table (in the order of a SELECT SQL query returning them). MySQL at least returns the rows in insert order, so core modules inserted before contrib modules will have their translations imported first. We cannot do anything about core translations imported later then contrib modules (ie. core modules enabled a few days or weeks later), but at that time, you already should be familiar with translations in your database, so you would get surprised if a core translation modifies existing strings.
That said, using 'keep' is also better to keep user modified translations, altered using the web interface (which we also could not distinguish from imported translations). My 'overwrite' default behavior was a deliberate attempt to push a solely PO file based translation approach, but that does not fit Drupal core either, so it was time to modify it to 'keep'.
Comment #9
(not verified) commentedComment #10
hass commentedHave you already taken this sort order in account for D6 so that core will be imported first?
Comment #11
gábor hojtsyThe localization server in development (which will provide a web interface for translations) will enforce translation sharing between core and contrib, so contrib translations will not be able to mess up your existing strings at all, even when imported with overwrite mode.
Comment #12
hass commentedIs this a Drupal module? Anything to see or only on your box? :-)
Comment #13
hass commented