Posted by markfoodyburton on June 21, 2007 at 12:17pm
Jump to:
| Project: | i18n auto translate |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
Rather than waiting for the user to start the translation process, if somebody tries to access an untranslated page, could you intercept that, and run the translation then, import it into the i18n system, warn the user, and maybe offer the user the option of making a better job of it?
Comments
#1
yep, that might be a good option too. we need to flesh out the module first, and figure out the right workflow for that. thanks for the suggestion!
aaron winborn
#2
This is still a good idea. It will never occur on a site with the module installed from the start, as auto-translations are created when the new node is saved, however I can still see this use case affecting sites using this module "after the fact".
Moving to the 6.x-2.x branch.
#3
Re-titling. This is the preferable way to deal retrospectively with untranslated nodes, if the module is installed at a later date. It means we wouldn't have a massive batch task to do to update all nodes at once.
#4
I'm thinking, the module probably already does this. All we need to do is create a default Rule for the task. Will test.
#5
Any updates on this? I'm currently facing the same challenge--how to get preexisting content translated. I like this approach and would love to lend a hand... only problem is I've never really written a module before (!)
I'll hack away and post if I have any luck.
#6
You can probably do it with the Rules UI - you may not have to write any code. I'm not sure without trying, but I think it might be possible.
#7
Ah! Hadn't realized the option was there in Rules. Very handy and it basically works, but doesn't sync translated node(s) to the source. Rather, in my case, it takes an English node and creates two nodes with content in Spanish, marks one as English and one as Spanish, then syncs those two new ones. I guess this makes sense in the context of the original module, where the action occurs on new nodes.
Anyway, thanks for the tip, and it seems like I'm really close here... hopefully ought to be able to make this work for me. For *new* content, anyway, this module is going to be hands-down better than any similar solutions I've found!
#8
Perhaps there is a little code to write. I hadn't tried it, but sort of hoped it would 'just work', but by the sounds of it it doesn't.
So, to help me understand what's happening here:
1. You write a node in English
2. Someone tries to access the Spanish version of the node
3. Your rule is creating two nodes, both Spanish, and marking one as English
4. The old English node is effectively 'forgotten'
Is that correct?
#9
That's basically what was happening. Except because I don't know how to stop the module/rule from creating the translations *every time* the node is viewed, I get two new translations, both Spanish, one marked as English, every time a node is viewed.
And, as for #4, the old English node isn't exactly forgotten because in a production environment, it would have an established path associated with it. But basically, yeah, it's out of the loop as far as this rule is concerned. Make sense?
#10
Yes. Makes sense. Thanks for the feedback. Definitely going to need to write some code then to make this work properly! D'oh!
#11
Making title more descriptive, as I saw this and thought "you can do that already" until I reminded myself of the real issue.