mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Validate interpolation keys used in translation overrides.
https://meta.discourse.org/t/discobot-translation-missing-error/64429/6?u=tgxworld
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
class I18nInterpolationKeysFinder
|
||||
def self.find(text)
|
||||
keys = text.scan(I18n::INTERPOLATION_PATTERN)
|
||||
keys.flatten!
|
||||
keys.compact!
|
||||
keys.uniq!
|
||||
keys
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user