From e41f1a7bf3ce3c71e9fb3691c45121747c2ad306 Mon Sep 17 00:00:00 2001 From: elijah Date: Tue, 30 Jun 2015 00:39:56 -0700 Subject: updated locale files --- lib/tasks/i18n.rake | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/tasks/i18n.rake b/lib/tasks/i18n.rake index 2392d8a..b026fae 100644 --- a/lib/tasks/i18n.rake +++ b/lib/tasks/i18n.rake @@ -47,6 +47,11 @@ namespace :i18n do end end + LOCALE_ALIAS_MAP = { + :nb => 'nb-no', + :pt => 'pt-br' + } + desc "pull translations from transifex" task :download do Dir.chdir('config/') do @@ -58,8 +63,12 @@ namespace :i18n do end APP_CONFIG[:available_locales].each do |lang| next if lang == :en + puts puts "downloading #{lang}" - `curl -L --netrc-file transifex.netrc -X GET 'https://www.transifex.com/api/2/project/bitmask/resource/leap_web/translation/#{lang}/?file' > locales/#{lang}.yml` + lang_url = LOCALE_ALIAS_MAP[lang] || lang + command = %[curl -L --netrc-file transifex.netrc -X GET 'https://www.transifex.com/api/2/project/bitmask/resource/leap_web/translation/#{lang_url}/?file' > locales/#{lang}.yml] + puts command + `#{command}` end end end -- cgit v1.2.3