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

View File

@ -30,7 +30,7 @@ YML_FILE_PREFIXES = ['server', 'client']
TX_CONFIG = expand_path('.tx/config') TX_CONFIG = expand_path('.tx/config')
JS_LOCALE_DIR = expand_path('app/assets/javascripts/locales') 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 STDERR.puts <<~MESSAGE
The supported locales are out of sync. The supported locales are out of sync.
@ -41,13 +41,13 @@ if TranslationsManager::SUPPORTED_LOCALES != supported_locales
MESSAGE MESSAGE
STDERR.puts locales.map { |l| "'#{l}'" }.join(",\n") STDERR.puts supported_locales.map { |l| "'#{l}'" }.join(",\n")
exit 1 exit 1
end end
TranslationsManager::TransifexUpdater.new(YML_DIRS, YML_FILE_PREFIXES, *ARGV).perform(tx_config_filename: TX_CONFIG) 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") filename = File.join(JS_LOCALE_DIR, "#{locale}.js.erb")
next if File.exists?(filename) next if File.exists?(filename)