i18n Messages and the need for double quotes to generate a single quote

406 views
Skip to first unread message

Raphael André Bauer

unread,
Nov 27, 2013, 4:23:51 AM11/27/13
to google-web-toolkit
Hi,



we are currently translating one of our applications.
We are using regular properties files that generate a
com.google.gwt.i18n.client.Messages interface.

One "strange" thing for us is that our translation department has to
use double quotes to generate single
quotes in those files ('' => '). Of course we could use the Constants
interface, but this would not allow us to
use placeholders.

So I am wondering if I am missing something obvious. Is there a way
around the need to double the quotes all
the time?


Any suggestion welcome!

Thanks!


Raphael

Thomas Broyer

unread,
Nov 27, 2013, 4:46:17 AM11/27/13
to google-we...@googlegroups.com


On Wednesday, November 27, 2013 10:23:51 AM UTC+1, Raphael Bauer wrote:
Hi,



we are currently translating one of our applications.
We are using regular properties files that generate a
com.google.gwt.i18n.client.Messages interface.

One "strange" thing for us is that our translation department has to
use double quotes to generate single
quotes in those files ('' => ').

Note: it's not "a double quote" (U+0022) but "two single quotes" (U+0027 U+0027)
 
Of course we could use the Constants
interface, but this would not allow us to
use placeholders.

So I am wondering if I am missing something obvious. Is there a way
around the need to double the quotes all
the time?

No. This constraint/feature comes from Java's own MessageFormat where U+0027 has a special meaning.
In other words, you'd have the same issue if you used MessageFormat in your Java code (server side, desktop app, mobile app, etc.)

Raphael André Bauer

unread,
Nov 27, 2013, 4:49:23 AM11/27/13
to google-web-toolkit
On Wed, Nov 27, 2013 at 10:46 AM, Thomas Broyer <t.br...@gmail.com> wrote:
>
>
> On Wednesday, November 27, 2013 10:23:51 AM UTC+1, Raphael Bauer wrote:
>>
>> Hi,
>>
>>
>>
>> we are currently translating one of our applications.
>> We are using regular properties files that generate a
>> com.google.gwt.i18n.client.Messages interface.
>>
>> One "strange" thing for us is that our translation department has to
>> use double quotes to generate single
>> quotes in those files ('' => ').
>
>
> Note: it's not "a double quote" (U+0022) but "two single quotes" (U+0027
> U+0027)

Actually that's what I meant - bad English lang skills I guess ;)

>
>>
>> Of course we could use the Constants
>> interface, but this would not allow us to
>> use placeholders.
>>
>> So I am wondering if I am missing something obvious. Is there a way
>> around the need to double the quotes all
>> the time?
>
>
> No. This constraint/feature comes from Java's own MessageFormat where U+0027
> has a special meaning.
> In other words, you'd have the same issue if you used MessageFormat in your
> Java code (server side, desktop app, mobile app, etc.)

Good to know...

Thanks for your answer!


Best,

Raphael

Raphael André Bauer

unread,
Nov 28, 2013, 8:37:57 AM11/28/13
to google-web-toolkit
Following up on that.
What application do you recommend to make the translation of
properties files in MessageFormat simple?
The application should be easy to use for the translation department
(non-tech people).


Any recommendations?


Thanks!

Raphael
--
inc: http://ars-machina.raphaelbauer.com
tech: http://ars-codia.raphaelbauer.com
web: http://raphaelbauer.com
Reply all
Reply to author
Forward
0 new messages