Confirmation for removing last email always displays in English #2492

Closed
merike opened this Issue Sep 16, 2012 · 7 comments

Projects

None yet

5 participants

@merike
merike commented Sep 16, 2012

When trying to remove my email from Persona (https://translate.personatest.org/) I get:

Removing the last address will cancel your Persona account.
Are you sure you want to continue?

This is actually translated for Estonian but never displays. Currently also seeing the same for pl and it for example.

@shane-tomlinson
Member

In client.po, this strong looks like:

msgid ""
"Removing the last address will cancel your Persona account.\n"
"Are you sure you want to continue?"    

In es/client.json, this is converted to:

"Removing the last address will cancel your Persona account.\\nAre you sure you want to continue?": [                                                         
    null,
   "Al eliminar la última dirección se cancelará tu cuenta en Mozilla Persona.\\n¿Seguro que deseas continuar?"
],

where the original \n is converted to \\n.

With the added \, the string is not correctly matched. Manually removing the extra \ correctly causes the string to match.

@shane-tomlinson
Member

po2json.js is converting \n to \\n, but I do not yet understand where.

I have made a temporary fix for this in compile-json.sh, but this seems like it should be moved into po2json.js:

Index: compile-json.sh
===================================================================
--- compile-json.sh (revision 109156)
+++ compile-json.sh (working copy)
@@ -31,7 +31,8 @@
     jsonfile="$2/${lang}/${stem}.json"
     mkdir -p $2/${lang}
     echo -n ";var json_locale_data = " > $jsonfile
-    $1/po2json.js -p  $pofile >> $jsonfile
+    ## po2json converts \n to \\n. use sed to convert back
+    $1/po2json.js -p  $pofile | sed 's/\\\\n/\\n/g' >> $jsonfile
     echo ";" >> $jsonfile
 done
 rm $lockfile
@zaach zaach was assigned Sep 18, 2012
@zaach zaach added a commit to zaach/i18n-abide that referenced this issue Sep 20, 2012
@zaach zaach Fix linebreak escaping issue mozilla/persona#2492 and #10 1634475
@shane-tomlinson shane-tomlinson added a commit that referenced this issue Apr 3, 2013
@shane-tomlinson shane-tomlinson Use the compile-json from i18n-abide instead of the one from the svn …
…repo

Fixes the problem of "Removing the last address will cancel your Persona account" always being in English.

fixes #2492
b4ab3b3
@shane-tomlinson shane-tomlinson added a commit that closed this issue Apr 3, 2013
@shane-tomlinson shane-tomlinson Use the compile-json from i18n-abide instead of the one from the svn …
…repo

Fixes the problem of "Removing the last address will cancel your Persona account" always being in English.

fixes #2492
b4ab3b3
@jrgm
Member
jrgm commented May 13, 2013

Actually, in train-2013.04.26, this text is still always in English despite Chrome or Firefox being in German or Estonian. Sorry, to the late check of this on this train.

@jrgm jrgm reopened this May 13, 2013
@mathjazz
Contributor

2 users reported this is still an issue. Cannot check if it's still the case in the latest train, because of #3646.

@mathjazz
Contributor

#3646 is now fixed and I cannot reproduce this issue anymore. Waiting for localizers to confirm.

@mathjazz
Contributor

Confirmed to be working. This bug can be closed now.

@jrgm
Member
jrgm commented Jul 12, 2013

Yep. Thanks @mathjazz. Looks right to me in et, de, pl, es, zh-CN. Closing.

@jrgm jrgm closed this Jul 12, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment