Hi there, I have nothing set up top properly send patch through email, but this is just a first draft in order to get review. As we are moving translations to zanata, websites have to pull translations from there. This patch: - suppose transifex translation is frozen. Not pulling from there anymore, we can drop the transifex-client support - installs zanata-python-client - don't set up correct API KEY. I don't know how to define this (replacing (fedoraDummyTransifexPassword) - sync translations on the previous directory (oh, we might remove the previous archive. Is there a way with puppet to remove a directory at first setup ?) -we need to check it, and edit our Makefiles accordingly (on the websites repository) It would be nice to use zanata ASAP. Please, give me your thoughts. Even If I have to split the patch (to remove transifex..) Also, I have no idea about freeze time. Cheers, -- Kévin Raymond (shaiton) GPG-Key: A5BCB3A2
From fe954f2027e2e3836f872186c92a359dc80fd806 Mon Sep 17 00:00:00 2001 From: Kevin Raymond <shaiton@xxxxxxxxxxxxxxxxx> Date: Thu, 19 Feb 2015 20:12:00 +0000 Subject: [PATCH] websites: replace transifex-client in favor of zanata-python-client. We are moving from transifex.net to fedora.zanata.org. Makes websites builder pulling from the new server. --- modules/transifex/README | 1 - modules/transifex/manifests/init.pp | 22 ---- modules/transifex/templates/client/transifexrc.erb | 11 -- modules/zanata/README | 1 + modules/zanata/manifests/init.pp | 29 ++++++ modules/zanata/templates/client/sample.xml | 106 ++++++++++++++++++++ modules/zanata/templates/client/zanata.erb | 4 + 7 files changed, 140 insertions(+), 34 deletions(-) delete mode 100644 modules/transifex/README delete mode 100644 modules/transifex/manifests/init.pp delete mode 100644 modules/transifex/templates/client/transifexrc.erb create mode 100644 modules/zanata/README create mode 100644 modules/zanata/manifests/init.pp create mode 100644 modules/zanata/templates/client/sample.xml create mode 100644 modules/zanata/templates/client/zanata.erb diff --git a/modules/transifex/README b/modules/transifex/README deleted file mode 100644 index 24b6f62..0000000 --- a/modules/transifex/README +++ /dev/null @@ -1 +0,0 @@ -Transifex Module diff --git a/modules/transifex/manifests/init.pp b/modules/transifex/manifests/init.pp deleted file mode 100644 index 3d645cb..0000000 --- a/modules/transifex/manifests/init.pp +++ /dev/null @@ -1,22 +0,0 @@ -class transifex::client { - - package { "transifex-client": - ensure => installed, - } - - file { "/var/lib/transifex-client": - owner => "apache", - group => "transifex", - mode => 0550, - ensure => directory, - } - - # needed to pull po files in tx - file { "/var/lib/transifex-client/.transifexrc": - owner => "apache", - group => "apache", - mode => 0600, - content => template("transifex/client/transifexrc.erb"), - } - -} diff --git a/modules/transifex/templates/client/transifexrc.erb b/modules/transifex/templates/client/transifexrc.erb deleted file mode 100644 index ed9122f..0000000 --- a/modules/transifex/templates/client/transifexrc.erb +++ /dev/null @@ -1,11 +0,0 @@ -[https://www.transifex.com] -username = fedoradummy -token = -password = <%= fedoraDummyTransifexPassword %> -hostname = https://www.transifex.com - -[https://fedora.transifex.com] -username = fedoradummy -token = -password = <%= fedoraDummyTransifexPassword %> -hostname = https://fedora.transifex.com diff --git a/modules/zanata/README b/modules/zanata/README new file mode 100644 index 0000000..31514af --- /dev/null +++ b/modules/zanata/README @@ -0,0 +1 @@ +Zanata Module diff --git a/modules/zanata/manifests/init.pp b/modules/zanata/manifests/init.pp new file mode 100644 index 0000000..a40b195 --- /dev/null +++ b/modules/zanata/manifests/init.pp @@ -0,0 +1,29 @@ +class zanata::client { + + package { "zanata-python-client": + ensure => installed, + } + + file { "/var/lib/zanata/.config": + owner => "apache", + group => "zanata", + mode => 0550, + ensure => directory, + } + + # needed to pull po files in zanata + file { "/var/lib/zanata/.config/zanata.ini": + owner => "apache", + group => "apache", + mode => 0600, + content => template("zanata/client/zanata.erb"), + } + + # provide a default config file + file { "/var/lib/zanata/sample.xml": + owner => "apache", + group => "apache", + mode => 0600, + content => template("zanata/client/sample.xml"), + } +} diff --git a/modules/zanata/templates/client/sample.xml b/modules/zanata/templates/client/sample.xml new file mode 100644 index 0000000..feb6b9d --- /dev/null +++ b/modules/zanata/templates/client/sample.xml @@ -0,0 +1,106 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?> +<config xmlns="http://zanata.org/namespace/config/"> + <url>https://fedora.zanata.org/</url> + <project>fedora-web</project> + <project-version>@VERSION@</project-version> + <project-type>gettext</project-type> + + <locales> + <locale>sq</locale> + <locale>ar</locale> + <locale>as</locale> + <locale>ast</locale> + <locale>bal</locale> + <locale>eu</locale> + <locale>bn</locale> + <locale map-from='bn_IN'>bn-IN</locale> + <locale>brx</locale> + <locale>bs</locale> + <locale>br</locale> + <locale>bg</locale> + <locale>ca</locale> + <locale map-from='zh_CN'>zh-CN</locale> + <locale>zh-HK</locale> + <locale map-from='zh_TW'>zh-TW</locale> + <locale>kw</locale> + <locale>kw-GB</locale> + <locale>cs</locale> + <locale>da</locale> + <locale>nl</locale> + <locale map-from='en_GB'>en-GB</locale> + <locale>eo</locale> + <locale>et</locale> + <locale>fi</locale> + <locale>fr</locale> + <locale>gl</locale> + <locale>ka</locale> + <locale>de</locale> + <locale>el</locale> + <locale>gu</locale> + <locale>he</locale> + <locale>hi</locale> + <locale>hu</locale> + <locale>is</locale> + <locale>id</locale> + <locale>ia</locale> + <locale>it</locale> + <locale>ja</locale> + <locale>kn</locale> + <locale>kk</locale> + <locale>km</locale> + <locale>ky</locale> + <locale>ko</locale> + <locale>lt</locale> + <locale>nds</locale> + <locale>mk</locale> + <locale>mai</locale> + <locale>ms</locale> + <locale>ml</locale> + <locale>mr</locale> + <locale>mn</locale> + <locale>ne</locale> + <locale>nb</locale> + <locale>nn</locale> + <locale>or</locale> + <locale>pa</locale> + <locale>fa</locale> + <locale>pl</locale> + <locale>pt</locale> + <locale map-from='pt_BR'>pt-BR</locale> + <locale>ro</locale> + <locale>ru</locale> + <locale>sr</locale> + <locale>sr@latin</locale> + <locale>si</locale> + <locale>sk</locale> + <locale>sl</locale> + <locale>es</locale> + <locale>sv</locale> + <locale>tg</locale> + <locale>ta</locale> + <locale>te</locale> + <locale>bo</locale> + <locale>tr</locale> + <locale>uk</locale> + <locale>ur</locale> + <locale>wba</locale> + <locale>cy</locale> + <locale>lv</locale> + <locale>kw@uccor</locale> + <locale>kw@kkcor</locale> + <locale>af</locale> + <locale>am</locale> + <locale>be</locale> + <locale>hr</locale> + <locale map-from='de_CH'>de-CH</locale> + <locale>th</locale> + <locale>vi</locale> + <locale>zu</locale> + <locale>ilo</locale> + <locale>nso</locale> + <locale>tw</locale> + <locale>yo</locale> + <locale>anp</locale> + </locales> + +</config> diff --git a/modules/zanata/templates/client/zanata.erb b/modules/zanata/templates/client/zanata.erb new file mode 100644 index 0000000..1e37569 --- /dev/null +++ b/modules/zanata/templates/client/zanata.erb @@ -0,0 +1,4 @@ +[servers] +fedora_zanata_org.url=https://fedora.zanata.org/ +fedora_zanata_org.username=fedoradummy +fedora_zanata_org.key=<%= fedoraDummyTransifexPassword %> -- 1.7.2.1
_______________________________________________ infrastructure mailing list infrastructure@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/infrastructure