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
With the patch from PR #69 the code snippet below will generate both the false translation keys active and non-active in addition to the correct one STATE_LABEL.
If I disable the HtmlFilterTernary regex (by commenting it out in tasks/angular-translate.js the extraction works as expected (only extracting STATE_LABEL).
The text was updated successfully, but these errors were encountered:
The change is in the first character class which was [^?]* (match any characters not ?) to [^?|}]* (match any characters not ?, |, or }). This prevents the match from crossing too many other interpolation sequences.
In the meantime, adding a comment like this will help to prevent this regex from matching incorrectly. I inserted it after a ternary before the next translate.
<!-- Prevent grunt-angular-translate from incorrectly matching: ?|: -->
With the patch from PR #69 the code snippet below will generate both the false translation keys
active
andnon-active
in addition to the correct oneSTATE_LABEL
.If I disable the
HtmlFilterTernary
regex (by commenting it out intasks/angular-translate.js
the extraction works as expected (only extractingSTATE_LABEL
).The text was updated successfully, but these errors were encountered: