Issue #427: fix edge case bug in plural pseudolocalization #428
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes issue #427.
Depends on PR #419 - the test added here will fail on this branch until that PR is incorporated.
This fix will still fail in the case that a variable placeholder in a template string inside a
plural
macro is followed by a single word which matches one of the plural rules, e.g.{count, plural, one {{countString} other} other {{countString} others}}
.This is a much more extreme edge case, though - it must be
plural
expressionzero|one|two|few|many|other
IMO this is an acceptable tradeoff for a more readable regular expression.