DEV: Add script for pushing translations to Transifex

This commit is contained in:
Gerhard Schlager
2018-11-08 23:58:59 +01:00
parent 24e5be3f0c
commit 77fedaba88
2 changed files with 53 additions and 7 deletions

View File

@ -12,17 +12,11 @@ def expand_path(path)
File.expand_path("../../#{path}", __FILE__)
end
# List of locales that will break Discourse and need to be fixed
# by translators in Transifex.
def broken_locales
['ja']
end
def supported_locales
Dir.glob(expand_path('config/locales/client.*.yml'))
.map { |x| x.split('.')[-2] }
.select { |x| x != 'en' }
.sort - broken_locales
.sort - TranslationsManager::BROKEN_LOCALES
end
YML_DIRS = ['config/locales',