diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..6ac5785 --- /dev/null +++ b/Gemfile @@ -0,0 +1,5 @@ +source 'https://rubygems.org' + +group :development do + gem 'translations-manager', git: 'https://github.com/discourse/translations-manager.git' +end diff --git a/bin/pull_translations.rb b/bin/pull_translations.rb new file mode 100755 index 0000000..755a227 --- /dev/null +++ b/bin/pull_translations.rb @@ -0,0 +1,15 @@ +#!/usr/bin/env ruby + +# Usage: +# bundle install +# bundle exec bin/pull_translations.rb +# +# To choose which languages to update, list them as arguments: +# bundle exec bin/pull_translations.rb he uk + +require 'translations_manager' + +YML_DIRS = ['config/locales'].map { |d| File.expand_path(d) } +YML_FILE_PREFIXES = ['server', 'client'] + +TranslationsManager::TransifexUpdater.new(YML_DIRS, YML_FILE_PREFIXES, *ARGV).perform