diff --git a/.tx/config b/.tx/config new file mode 100644 index 0000000..5c69a76 --- /dev/null +++ b/.tx/config @@ -0,0 +1,16 @@ +[main] +host = https://www.transifex.com +lang_map = el_GR: el, es_ES: es, fr_FR: fr, ko_KR: ko, pt_PT: pt, sk_SK: sk, vi_VN: vi + +[discourse-org.pluginsubscriptionsclientyml] +file_filter = config/locales/client..yml +source_file = config/locales/client.en.yml +source_lang = en +type = YML + +[discourse-org.pluginsubscriptionsserveryml] +file_filter = config/locales/server..yml +source_file = config/locales/server.en.yml +source_lang = en +type = YML + diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..2a5f647 --- /dev/null +++ b/Gemfile @@ -0,0 +1,3 @@ +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 100644 index 0000000..a4052d8 --- /dev/null +++ b/bin/pull_translations.rb @@ -0,0 +1,8 @@ +#!/usr/bin/env ruby + +require 'translations_manager' + +YML_DIRS = ['config/locales'].map { |d| File.expand_path(d) } +YML_FILE_PREFIXES = ['client', 'server'] + +TranslationsManager::TransifexUpdater.new(YML_DIRS, YML_FILE_PREFIXES, *ARGV).perform