I imported the general.pot from cvs in a po catalog file using poEdit, I translated 166 (of the 202) terms, left 36 untranslated, and imported my po file, selecting "Strings in the uploaded file replace existing ones, new ones are added")

The translation was successfully imported. There are 169 newly created translated strings and 0 strings were updated.

So far so good. It worked. The number 169 (instead of 166) was probably because of the plurals.
Then I edited 1 of the 166 translated terms in poEdit and imported the po file again. Now import tells me:

The translation was successfully imported. There are 36 newly created translated strings and 0 strings were updated.

Drupal still uses the old unedited translated term.
I think it adds the untranslated terms and ignores the edited translated terms.

Except if my procedure is not the right way to do it. Please someone verify.

CommentFileSizeAuthor
#6 locale_mode_0.patch2.79 KBkkaefer
#4 locale_mode.patch2.79 KBkkaefer
#2 el.po34.95 KBcog.rusty

Comments

steph’s picture

Can you attach the po file you are using with the 166 translations?

It would be nice, thanks.

cog.rusty’s picture

StatusFileSize
new34.95 KB

Here it is.

kkaefer’s picture

I am able to reproduce this error, even with different translation files. Obviously it is not just the one file that causes the error.

kkaefer’s picture

StatusFileSize
new2.79 KB

Figured out that the patch http://drupal.org/node/47610 broke this. The $mode parameter is not passed to the function _locale_import_one_string() but this value is used in the function (and if it's undefined/empty, the overwrite mode is not handled correctly). The attached patch adds the $mode parameter to all function calls and to the function itself. Of course, this patch works for me ;-).

kkaefer’s picture

Assigned: Unassigned » kkaefer
Status: Active » Needs review
kkaefer’s picture

StatusFileSize
new2.79 KB

Mixed the two parameters up in one line. Fixed patch attached.

dopry’s picture

+.02 ... since I didn't actually test it.
Don't use locale but the code style looks good. A quick over look of Goba's patch and this patch, makes it seem like we keep the speedups, and locale should be working right.

chx’s picture

Status: Needs review » Reviewed & tested by the community

good job.

killes@www.drop.org’s picture

Status: Reviewed & tested by the community » Fixed

applied

Anonymous’s picture

Status: Fixed » Closed (fixed)