I have a site with quite a lot of content (over a thousand nodes) where most of the content is translated. Some (untranslated) content has been there for some time and now, when we use the "select node" (under Translation) we get 24 pages of content where the translation might be. This makes it very hard to use the translation system.
I know it's possible to use the "create translation" system, but it's not convenient content that is already in ... and sometimes (especially when using category.module) using this interface makes the node appear under the wrong menu (as the translation is created in the original language).
It would be very nice, useful and appreciated to have a third way of associating translations : an interface where it's possible to just type in the translation node id.
Another solution to this would be filters on what is displayed on the "select node" page : for one thing, making it possible to hide nodes already associated with a translation set would be nice. Adding the possibility to "order" the displayed nodes (by title, date, etc.) could be nice, but I don't think it would solve my problem.
I would be interested in working on this, though I would like to get some pointers and some feedback regarding feasibility .. and how welcomed this feature would be.
Mathieu
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | translation5-selectnode_2.patch | 2.91 KB | davemybes |
| #7 | translation-selectnode_1.patch | 2.74 KB | davemybes |
| #3 | translation_selectnode.patch | 2.66 KB | davemybes |
Comments
Comment #1
davemybes commentedHi mathieu
+1 for this idea. The ability to enter in a node id would be great. I had the same problem on a site with three languages - two in chinese, making it really hard for me to figure out what node is what.
Filtering the pages would be a nice addition too, but definitely the node id bit would be the most useful initially. I might take a look at the code myself when I have a bit more time to do it.
Comment #2
jose reyero commented+1 for the idea
You can add a texbox for the nid, or an ajax textfield with autocomplete for node title or both, it would be cool.
Comment #3
davemybes commentedI've had a go at trying to implement this feature using a textfield where you can enter either the exact node id, or the first few letters of the title and have it autolookup the full title name (it does not lookup the node id). It then returns the nid, which is submitted and assigned as the translation. It appears to be working well on my system, but let me know if you find any problems. The patch is against the April 4th release of 5.x-2.0.
Comment #4
mathieu commentedWow! Today was day semi-off for me, I never expected to see this progress so fast. Incrn8, if we meet this Sunday at the next mtl meetup (which I think will be more "coder-oriented"), we can test/improve this together. In any way, I'll test out this out as soon as I can!
Comment #5
davemybes commentedmathieu, sounds like a plan to me. So far I'm on track to be at the Sunday meeting. I'll check the Group for more details.
Comment #6
mathieu commentedThis works great .. and it's fast! Any chance it could go in the next version? :)
Comment #7
davemybes commentedHere is an updated patch for the April 4, 2007, 5.x-2.0 version. I have also refined the text and the lookup a little bit. Let me know if there are any problems.
Comment #8
mathieu commentedApplies cleanly, works well... and I would really love to have that in the next version. :)
Comment #9
jose reyero commentedI've tried it and it works, I like it.
But the permissions for the autocomplete callback are not right. I think we should use a general 'translate nodes' permission for the hook plus some db_rewrite on the query so the user dont see nodes he's not suppossed to see.
And this query...
The $node->nid seems a bug, but also: Can't we pass language as a different parameter? And check the parameters to see whether it is a string or a number before we throw these loose queries? (I guess it wont be too hard to make this query break with some inputs...)
Comment #10
davemybes commentedThanks for the comments, Jose, I'll work on implementing them in the next couple of days. I also didn't really like the way I was passing the language parameter, but I couldn't get it to work any other way. I'll take another look at that and see what I can come up with.
Comment #11
davemybes commentedAlright, here is an improved patch that hopefully addresses all of Jose's concerns. Let me know if its good enough :)
Comment #12
mathieu commentedI just tried the patch on a site with i18n-5.x-2.1 and it works well.
Comment #13
jose reyero commentedYes, this is much better :-)
I've applied this with just a few changes
Nice job, thanks
Comment #14
davemybes commentedThanks for putting that in, Jose. Much appreciated.
Comment #15
(not verified) commented