hi

i'm impressed - your module works nearly out of the box - very well done - asside of suxxx i18n!

i installed your lovely module on a site that already exist... there are many pages and they are all created in german.

how can i import them in the localizer table and set them to german?

i'd like to explain the bug that comes up to me...

1. i click on the translation tab of an old german node/14 (as example)
2. translation tab tells me "no" german and english translation (asside, this is wrong - the node is german!)
3. then i click "create german translation"
4. the german text of the node/14 appears and i simply press save.
5. what happen? a node node/45 is created with my german translation of the german node/14 text
6. ok go forward... i create the english translation, press save and a node/46 is created.
7. now let's go back to the menu and review if everything is ok
8. nope, my old node/14 display my german text (ok), but translation tab says, there is NO translation done!!!

after some time i found out this is caused, while there is no import of existing nodes and i can possibly (not sure yet) prevent this by first edit all my nodes !???

1. administer > content > edit
2. set up the locate DE to all my old DE nodes and save the nodes (this will change the nodes date - i don't like do do this)
3. then translate to English with the node translation tab

be assured, this logic makes me totally confused and i think this should be documented very fast and an first time SQL import logic should be described. i don't like to do this import by editing all my nodes by hand. This will change all node dates and i'd like to prevent this.

Alex

Comments

Roberto Gerola’s picture

Yes. You are right.
This feature was available until one of the last releases.

I'll add it again.

Thanks for your feedback.

Roberto.

--
http://www.speedtech.it/drupal/localizermodule

hass’s picture

It looks like this errors are related:

Duplicate entry 'de-14' for key 2 query: localizernode_nodeapi INSERT INTO localizernode (nid, locale, pid) VALUES (14, 'de', 14) in C:\Inetpub\wwwroot\drupal\includes\database.mysqli.inc on line 122.

‚Duplicate entry 'en-43' for key 2 query: localizernode_form_submit UPDATE localizernode SET pid = 43 WHERE nid=41‘ in ‚C:\Inetpub\wwwroot\drupal\includes\database.mysqli.inc‘ in Zeile 122.

hass’s picture

i hope this SQL workaround will import my german nodes correctly!?

INSERT INTO localizernode ( nid,locale,pid )
SELECT nid,'de' as locale, nid FROM node n;
Roberto Gerola’s picture

If your MySQL supports subselects, you could use this SQL code :

INSERT INTO localizernode (nid,locale,pid) SELECT n.nid,'de',n.nid FROM node n WHERE n.nid NOT IN (SELECT nid FROM localizernode)

Roberto

Roberto Gerola’s picture

Status: Active » Fixed

Hi.
Implemented in localizernode.install the necessary sql code for updating all the nodes.

(Drupal 4.7.4) : http://cvs.drupal.org/viewcvs/drupal/contributions/modules/localizer/?on...
(Drupal 5RC1) : http://cvs.drupal.org/viewcvs/drupal/contributions/modules/localizer/?on...

Roberto

--
http://www.speedtech.it/drupal/localizermodule

Roberto Gerola’s picture

Status: Fixed » Closed (fixed)