mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Refactor translation overrides a bit (#28125)
This is a small followup of https://github.com/discourse/discourse/pull/28037.
This commit is contained in:
@@ -50,13 +50,11 @@ class TranslationOverride < ActiveRecord::Base
|
||||
enum status: { up_to_date: 0, outdated: 1, invalid_interpolation_keys: 2, deprecated: 3 }
|
||||
|
||||
scope :mf_locales,
|
||||
->(locale) do
|
||||
where(locale: locale).where.not(status: "deprecated").where("translation_key LIKE '%_MF'")
|
||||
end
|
||||
->(locale) { not_deprecated.where(locale: locale).where("translation_key LIKE '%_MF'") }
|
||||
scope :client_locales,
|
||||
->(locale) do
|
||||
where(locale: locale)
|
||||
.where.not(status: "deprecated")
|
||||
not_deprecated
|
||||
.where(locale: locale)
|
||||
.where("translation_key LIKE 'js.%' OR translation_key LIKE 'admin_js.%'")
|
||||
.where.not("translation_key LIKE '%_MF'")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user