mirror of
https://github.com/discourse/discourse-adplugin.git
synced 2025-03-09 13:19:11 +00:00
add pull_translations.rb
This commit is contained in:
parent
4d3796d924
commit
78e86fb4fa
5
Gemfile
Normal file
5
Gemfile
Normal file
@ -0,0 +1,5 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
group :development do
|
||||
gem 'translations-manager', git: 'https://github.com/discourse/translations-manager.git'
|
||||
end
|
15
bin/pull_translations.rb
Executable file
15
bin/pull_translations.rb
Executable file
@ -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…
x
Reference in New Issue
Block a user