ICU argument mismatch - single quote / apostrophe `'`
See original GitHub issueI’m seeing errors about ICU argument mismatch due to mismatched quote types surrounding the argument. I’ve reproduced in a brand new empty project using:
- ember-cli: 3.19.0
- node: 12.18.3
- os: darwin x64
My en-us.yaml file looks like this:
namingTip: Pick a name that is easy to remember, like "{example}".
and the language file (nl-nl.yaml) looks like this:
namingTip: Pick a name that is easy to remember, like '{example}'.
My application template looks like this:
<p>{{t 'namingTip' example="foo"}}</p>
When I serve the application it renders the text correctly, but I get this error during build:
[ember-intl] "namingTip" ICU argument mismatch: "nl-nl": "example"
Given the quotes are not part of the argument name I would expect they would not raise an error.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Formatting Messages | ICU Documentation
Recommendation: Use the real apostrophe (single quote) character ' (U+2019) for human-readable text, and use the ASCII apostrophe ' (U+0027) only in program ......
Read more >android_icu4j/src/main/java/android/icu/text/MessageFormat.java ...
<p>Recommendation: Use the real apostrophe (single quote) character \\u2019 for. * human-readable text, and use the ASCII apostrophe (\\u0027 ' ).
Read more >Single quotes in concatenate yield error
CONCATENATE("'", [Some column]) You will get an error saying “Number of opened and closed parentheses does not match.” If you introduce any text ......
Read more >MessageFormat - Android Developers
Within a String, a pair of single quotes can be used to quote any arbitrary characters ... When a single argument is parsed...
Read more >ICU 64.2: utypes.h File Reference
A single string literal containing the icudata stub name. More. ... Argument name and argument index mismatch in MessageFormat functions.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry @jasonmit, I should have included that info: ember-intl@5.5.0-beta.8.
Both double
''
and single’
work, so I will use one of those. Unfortunately translators sometimes change the quotes (as in the example posted here), and then the token just disappears without warning, which is going to be difficult to find. Thanks for the quick response!