Pulling translations for a new language didn't work

This commit is contained in:
Gerhard Schlager 2018-05-29 20:57:32 +02:00
parent 7483805f0c
commit bf30f74f60
1 changed files with 3 additions and 3 deletions

View File

@ -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)