mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
DEV: Lint MessageFormat strings to prevent usage of "one {foo 1 bar}" (#11608)
Follow-up to 6b53f26f
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user