doshprompt/angular-localization

Replacement happens for the first occurence of a token

Closed this issue · 2 comments

If I have a sting in my localization file like 'Hello {name} and hello {name} again' then directive replaces only first occurence of {name} token while the second one leaves untouched.
We workaround this via additional token with the same value like 'Hello {name} and hello {sameNameAgain} again' but it looks weird.

@IronBy good catch! This is a bug ... it's a pretty simple fix would you like to submit a PR or I will have one ready soon ...

Thank you for the fix!