Skip to content

A platform for community discussion. Free, open, simple.

Pulling translations for a new language didn't work

Gerhard Schlagerbf30f74f6062
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)