[WG: I18N & L10N] Single quotes issue with crowdin

Alex Ballesté alexandre.balleste at udl.cat
Wed Apr 2 01:52:14 PDT 2014


Don't worry about that. It's a bit confusing all this stuff :-D. I use 
this message to update you about my conversations with crowdin support:

1st Crowding response about this issue:
-------------------------
As you may know, it's possible to enable/disable single quotes escaping 
in *.properties files (project settings -> file manager -> "Edit" button 
across the file -> at the bottom you will find "File export options".

Most likely that "Escape single quote by another single quote" option is 
enabled for mentioned file (assignment.properties). That's why all 
single quotes are escaped in exported file.

We are checking your issue. Probably there is something we need to improve.
-------------------------

At this point I saw that there are files with this option enabled and 
others not. :-( . But why? I asked this.

-----------------------------
Ok, that is part of our problem. I'll revise which files are marked to 
escape simple quotes repeating the quote.

In the other hand I tried to upload assignment_ca.properties (once I've 
changed the escaping option) to put all the strings that have to had two 
simple quotes back  (ex:" S''ha produït .... {0} ") , and seems that 
values were imported with just one simple quote, because when I 
validated the translations and downloaded it again those strings were 
with just one.
(ex:"  S'ha produït ... {0} ").  Is this the normal behaviour? Is there 
any other import option that I should mark? Do I have to restore them 
manually in the web editor?

-------------------------

They answered:
----------------------------

When you upload new file for translation that contains 2 single quotes [ '' ], "escape single quote by another single quote" option should be checked automatically in project settings for this file. So all single quotes will be escaped by another single quotes in exported file.

If you update existing file in the project for which "Do not escape single quote" is checked, this option will remain unchanged (even if updated file contains [ '' ]). That's expected behavior, project manager should choose preferred option manually.

Also, we will appreciate to know why do you expect single quote in the string "newassig.opedat=Data d'obertura" not to be escaped by another single quote (Data d''obertura)? Your application should display only 1 single quote (Data d'obertura). I must admit that most of our customers are using "escape single quote by another single quote" option and everything works fine for them.
-------------------------



At this point I realized that the problem is bigger than it appears because we have a lot of files that combines strings with single quote, some of them escaped and others not in the same file, but in other languages too. In english there are string that use simple quotes "didn't .. don't... " and have also this character escaped in complex strings (.. ''{0}'') . I think that in French there are some strings that uses single quotes twice to escape things like that: ''{0}''

So, I've written another email explaining out situation.

----------

Answering your question about why we don't want the single quote
     twice in a bundle strings like  newassig.opedat=Data d'obertura

     Well, It depends on the method is used to render the string. If you
     use the method getString of the resource bundle or using the
     MessageFormat to render the string with their matching values. We
     use the first method for normal strings and the second for the
     strings that must include object rendering ( ... {0} .. {1}).

     The getString() method renders the "twice simple quote" as two
     simple quotes instead the MessageFormat that escapes them.

     In the assignmets_ca.properties you can find a header that explains
     this behaviour:

# There's an interesting and buggy behavior in java resource bundles.
When the
# MessageFormat api is used to replace placeholders with strings (e.g.
Assignment
# {0} has been deleted.), the single quote character must be "escaped" by
doubling
# the single quote.
#
# So, in the following message:
#
# "You have successfully updated assignment {0}. Scores have been entered
# previously for this assignment. Pre-existing scores will not be adjusted
if the
# assignment's point value has changed."
#
# you must use two single quotes like so:
# "... the assignment''s point value has changed."
#
# When not using the MessageFormat api (when no placeholders are needed), the
# single quote works, and two single quotes are displayed as -- you
guessed it --
# two single quotes.
#
# More details of this bug are available here:
#http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4293229


     In our case in catalan files or english, we have strings with simple
     quotes that are handled by getString and others handled by
     MessageFormat in the same file.

     Is there any way to avoid the automatic quote checking when
     importing and keep it editing them manually?
----------

Now I'm waiting for the last episode, but I see this like a serious problem and it can make that we (catalan translators) have to stop using this platform, and depending on how is handled maybe all languages would be affected.

Alex.

PD: Sorry for the long message.



On 04/02/2014 10:23 AM, Jean-Francois Leveque wrote:
> Sorry, forgot you're managing the "catalan" locale, S2U is kind of 
> confusing because it's about Spanish being in Spain, not Spanish the 
> language.
>
> Hope you will forgive me proposing a Spanish solution. :(
>
> J-F
>
> On 01/04/2014 11:28, Alex Ballesté wrote:
>> The recommendation for "catalan" for apostrophe is to use ASCII 39 ' . I
>> believe that if we'd apply the same solution you apply for french it
>> wouldn't be well accepted for our users. :-( So I'll try asking to
>> crowdin team and I'll keep i18n list updated.
>>
>> Thanks for your suggestions
>>
>> Alex
>>
>> On 04/01/2014 11:01 AM, Jean-Francois Leveque wrote:
>>> Hi all,
>>>
>>> The solution I've found in French is to stop using single quote when
>>> this happens. I also try not to use double quote. The French
>>> translation team members, myself included, sometimes forget.
>>>
>>> When an apostrophe is needed, I use U+2019.
>>>
>>> When I have to do quoting, I do it the French way with U+00AB and
>>> U+00BB. According to the French wikipedia page on the subject
>>> http://fr.wikipedia.org/wiki/Guillemet, they also are preferred in
>>> Spanish.
>>>
>>> Hope this helps.
>>>
>>> Asking Crowdin support is also a good idea.
>>>
>>> J-F
>>>
>>> On 01/04/2014 10:30, Mark Breuker wrote:
>>>> Hi Alex,
>>>>
>>>> Perhaps you can ask Crowdin support?
>>>>
>>>> https://crowdin.net/contacts
>>>>
>>>> Mark
>>>> Mark Breuker
>>>> Functioneel Consultant
>>>> Tel.: +31 71 5451 203
>>>> Leidse Onderwijsinstellingen bv
>>>> Leidsedreef 2
>>>> 2352 BA Leiderdorp
>>>> www.loi.nl
>>>> ________________________________________
>>>> Van: i18n-bounces at collab.sakaiproject.org
>>>> [i18n-bounces at collab.sakaiproject.org] namens Alex Ballesté
>>>> [alexandre.balleste at udl.cat]
>>>> Verzonden: dinsdag 1 april 2014 10:22
>>>> Aan: i18n at collab.sakaiproject.org
>>>> Onderwerp: [WG: I18N & L10N] Single quotes issue with crowdin
>>>>
>>>> Hi, we detected an strange behaviour in crowdin that makes translation
>>>> more difficult for us.
>>>>
>>>> In sakai (or other java system that uses Message properties), when an
>>>> string bundle has an operator like {0} in the sentence and also 
>>>> contains
>>>> single quote characters ' ,  all this characters must be escaped 
>>>> putting
>>>> 2 single quotes. It's a bit tricky because only works for sentences 
>>>> with
>>>> {} operators.
>>>>
>>>> Example of how to write single quotes in order to be printed 
>>>> correctly:
>>>>
>>>> catalan:
>>>>
>>>> newope=La nova data d''obertura de l''activitat ''{0}'' \u00E9s {1}
>>>>
>>>> newassig.opedat=Data d'obertura
>>>>
>>>>
>>>> french :
>>>>
>>>> newope=Nouvelle date d''ouverture {1} pour le devoir ''{0}''.
>>>>
>>>> newassig.opedat=Date d'ouverture
>>>>
>>>>
>>>>
>>>> When you look at crowdin web you see:
>>>>
>>>> La nova data d'obertura de l'activitat '{0}' és {1}
>>>>
>>>> and
>>>>
>>>> Data d'obertura
>>>>
>>>> It seems correct at first look. You can think that later it'll handle
>>>> correctly in the download, but when you download the zip file you got.
>>>>
>>>>
>>>> newope=La nova data d''obertura de l''activitat ''{0}'' \u00E9s {1}
>>>> (OK it was escaped)
>>>>
>>>> newassig.opedat=Data d''obertura  (UPPPSSSS it must not be escaped)
>>>>
>>>> Is there a solution for this? We didn't find any options to handle 
>>>> that.
>>>> Do you know how to do it correctly? We will try to correct it manually
>>>> if there isn't a valid solution, but it's a lot of work.
>>>>
>>>> Thanks in advance.
>>>>
>>>> Alex.
>>>>
>>>> -- 
>>>> Alexandre Ballesté Crevillén  alexandre.balleste at udl.cat
>>>> =====================
>>>> Universitat de Lleida
>>>> Àrea de sistemes d'Informació i Comunicacions
>>>> Analista/Programador
>>>>
>>>> University of Lleida
>>>> Information and Communication Systems Service
>>>> Analyst / Programmer
>>>>
>>>> Tlf: +34 973 702148
>>>> Fax: +34 973 702130
>>>> =====================
>>>>
>>>> Avís legal/Aviso legal/Avertiment legal/Legal notice
>>>> http://www.imatge.udl.cat/avis_legal_lopd.html
>>>>
>>>> _______________________________________________
>>>> i18n mailing list
>>>> i18n at collab.sakaiproject.org
>>>> http://collab.sakaiproject.org/mailman/listinfo/i18n
>>>>
>>>> TO UNSUBSCRIBE: send email to
>>>> i18n-unsubscribe at collab.sakaiproject.org with a subject of 
>>>> "unsubscribe"
>>>> _______________________________________________
>>>> i18n mailing list
>>>> i18n at collab.sakaiproject.org
>>>> http://collab.sakaiproject.org/mailman/listinfo/i18n
>>>>
>>>> TO UNSUBSCRIBE: send email to
>>>> i18n-unsubscribe at collab.sakaiproject.org with a subject of 
>>>> "unsubscribe"
>


-- 
Alexandre Ballesté Crevillén  alexandre.balleste at udl.cat
=====================
Universitat de Lleida
Àrea de sistemes d'Informació i Comunicacions
Analista/Programador

University of Lleida
Information and Communication Systems Service
Analyst / Programmer

Tlf: +34 973 702148
Fax: +34 973 702130
=====================

Avís legal/Aviso legal/Avertiment legal/Legal notice
http://www.imatge.udl.cat/avis_legal_lopd.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/i18n/attachments/20140402/79ed061d/attachment-0001.html 


More information about the i18n mailing list