Hi, While testing the Danish language files I just found another bug, but in this case the cause is in the original english files. So probably it is an issue for all languages? In the original english texts (staff-client 3.12) you will find this line. No quotes available. Please use the \\"Add quote\\" button to add a quote. The double backslashes are wrong. I had translated this to: Ingen citater tilgængelige. Brug knappen \\"Tilføj citat\\" for at tilføje et citat. But that way the quotes tool does not work. Now i have changed it to: Ingen citater tilgængelige. Brug knappen \"Tilføj citat\" for at tilføje et citat. and everything is fine. The error is found in Koha 3.10 and 3.12. -- Venlig hilsen Lars J. Helbo Borgergade 44, Sall DK-8450 Hammel tlf+fax: (+45) 8696 9315 lars@helbo.org www.helbo.org
Hi Lars, this looks familiar, I think I described the problem for line breaks in bug 4883 that you now encounter with the escaped quotes: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=4883 I think the answer to that is that we should not be using escape characters in translatable strings like this and need to fix it in the templates. What you could do for now is translate those strings without using \ at all, by rephrasing or using single quotes. Hope this helps, Katrin
-----Original Message----- From: koha-translate-bounces@lists.koha-community.org [mailto:koha- translate-bounces@lists.koha-community.org] On Behalf Of Lars J. Helbo Sent: Wednesday, May 29, 2013 5:55 PM To: Koha-org - Translate list Subject: [Koha-translate] Error in english po-files
Hi,
While testing the Danish language files I just found another bug, but in this case the cause is in the original english files. So probably it is an issue for all languages?
In the original english texts (staff-client 3.12) you will find this line.
No quotes available. Please use the \\"Add quote\\" button to add a quote.
The double backslashes are wrong. I had translated this to:
Ingen citater tilgængelige. Brug knappen \\"Tilføj citat\\" for at tilføje et citat.
But that way the quotes tool does not work. Now i have changed it to:
Ingen citater tilgængelige. Brug knappen \"Tilføj citat\" for at tilføje et citat.
and everything is fine. The error is found in Koha 3.10 and 3.12. -- Venlig hilsen Lars J. Helbo Borgergade 44, Sall DK-8450 Hammel tlf+fax: (+45) 8696 9315 lars@helbo.org www.helbo.org _______________________________________________ Koha-translate mailing list Koha-translate@lists.koha-community.org http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-translate website: www.koha-community.org git: git.koha-community.org bugs: bugs.koha-community.org
There is indeed a problem. Actually in 3.12.x sources, we have in da-DK PO file : #. SCRIPT #: intranet-tmpl/prog/en/modules/tools/quotes.tt:11 msgid "" "No quotes available. Please use the \\\"Add quote\\\" button to add a quote." msgstr "" "Ingen citater tilgængelige. Brug knappen \\\"Tilføj citat\\\" for at tilføje " "et citat." For translating Javascript string : _("No quotes available. Please use the \"Add quote\" button to add a quote."); The Bug 8942 introduced the exclusive double-quotes usage for strings in JS, so inside double-quotes must be escaped. The problem is that actually, the translated string is : _("Ingen citater tilgængelige. Brug knappen \\"Tilføj citat\\" for at tilføje et citat."); It seems that back-slash in original string must be escaped by not in translated string. This appears in some other strings like : "Line \n", ... So the solution is to use single back-slash in translated string where there is a double in original string. You mays correct by using inside single quotes. But, do not use single-quotes as string delimiter. I will work on this for French translation. Rgards, Le 29/05/2013 17:54, Lars J. Helbo a écrit :
Hi,
While testing the Danish language files I just found another bug, but in this case the cause is in the original english files. So probably it is an issue for all languages?
In the original english texts (staff-client 3.12) you will find this line.
No quotes available. Please use the \\"Add quote\\" button to add a quote.
The double backslashes are wrong. I had translated this to:
Ingen citater tilgængelige. Brug knappen \\"Tilføj citat\\" for at tilføje et citat.
But that way the quotes tool does not work. Now i have changed it to:
Ingen citater tilgængelige. Brug knappen \"Tilføj citat\" for at tilføje et citat.
and everything is fine. The error is found in Koha 3.10 and 3.12.
-- Fridolyn SOMERS Biblibre - Pôle support fridolyn.somers@biblibre.com
Thank you, yes now I understand the background; but I am still uncertain about how it happened. The problem is that I can no longer recreate the problem. In Pootle it is term 6328. In the source it says: "No quotes available. Please use the \\"Add quote\\" button to add a quote." (double backslash). If I write single backslash in the translation like this: "Ingen citater tilgængelige. Brug knappen \"Tilføj citat\" for at tilføje et citat." and send it. The backslashes are automatically doubled. So if I return to term 6328, it looks like this "Ingen citater tilgængelige. Brug knappen \\"Tilføj citat\\" for at tilføje et citat." But if I download the po-file, it looks like this: "Ingen citater tilgængelige. Brug knappen \\\"Tilføj citat\\\" for at tilføje et citat. I also tried to write double backslash in the translation. In that case they remain as double and download as tripple. In both cases the downloaded po-file has triple backslash and works fine. So based on this it looks as if there is no problem. However, the first time, I installed the translation, it did not work. And I am pretty sure this was because that po-file had double backslash in this term (not triple as they should have been). But now I can not recreate this condition. That makes me wonder, if the problem is caused by the po-update tool? This term was also found in version 3.10. Maybe the error came during the update and disappeared, when I edited the term the first time - not because of what I wrote, but because I edited it? Den 06-06-2013 09:56, Fridolyn SOMERS skrev:
There is indeed a problem.
Actually in 3.12.x sources, we have in da-DK PO file :
#. SCRIPT #: intranet-tmpl/prog/en/modules/tools/quotes.tt:11 msgid "" "No quotes available. Please use the \\\"Add quote\\\" button to add a quote." msgstr "" "Ingen citater tilgængelige. Brug knappen \\\"Tilføj citat\\\" for at tilføje " "et citat."
For translating Javascript string : _("No quotes available. Please use the \"Add quote\" button to add a quote.");
The Bug 8942 introduced the exclusive double-quotes usage for strings in JS, so inside double-quotes must be escaped.
The problem is that actually, the translated string is : _("Ingen citater tilgængelige. Brug knappen \\"Tilføj citat\\" for at tilføje et citat.");
It seems that back-slash in original string must be escaped by not in translated string. This appears in some other strings like : "Line \n", ... So the solution is to use single back-slash in translated string where there is a double in original string.
You mays correct by using inside single quotes. But, do not use single-quotes as string delimiter.
I will work on this for French translation.
Rgards,
Le 29/05/2013 17:54, Lars J. Helbo a écrit :
Hi,
While testing the Danish language files I just found another bug, but in this case the cause is in the original english files. So probably it is an issue for all languages?
In the original english texts (staff-client 3.12) you will find this line.
No quotes available. Please use the \\"Add quote\\" button to add a quote.
The double backslashes are wrong. I had translated this to:
Ingen citater tilgængelige. Brug knappen \\"Tilføj citat\\" for at tilføje et citat.
But that way the quotes tool does not work. Now i have changed it to:
Ingen citater tilgængelige. Brug knappen \"Tilføj citat\" for at tilføje et citat.
and everything is fine. The error is found in Koha 3.10 and 3.12.
participants (3)
-
Fischer, Katrin -
Fridolyn SOMERS -
Lars J. Helbo