rodionmoiseev / c10n

A Java library, focused on making internationalisation more modular, easier to evolve and maintain, robust-to-change and IDE-friendly without excess of external tools.
Apache License 2.0
67 stars 10 forks source link

Apostrophe character disappears #22

Closed paolofulgoni closed 10 years ago

paolofulgoni commented 10 years ago

Consider a translation containing the apostrophe char ' like in the following example:

interface Messages {
    @It("L\'Italiano")
    String apostropheIssue();
}

Calling the apostropheIssue() method on the concrete class generated by C10N will result in the string LItaliano (i.e. the apostrophe is missing).

I've just created a JUnit test for this that I'm going to commit...

rodionmoiseev commented 10 years ago

Could you please check that you are simply not hitting a MessageFormat syntax issue? I believe single quote has to be escaped as two consequtive single quotes.

You can also disable MessageFormat'ting with raw=false. See here: https://github.com/rodionmoiseev/c10n/wiki/Overview#disabling-message-formatting

paolofulgoni commented 10 years ago

You're perfectly right, sorry for wasting your time!

rodionmoiseev commented 10 years ago

No probs, thanks.