summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2015-06-30 00:39:56 -0700
committerelijah <elijah@riseup.net>2015-06-30 00:39:56 -0700
commite41f1a7bf3ce3c71e9fb3691c45121747c2ad306 (patch)
tree24a310d17bd40f72b9c2ff384a2dd86cb9622a62 /lib/tasks
parent3ecaa9bc3f8f8ab3dcf7ab8cd56e0595867abce3 (diff)
updated locale files
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/i18n.rake11
1 files changed, 10 insertions, 1 deletions
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