Bug (?) in aurelia-i18n: Interpolated strings cut off when argument string contains colon (':')


My translation file for aurelia-i18n contains a a string like this one:

"dialogText": "To which list should "{{item}}" be added?"

I use it in a template like this:

<span>${'dialogText' | t : { 'item': selectedItem.name }}</span>

All is good, except when the string that selectedItem.name is bound to contains a colon (':') somehere in the middle, such as 'CS:GO'. Then the resulting rendered text will look like this:

GO" be added?

Wheras the expected result would be:

To which list should "CS:GO" be added?

Is this a bug or expected behavior?


If you could upload a minimal example showing the error I can help


Well, thank you - that actually already helped :smile: ! While trying to prepare a minimal example, I realized that the problem was elsewhere. Because of somewhat contrived behavior of my actual code, the text in question was actually translated twice - i.e. the translated text was again used as translation key. Which understandably yielded unexpected results - not Aurelia’s or i18next’s fault.


While Id like to think its because of my great Karma :slight_smile: I’ve already learned that building a sample most often shows the actual issue. Happy you got it solved.