After grabbing the language list (#568986: Dynamically update standard language list from localization server), we should have a good knowledge of the paths used to export translations (#568994: Implement translation package export in l10n_packager), so we can just look at the right paths (named after module versions and languages we need to download) and be able to download the latest translations.

Again, the local environment should be respected. If there are translation files set up, we should use them and the remote service should be skippable.

Also, the remote server used to pull the packages should be optionally defined per project. Just like with update status, in the .info file. That allows people to share community modules with in-house (or non drupal.org) modules where the translation updates come from elsewhere.

CommentFileSizeAuthor
#9 568996_update_project_locales.patch19.25 KBJose Reyero
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Gábor Hojtsy’s picture

Issue tags: -undefined

Fix tag.

Gábor Hojtsy’s picture

#569004: Add support for seek based batch import of .po files is also related for the import, once the files are on our system.

seutje’s picture

subscribing

Gábor Hojtsy’s picture

@Sutharsan already solved a great deal of this as part of his work with #568986: Dynamically update standard language list from localization server.

Jose Reyero’s picture

Subscribing

Jose Reyero’s picture

I'm starting to look into this task which has some important challenges:

- We need to check the info file for each component or for each project the component belongs to.
- I see no straight forward way to link a module to the project it belongs to.
- We need to add some table or at least some hook to store which file and version was imported. This will be important for any future update module later.
- There's some issue with locales/install order, see #571380: Manage localization on module install (import locales first, default language)

Gábor Hojtsy’s picture

@Jose: on relating modules to projects, the update status module had and solved the same problem. :) So you can look up a possible solution there.

Jose Reyero’s picture

@gabor,
You're right about modules and projects and the update module. That should be moved to a common file, maybe install or update inc so it can be reused.

Now we need some storage to see which projects have been imported, which ones not... Also need to figure out how to handle fallback to the filesystem, which currently is per module files.

At this point I don't think we still want to use the old file structure (module/translations) as translations wont be packaged with modules anymore and we should move to something else, better if configurable along the lines of '/translations/module', or mimicing the folder structure in the core_translation module, http://drupal.org/project/core_translation

Also, should we move this file structure to per package po files too?

Jose Reyero’s picture

Status: Active » Needs work
FileSize
19.25 KB

This is just the start: Move project handling functions (update projects) into a separate API so it can be used by the locale system too..

A lot of work needed yet. I'm thinking maybe posting this patch on a different issue, though this may be slow down the whole work...

podarok’s picture

subscribe

Gábor Hojtsy’s picture

Project: Drupal core » Localization client
Version: 7.x-dev » 7.x-1.x-dev
Component: base system » Code

Ok, so since this one is not going to get into core, what we can do is to

(A) depend on update module to be enabled
(B) just include this single file and use its functions without requiring update module to be enabled (except the update.compare.inc file is not self-contained and is using API functions from outside, so it is not enough in itself)
(C) copy the code out and just use a copy

I'd say (A) is the easiest on us and is reasonable given how update module has these security features. I can understand that it being much extended in D7 with install and update, you might not want to have it enabled or tie this functionality to that module. In which case, looks like we need to fork out this fine library to make it work.

Not sure where to reposition this now that core will not get this functionality. Looks like l10n_client would be the good project to house this under. It has 6.x and 7.x versions both working hopefully equally, so we can start with either and build from there.

Gábor Hojtsy’s picture

Project: Localization client » Localization update
Version: 7.x-1.x-dev »

Moving to newly added l10n_update.

Jose Reyero’s picture

Version: » 6.x-1.x-dev
Status: Needs work » Fixed

The module includes now a full independent module/project api (so it doesn't depend anymore on update module) and we can have some extra features, like updating translations for disabled modules.

See l10n_update.project.inc

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Gábor Hojtsy’s picture

Issue tags: +localized install