mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 01:15:26 +08:00
Remove validation for invalid interpolation keys.
* Our codebase currently supports custom interpolations keys that are not present in the original translation. The proper fix should be to make `TranslateOverride` aware of such keys.
This commit is contained in:
@ -19,19 +19,6 @@ describe TranslationOverride do
|
||||
))
|
||||
end
|
||||
end
|
||||
|
||||
describe 'when interpolation keys are invalid' do
|
||||
it 'should not be valid' do
|
||||
translation_override = TranslationOverride.upsert!(
|
||||
I18n.locale, 'some_key', '%{first} %{second} %{third}'
|
||||
)
|
||||
|
||||
expect(translation_override.errors.full_messages).to include(I18n.t(
|
||||
'activerecord.errors.models.translation_overrides.attributes.value.invalid_interpolation_keys',
|
||||
keys: 'third'
|
||||
))
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user