question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ICU argument mismatch - single quote / apostrophe `'`

See original GitHub issue

I’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:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
adc-mhaugencommented, Sep 8, 2020

Sorry @jasonmit, I should have included that info: ember-intl@5.5.0-beta.8.

0reactions
adc-mhaugencommented, Sep 9, 2020

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found