add pull_translations.rb
This commit is contained in:
parent
4d3796d924
commit
78e86fb4fa
|
@ -0,0 +1,5 @@
|
||||||
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
|
group :development do
|
||||||
|
gem 'translations-manager', git: 'https://github.com/discourse/translations-manager.git'
|
||||||
|
end
|
|
@ -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
|
Loading…
Reference in New Issue