alexxed / narro

Automatically exported from code.google.com/p/narro
2 stars 4 forks source link

& in properties files is wrongly detected as an access key #309

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I got https://bugzilla.mozilla.org/show_bug.cgi?id=757784 filed against 
Armenian.
When I looked deeper I noticed that the original en-US strings were imported 
into Narro incorrectly.

The "&" has dissapeared when imported.

-errUnescapedAmpersandInterpretedAsCharacterReference=The string following 
“” was interpreted as a character reference. (“” probably should have 
been escaped as “amp;”.)
-errNotSemicolonTerminated=Named character reference was not terminated by a 
semicolon. (Or “” should have been escaped as “amp;”.)
-errNoNamedCharacterMatch=“” did not start a character reference. (“” 
probably should have been escaped as “amp;”.)
+errUnescapedAmpersandInterpretedAsCharacterReference=The string following 
“&” was interpreted as a character reference. (“&” probably should have 
been escaped as “&”.)
+errNotSemicolonTerminated=Named character reference was not terminated by a 
semicolon. (Or “&” should have been escaped as “&”.)
+errNoNamedCharacterMatch=“&” did not start a character reference. (“&” 
probably should have been escaped as “&”.)

Original issue reported on code.google.com by arme...@gmail.com on 23 May 2012 at 1:16

GoogleCodeExporter commented 9 years ago
I managed to reproduce this with the attached file. Seems to be happening when 
\u201C unicode characters are placed before &.

Original comment by alex...@gmail.com on 24 Jul 2012 at 3:57

Attachments:

GoogleCodeExporter commented 9 years ago
But this happens in the source file, which is one bug, and the other bug that I 
suspect is that if the text source changes but the translation file is on the 
disk, the translation for the old text is imported as a translation for the new 
text.

All in all, the automatic import should *not* add translations.

Original comment by alex...@gmail.com on 24 Jul 2012 at 3:58

GoogleCodeExporter commented 9 years ago
Fixed both problems, running an import now to fix the source texts; 
theoretically, this should fix the targets too, because the & was deleted in 
some cases because it was seen as an access key, but will have to confirm that.

Original comment by alex...@gmail.com on 24 Jul 2012 at 4:44

GoogleCodeExporter commented 9 years ago
Also deleted the translations that had amp instead of &

Original comment by alex...@gmail.com on 24 Jul 2012 at 6:27