2017-12-07 17:42:46 -05:00
|
|
|
#!/usr/bin/env ruby
|
2019-05-12 22:37:49 -04:00
|
|
|
# frozen_string_literal: true
|
2017-12-07 17:42:46 -05:00
|
|
|
|
|
|
|
# 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
|