[i18n] Fix release notes path

Since Zanata client has an option "--srcdir $modulename/locale
--txdir $modulename/locale", we need "../../" prefix.

Change-Id: If196556581c0033262330a96fee28da1dd523cf6
This commit is contained in:
KATO Tomoyuki 2016-04-08 22:03:47 +09:00
parent 73f591ba4b
commit 71cd4500f2

@ -39,22 +39,30 @@ function get_modulename {
function setup_project {
local project=$1
local version=$2
local reno_resource=""
# Add release notes translation if exists.
if [ "$version" == "master" ] && [ -f releasenotes/source/conf.py ]; then
extract_messages_releasenotes
reno_resource="-r releasenotes/source/locale/releasenotes.pot releasenotes/source/locale/{locale_with_underscore}/LC_MESSAGES/releasenotes.po"
fi
shift 2
# All argument(s) contain module names now.
if [ $# -eq 1 ]; then
local modulename=$1
local reno_resource=""
# Add release notes translation if exists.
if [ "$version" == "master" ] && [ -f releasenotes/source/conf.py ]; then
extract_messages_releasenotes
# Add ../../ prefix, because the below create-zanata-xml.py uses
# "--srcdir $modulename/locale" and "--txdir $modulename/locale".
reno_resource="-r ../../releasenotes/source/locale/releasenotes.pot ../../releasenotes/source/locale/{locale_with_underscore}/LC_MESSAGES/releasenotes.po"
fi
/usr/local/jenkins/slave_scripts/create-zanata-xml.py \
-p $project -v $version --srcdir $modulename/locale \
--txdir $modulename/locale \
-r '**/*.pot' '{locale_with_underscore}/LC_MESSAGES/{filename}.po' \
$reno_resource -f zanata.xml
else
local reno_resource=""
# Add release notes translation if exists.
if [ "$version" == "master" ] && [ -f releasenotes/source/conf.py ]; then
extract_messages_releasenotes
reno_resource="-r releasenotes/source/locale/releasenotes.pot releasenotes/source/locale/{locale_with_underscore}/LC_MESSAGES/releasenotes.po"
fi
/usr/local/jenkins/slave_scripts/create-zanata-xml.py \
-p $project -v $version --srcdir . --txdir . \
-r '**/*.pot' '{path}/{locale_with_underscore}/LC_MESSAGES/{filename}.po' \