From 89e1ae75f1b5e4df714f26e017dbbe0a3c4bfe27 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Fri, 8 Dec 2017 14:54:35 -0500 Subject: [PATCH] Transifex integration --- .gitignore | 1 + .tx/config | 9 +++++++++ Gemfile | 5 +++++ Gemfile.lock | 18 ++++++++++++++++++ bin/pull_translations.rb | 15 +++++++++++++++ config/locales/server.ar.yml | 8 ++++++++ config/locales/server.bs_BA.yml | 8 ++++++++ config/locales/server.cs.yml | 8 ++++++++ config/locales/server.da.yml | 8 ++++++++ config/locales/server.de.yml | 8 ++++++++ config/locales/server.el.yml | 8 ++++++++ config/locales/server.es.yml | 4 ++++ config/locales/server.et.yml | 8 ++++++++ config/locales/server.fa_IR.yml | 8 ++++++++ config/locales/server.fi.yml | 5 ++++- config/locales/server.fr.yml | 8 ++++++++ config/locales/server.gl.yml | 8 ++++++++ config/locales/server.he.yml | 8 ++++++++ config/locales/server.id.yml | 8 ++++++++ config/locales/server.it.yml | 8 ++++++++ config/locales/server.ja.yml | 8 ++++++++ config/locales/server.ko.yml | 8 ++++++++ config/locales/server.lv.yml | 8 ++++++++ config/locales/server.nb_NO.yml | 8 ++++++++ config/locales/server.nl.yml | 8 ++++++++ config/locales/server.pl_PL.yml | 8 ++++++++ config/locales/server.pt.yml | 8 ++++++++ config/locales/server.pt_BR.yml | 8 ++++++++ config/locales/server.ro.yml | 8 ++++++++ config/locales/server.ru.yml | 8 ++++++++ config/locales/server.sk.yml | 8 ++++++++ config/locales/server.sq.yml | 8 ++++++++ config/locales/server.sv.yml | 8 ++++++++ config/locales/server.te.yml | 8 ++++++++ config/locales/server.th.yml | 8 ++++++++ config/locales/server.tr_TR.yml | 8 ++++++++ config/locales/server.uk.yml | 8 ++++++++ config/locales/server.ur.yml | 8 ++++++++ config/locales/server.vi.yml | 8 ++++++++ config/locales/server.zh_CN.yml | 8 ++++++++ config/locales/server.zh_TW.yml | 8 ++++++++ 41 files changed, 328 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 .tx/config create mode 100644 Gemfile create mode 100644 Gemfile.lock create mode 100755 bin/pull_translations.rb create mode 100644 config/locales/server.ar.yml create mode 100644 config/locales/server.bs_BA.yml create mode 100644 config/locales/server.cs.yml create mode 100644 config/locales/server.da.yml create mode 100644 config/locales/server.de.yml create mode 100644 config/locales/server.el.yml create mode 100644 config/locales/server.et.yml create mode 100644 config/locales/server.fa_IR.yml create mode 100644 config/locales/server.fr.yml create mode 100644 config/locales/server.gl.yml create mode 100644 config/locales/server.he.yml create mode 100644 config/locales/server.id.yml create mode 100644 config/locales/server.it.yml create mode 100644 config/locales/server.ja.yml create mode 100644 config/locales/server.ko.yml create mode 100644 config/locales/server.lv.yml create mode 100644 config/locales/server.nb_NO.yml create mode 100644 config/locales/server.nl.yml create mode 100644 config/locales/server.pl_PL.yml create mode 100644 config/locales/server.pt.yml create mode 100644 config/locales/server.pt_BR.yml create mode 100644 config/locales/server.ro.yml create mode 100644 config/locales/server.ru.yml create mode 100644 config/locales/server.sk.yml create mode 100644 config/locales/server.sq.yml create mode 100644 config/locales/server.sv.yml create mode 100644 config/locales/server.te.yml create mode 100644 config/locales/server.th.yml create mode 100644 config/locales/server.tr_TR.yml create mode 100644 config/locales/server.uk.yml create mode 100644 config/locales/server.ur.yml create mode 100644 config/locales/server.vi.yml create mode 100644 config/locales/server.zh_CN.yml create mode 100644 config/locales/server.zh_TW.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/.tx/config b/.tx/config new file mode 100644 index 0000000..e4c6d2b --- /dev/null +++ b/.tx/config @@ -0,0 +1,9 @@ +[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.pluginmathserverenyml] +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..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/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..b1f0674 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,18 @@ +GIT + remote: https://github.com/discourse/translations-manager.git + revision: 7c265df4e60c75f7bea6aa978f79e7364c2c4ac7 + specs: + translations-manager (0.1.1) + +GEM + remote: https://rubygems.org/ + specs: + +PLATFORMS + ruby + +DEPENDENCIES + translations-manager! + +BUNDLED WITH + 1.13.6 diff --git a/bin/pull_translations.rb b/bin/pull_translations.rb new file mode 100755 index 0000000..f2119f3 --- /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'] + +TranslationsManager::TransifexUpdater.new(YML_DIRS, YML_FILE_PREFIXES, *ARGV).perform diff --git a/config/locales/server.ar.yml b/config/locales/server.ar.yml new file mode 100644 index 0000000..79ea4de --- /dev/null +++ b/config/locales/server.ar.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +ar: {} diff --git a/config/locales/server.bs_BA.yml b/config/locales/server.bs_BA.yml new file mode 100644 index 0000000..7b73cd2 --- /dev/null +++ b/config/locales/server.bs_BA.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +bs_BA: {} diff --git a/config/locales/server.cs.yml b/config/locales/server.cs.yml new file mode 100644 index 0000000..c0f2fec --- /dev/null +++ b/config/locales/server.cs.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +cs: {} diff --git a/config/locales/server.da.yml b/config/locales/server.da.yml new file mode 100644 index 0000000..9ca8189 --- /dev/null +++ b/config/locales/server.da.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +da: {} diff --git a/config/locales/server.de.yml b/config/locales/server.de.yml new file mode 100644 index 0000000..9bbf19d --- /dev/null +++ b/config/locales/server.de.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +de: {} diff --git a/config/locales/server.el.yml b/config/locales/server.el.yml new file mode 100644 index 0000000..63bf4b0 --- /dev/null +++ b/config/locales/server.el.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +el: {} diff --git a/config/locales/server.es.yml b/config/locales/server.es.yml index 4d67472..b19939d 100644 --- a/config/locales/server.es.yml +++ b/config/locales/server.es.yml @@ -1,5 +1,9 @@ # encoding: utf-8 # +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ es: site_settings: diff --git a/config/locales/server.et.yml b/config/locales/server.et.yml new file mode 100644 index 0000000..8c601aa --- /dev/null +++ b/config/locales/server.et.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +et: {} diff --git a/config/locales/server.fa_IR.yml b/config/locales/server.fa_IR.yml new file mode 100644 index 0000000..3f564b2 --- /dev/null +++ b/config/locales/server.fa_IR.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +fa_IR: {} diff --git a/config/locales/server.fi.yml b/config/locales/server.fi.yml index 823fdf3..82416aa 100644 --- a/config/locales/server.fi.yml +++ b/config/locales/server.fi.yml @@ -1,8 +1,11 @@ # encoding: utf-8 # +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ fi: site_settings: discourse_math_enabled: 'Ota käyttöön Discoursen matematiikkalisäosa ($ ja $$ blokit käsitellään erityisellä tavalla)' - discourse_math_zoom_on_click: 'Zoomaa 200% hoverissa' discourse_math_enable_accessibility: 'Ota käyttöön esteettömyysominaisuudet' diff --git a/config/locales/server.fr.yml b/config/locales/server.fr.yml new file mode 100644 index 0000000..ca92bfb --- /dev/null +++ b/config/locales/server.fr.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +fr: {} diff --git a/config/locales/server.gl.yml b/config/locales/server.gl.yml new file mode 100644 index 0000000..695b5cf --- /dev/null +++ b/config/locales/server.gl.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +gl: {} diff --git a/config/locales/server.he.yml b/config/locales/server.he.yml new file mode 100644 index 0000000..96b15d6 --- /dev/null +++ b/config/locales/server.he.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +he: {} diff --git a/config/locales/server.id.yml b/config/locales/server.id.yml new file mode 100644 index 0000000..2112cad --- /dev/null +++ b/config/locales/server.id.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +id: {} diff --git a/config/locales/server.it.yml b/config/locales/server.it.yml new file mode 100644 index 0000000..12c5162 --- /dev/null +++ b/config/locales/server.it.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +it: {} diff --git a/config/locales/server.ja.yml b/config/locales/server.ja.yml new file mode 100644 index 0000000..8c2dc00 --- /dev/null +++ b/config/locales/server.ja.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +ja: {} diff --git a/config/locales/server.ko.yml b/config/locales/server.ko.yml new file mode 100644 index 0000000..bf4e05d --- /dev/null +++ b/config/locales/server.ko.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +ko: {} diff --git a/config/locales/server.lv.yml b/config/locales/server.lv.yml new file mode 100644 index 0000000..dc48bb5 --- /dev/null +++ b/config/locales/server.lv.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +lv: {} diff --git a/config/locales/server.nb_NO.yml b/config/locales/server.nb_NO.yml new file mode 100644 index 0000000..2231ad9 --- /dev/null +++ b/config/locales/server.nb_NO.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +nb_NO: {} diff --git a/config/locales/server.nl.yml b/config/locales/server.nl.yml new file mode 100644 index 0000000..bb31021 --- /dev/null +++ b/config/locales/server.nl.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +nl: {} diff --git a/config/locales/server.pl_PL.yml b/config/locales/server.pl_PL.yml new file mode 100644 index 0000000..c04d371 --- /dev/null +++ b/config/locales/server.pl_PL.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +pl_PL: {} diff --git a/config/locales/server.pt.yml b/config/locales/server.pt.yml new file mode 100644 index 0000000..d12527a --- /dev/null +++ b/config/locales/server.pt.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +pt: {} diff --git a/config/locales/server.pt_BR.yml b/config/locales/server.pt_BR.yml new file mode 100644 index 0000000..bc85fd8 --- /dev/null +++ b/config/locales/server.pt_BR.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +pt_BR: {} diff --git a/config/locales/server.ro.yml b/config/locales/server.ro.yml new file mode 100644 index 0000000..31d1c44 --- /dev/null +++ b/config/locales/server.ro.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +ro: {} diff --git a/config/locales/server.ru.yml b/config/locales/server.ru.yml new file mode 100644 index 0000000..5c634ee --- /dev/null +++ b/config/locales/server.ru.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +ru: {} diff --git a/config/locales/server.sk.yml b/config/locales/server.sk.yml new file mode 100644 index 0000000..bcc3a93 --- /dev/null +++ b/config/locales/server.sk.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +sk: {} diff --git a/config/locales/server.sq.yml b/config/locales/server.sq.yml new file mode 100644 index 0000000..4526be3 --- /dev/null +++ b/config/locales/server.sq.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +sq: {} diff --git a/config/locales/server.sv.yml b/config/locales/server.sv.yml new file mode 100644 index 0000000..fd54901 --- /dev/null +++ b/config/locales/server.sv.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +sv: {} diff --git a/config/locales/server.te.yml b/config/locales/server.te.yml new file mode 100644 index 0000000..49141ba --- /dev/null +++ b/config/locales/server.te.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +te: {} diff --git a/config/locales/server.th.yml b/config/locales/server.th.yml new file mode 100644 index 0000000..7ed98e1 --- /dev/null +++ b/config/locales/server.th.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +th: {} diff --git a/config/locales/server.tr_TR.yml b/config/locales/server.tr_TR.yml new file mode 100644 index 0000000..00efffd --- /dev/null +++ b/config/locales/server.tr_TR.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +tr_TR: {} diff --git a/config/locales/server.uk.yml b/config/locales/server.uk.yml new file mode 100644 index 0000000..3acfff7 --- /dev/null +++ b/config/locales/server.uk.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +uk: {} diff --git a/config/locales/server.ur.yml b/config/locales/server.ur.yml new file mode 100644 index 0000000..58bc973 --- /dev/null +++ b/config/locales/server.ur.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +ur: {} diff --git a/config/locales/server.vi.yml b/config/locales/server.vi.yml new file mode 100644 index 0000000..fa809fe --- /dev/null +++ b/config/locales/server.vi.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +vi: {} diff --git a/config/locales/server.zh_CN.yml b/config/locales/server.zh_CN.yml new file mode 100644 index 0000000..53c9902 --- /dev/null +++ b/config/locales/server.zh_CN.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +zh_CN: {} diff --git a/config/locales/server.zh_TW.yml b/config/locales/server.zh_TW.yml new file mode 100644 index 0000000..92c18de --- /dev/null +++ b/config/locales/server.zh_TW.yml @@ -0,0 +1,8 @@ +# encoding: utf-8 +# +# Never edit this file. It will be overwritten when translations are pulled from Transifex. +# +# To work with us on translations, join this project: +# https://www.transifex.com/projects/p/discourse-org/ + +zh_TW: {}