DEV: Lint MessageFormat strings to prevent usage of "one {foo 1 bar}" (#11608)

Follow-up to 6b53f26f
This commit is contained in:
Gerhard Schlager
2021-01-04 12:29:20 +01:00
committed by GitHub
parent ff54d3a024
commit fc9155f3ee
2 changed files with 4 additions and 4 deletions

View File

@ -97,7 +97,7 @@ class LocaleFileValidator
@errors[:invalid_interpolation_key_format] << key
end
if key.end_with?("_MF") && value.match?(/one {1.*?}/)
if key.end_with?("_MF") && value.match?(/one {.*?1.*?}/)
@errors[:invalid_message_format_one_key] << key
end
end