globalize icon indicating copy to clipboard operation
globalize copied to clipboard

Doesn't loadMessages stumble on { } in message value?

Open Setogit opened this issue 10 years ago • 3 comments

query/globalize v1.1.1

loadMessages fails to load a certain message. Not fully debugged yet, but simply removing { } characters from the message VALUE helps; at least, the message (without { }) is loaded.

Is this a known issue? I know {} cannot be used in KEY: https://github.com/jquery/globalize/blob/master/doc/api/message/load-messages.md:

JSON object of messages data. Keys can use any character, except /, { and }. Values (i.e., the message content itself) can contain any character.

Setogit avatar Feb 21 '16 05:02 Setogit

{} are reserved characters of ICU MessageFormat. Read on SlexAxton/messageFormatter.js for more information on regard. Anyway, please could you provide examples of what you're trying to load and what error you get?

rxaviers avatar Feb 21 '16 18:02 rxaviers

Got that: "{} are reserved characters of ICU MessageFormat." Came up with a design B on my side. closing.

Setogit avatar Apr 07 '16 15:04 Setogit

Ok. Please would you change anything in the docs to make that clear and other users avoid this problem?

rxaviers avatar Apr 07 '16 17:04 rxaviers