[Koha-translate] Error in english po-files
Lars J. Helbo
lars at helbo.org
Thu Jun 6 16:42:48 CEST 2013
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.
>
More information about the Koha-translate
mailing list