diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-02-08 19:43:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-08 19:43:59 +0100 |
commit | 2fd1db7c9d0fe8c1cca159b9b0818c72e7c318aa (patch) | |
tree | bc7319ae242a889bb1d05b7afdd365d78a43ac1d /lib/tasks/repo.rake | |
parent | b1983623aec8e0b066d115736d2151e0c74407fa (diff) | |
parent | 692963d43beb5e66a86e15d63b5aa3eeca82f0a1 (diff) |
Merge pull request #1680 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'lib/tasks/repo.rake')
-rw-r--r-- | lib/tasks/repo.rake | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/tasks/repo.rake b/lib/tasks/repo.rake index bbf7f20ee..795b54c59 100644 --- a/lib/tasks/repo.rake +++ b/lib/tasks/repo.rake @@ -96,7 +96,8 @@ namespace :repo do end.uniq.compact missing_available_locales = locales_in_files - I18n.available_locales - missing_locale_names = I18n.available_locales.reject { |locale| LanguagesHelper::HUMAN_LOCALES.key?(locale) } + supported_locale_codes = Set.new(LanguagesHelper::SUPPORTED_LOCALES.keys + LanguagesHelper::REGIONAL_LOCALE_NAMES.keys) + missing_locale_names = I18n.available_locales.reject { |locale| supported_locale_codes.include?(locale) } critical = false @@ -123,7 +124,7 @@ namespace :repo do unless missing_locale_names.empty? puts pastel.yellow("You are missing human-readable names for these locales: #{pastel.bold(missing_locale_names.join(', '))}") - puts pastel.yellow("Add them to #{pastel.bold('HUMAN_LOCALES')} in app/helpers/settings_helper.rb or remove the locales from #{pastel.bold('I18n.available_locales')} in config/application.rb") + puts pastel.yellow("Add them to app/helpers/languages_helper.rb or remove the locales from #{pastel.bold('I18n.available_locales')} in config/application.rb") end if critical |