Open dankurka opened 9 years ago
I'm also having this issue using IE9 on a Win7 system. It is making localization into
French (which uses apostrophe a lot) almost impossible. Is this going to be fixed?
If so, will it be fixed any time soon?
Reported by pat_grever@hp.com
on 2012-03-16 16:14:27
Please take care of this issue.
Without the possibility to write the translations in a "readable" format it will be
very difficult to handle with french language (or any other language with "'"s...).
I can't tell my translators do double the "'"s.
Reported by dr.thomaslang
on 2012-04-10 08:53:27
@googleybear: they are different because Constants doesn't have the need to represent
arguments in the message, so no quoting is required. Aside from Map<String,String>
support, what would Constants add over Messages for strings if this were changed.
More importantly, it would break every existing user of Constants.
From the referenced StackOverflow post, it sounds like you are trying to use the same
key/value pair in both a Constants interface and a Messages interface (via UiBinder)
-- why not just use Messages for both? Otherwise, this sounds more like a request
for adding Constants support to UiBinder.
@dr.thomaslang: the problem is you have characters which have special meaning in a
MessageFormat-style message, and if you don't have quoting how can you tell which is
which? For example:
'{0}' is how you specify an argument
vs
''{0}'' is a quoted argument
If you automatically doubled every quote in the translations, there would be no way
to include braces in the translated text, for example.
I would expect this is handled in whatever translation system you are using, for example
the second one might be shown as single quotes around whatever represents a replaceable/non-translatable
argument (typically using the name or example of that argument), and then when you
get the translation back you convert it appropriately.
The only viable alternative would be to treat ' as literal if the next character wasn't
a brace or you were already in a quoted section, which is what ICU did in version 4.8
(see http://icu-project.org/apiref/icu4j/com/ibm/icu/text/MessagePattern.ApostropheMode.html
). However, changing it at this point would break some translations, which seems bad.
Reported by jat@google.com
on 2012-04-22 03:44:28
AsDesigned
Actually, I thought of a way where we could do this without breaking backwards compatibility
-- basically, an annotation that could be applied to the interface or a method specifying
the quoting style -- REQUIRED_QUOTES, OPTIONAL_QUOTES, NO_QUOTES.
Constants would default to NO_QUOTES and Messages would default to REQUIRED_QUOTES,
but you could override either.
Reported by jat@google.com
on 2012-04-23 15:33:18
Accepted
Originally reported on Google Code with ID 6647
Reported by
googelybear
on 2011-08-02 22:17:42