Closed (won't fix)
Project:
Internationalization
Version:
6.x-1.x-dev
Component:
Blocks
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
13 Mar 2008 at 14:40 UTC
Updated:
8 Oct 2011 at 16:24 UTC
Jump to comment: Most recent file
Comments
Comment #1
arthurf commentedHere's a patch that does the following:
1) adds a hook_i18n_sync
2) reorders some of the functionality in this module to implement this hook
3) cleans up a few pieces because of this hook
The point behind this is to allow other module to implement the syncing process and to help tidy that process up so that it's easier to extend. My use case is for media_mover_api to make its files available to all translations. I will also write a quick module which syncs node views across translations and possibly one for reviews.
thanks!
Comment #2
arthurf commentedWoops, didn't get that quite right. Here's another go. Also, this should probably address the taxonomy stuff, but this is good for now
Comment #3
jose reyero commentedThe idea looks good, the patch looks a bit too complex though. Simply too many parameters when $source and $translation should be enough. For the field list, I think drupal_alter should be more adequate.
I don't see why we should change the naming. Also the hooks and parameters need some more comments.
Please, simplify, comment and repost. Just keep it as simple as possible.
Comment #4
arthurf commentedOk, here's another go at this. At the risk of being a trouble maker :) I've not really simplified things that much. I'll see if I can convince you and then if not, I'll try again.
I left in the hook for the configuration form. While you're quite right that we could leave this up to a form alter for what ever module wants to do this, what I like as a developer is having a centralized way to do things. For example- I'd like to have one or two functions that deal with syncing the data in my modules. My form alter stuff is already much to cluttered. It has the added bonus that it encourages people who are writing syncing functions to have the configuration in the same place which helps with keeping the interface consistent.
What I did do was remove the $hook option. I left the $config- while this might not be so useful now, I see it as being potentially useful, particularly if in the future we add $op = 'load' or $op = 'delete' - potential use cases for the future. On the other hand, we could get rid of it by moving a few lines of code. If it's a deal breaker for you, I'll cave.
Comment #5
arthurf commentedI hope I'm not overstepping things, but I'd like to make this functional on Media Mover so that it can provide files to translations. I'll post my code here when I submit it for reference.
Comment #6
arthurf commentedThere is some experimental code here:
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/media_mover...
I haven't fully experimented with it, but it's an idea.
Comment #7
drewish commentedI'd think that any big changes like this would need to happen on HEAD first and then a consider doing a backport.
Comment #8
Bevan commented#370449: Provide a hook_synchronize() was marked duplicate
Comment #9
mfbWhat's the current status? I'd like to get i18nsync and Media Mover working together happily on Drupal 6.
Comment #10
jose reyero commentedAgree with drewish. New features are for 6.x only. The patch needs updating.
Comment #11
jose reyero commented#1303518: Clean up the issue tracker. Close old issues without follow up.