Frank Kloeker a42f130aac Puppet module to provide a translation checksite
Install DevStack and refresh the installation daily
Sync translation files from Zanata
Branches are to configure, see README.md and init.pp for details
Requires puppetlabs-vcsrepo
Requires zanata-cli and API-Key

Working basis:
https://etherpad.openstack.org/p/i18n-mitaka-virtualsprint

Change-Id: I6b9a7fb2dfcdc2d7178cd149352e585ca7d3c7cc
Co-Authored-By: Ying Chun Guo <guoyingc@cn.ibm.com>
Co-Authored-By: KATO Tomoyuki <kato.tomoyuki@jp.fujitsu.com>
Co-Authored-By: Ian Y. Choi <ianyrchoi@gmail.com>
Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
2016-04-05 08:15:10 +00:00

26 lines
714 B
Plaintext

#!/bin/bash
#
# Script for sync language files from zanata, compile them and reload apache
# requires zanata.xml for zanata-cli
#
LOCAL_SETTINGS=/opt/stack/horizon/openstack_dashboard/local/local_settings.py
# fetch new po files for spezific lang
<%= @zanata_cli %> -B -q pull
# compile mo files
for file in `find /opt/stack/horizon -name "*.po"` ; do
msgfmt -o ${file%.po}.mo $file
done
# Update the language list to have all available languages
# see https://github.com/amotoki/horizon-i18n-tools
TOP_DIR=$(cd $(dirname "$0") && pwd)
sed -i -e '/^LANGUAGES = /,$d' $LOCAL_SETTINGS
python $TOP_DIR/update-lang-list.py >> $LOCAL_SETTINGS
# reload apache
ACTL=$(sudo which apache2ctl)
sudo $ACTL graceful