Rename AvailableLocales.available_locales method

I'm not sure whether we should rename the class instead. I'm renaming
the method because renaming the class would require more changes.
This commit is contained in:
Javi Martín
2023-07-19 16:21:39 +02:00
parent 36c3ba6601
commit 8898c30f55
6 changed files with 10 additions and 10 deletions

View File

@@ -4,7 +4,7 @@ require "cgi"
require "json"
class RemoteTranslations::Microsoft::AvailableLocales
def self.available_locales
def self.locales
daily_cache("locales") do
remote_available_locales.map { |locale| remote_locale_to_app_locale(locale) }
end
@@ -15,7 +15,7 @@ class RemoteTranslations::Microsoft::AvailableLocales
end
def self.include_locale?(locale)
available_locales.include?(locale.to_s)
locales.include?(locale.to_s)
end
private