From bf30f74f60622e59d35a3d6e7c57173b6b9dfef3 Mon Sep 17 00:00:00 2001 From: Gerhard Schlager Date: Tue, 29 May 2018 20:57:32 +0200 Subject: [PATCH] Pulling translations for a new language didn't work --- script/pull_translations.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/script/pull_translations.rb b/script/pull_translations.rb index 21e4dc31c6b..8870974c5e6 100755 --- a/script/pull_translations.rb +++ b/script/pull_translations.rb @@ -30,7 +30,7 @@ YML_FILE_PREFIXES = ['server', 'client'] TX_CONFIG = expand_path('.tx/config') JS_LOCALE_DIR = expand_path('app/assets/javascripts/locales') -if TranslationsManager::SUPPORTED_LOCALES != supported_locales +if ARGV.empty? && TranslationsManager::SUPPORTED_LOCALES != supported_locales STDERR.puts <<~MESSAGE The supported locales are out of sync. @@ -41,13 +41,13 @@ if TranslationsManager::SUPPORTED_LOCALES != supported_locales MESSAGE - STDERR.puts locales.map { |l| "'#{l}'" }.join(",\n") + STDERR.puts supported_locales.map { |l| "'#{l}'" }.join(",\n") exit 1 end TranslationsManager::TransifexUpdater.new(YML_DIRS, YML_FILE_PREFIXES, *ARGV).perform(tx_config_filename: TX_CONFIG) -supported_locales.each do |locale| +TranslationsManager::SUPPORTED_LOCALES.each do |locale| filename = File.join(JS_LOCALE_DIR, "#{locale}.js.erb") next if File.exists?(filename)