mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 01:16:38 -06:00
Pulling translations for a new language didn't work
This commit is contained in:
parent
7483805f0c
commit
bf30f74f60
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user