You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
First of all thanks for amazing 'i18n' implementation into 'vuex'.
Just one issue we bumped into while using it. Looks like regex that matches start/end identifiers only accept word characters between them (\w+). That way if we pass something like this as params '{{test!}}' we do not get a translated string while '{{test}}' works fine. Is there a particular reason for this? Could the matcher be updated from: var matcher = new RegExp('' + identifiers[0] + '\\w+' + identifiers[1], 'g');
to: var matcher = new RegExp('' + identifiers[0] + '.+?' + identifiers[1], 'g');
or similar to allow special characters?
Or maybe there's some option that I am missing that allows to do this?
The text was updated successfully, but these errors were encountered:
Many thanks for reporting the issue. We actually never bumped into the problem, as we usually use rather simple strings as keys for the translation – i.e. dashboard.title.
However, your reported use case should really work and I will look into how we can make the regex matcher more robust.
Hi,
First of all thanks for amazing 'i18n' implementation into 'vuex'.
Just one issue we bumped into while using it. Looks like regex that matches start/end identifiers only accept word characters between them (\w+). That way if we pass something like this as params '{{test!}}' we do not get a translated string while '{{test}}' works fine. Is there a particular reason for this? Could the matcher be updated from:
var matcher = new RegExp('' + identifiers[0] + '\\w+' + identifiers[1], 'g');
to:
var matcher = new RegExp('' + identifiers[0] + '.+?' + identifiers[1], 'g');
or similar to allow special characters?
Or maybe there's some option that I am missing that allows to do this?
The text was updated successfully, but these errors were encountered: