Fix transifex project names
Use the same rules for names when pushing resources as we do in setup_project - transifex does not allow "." in the resource names. This fixes translation update of projecs like oslo.db. Change-Id: Idb47c0632ed0771e90d363857bf37fcf28019630
This commit is contained in:
parent
4977aa031a
commit
5a30d08a65
@ -36,14 +36,17 @@ git add $PROJECT/locale/*
|
|||||||
if [ ! `git diff-index --quiet HEAD --` ]
|
if [ ! `git diff-index --quiet HEAD --` ]
|
||||||
then
|
then
|
||||||
# Push .pot changes to transifex
|
# Push .pot changes to transifex
|
||||||
tx --debug --traceback push -s -r ${PROJECT}.${PROJECT}-translations
|
|
||||||
|
# Transifex project name does not include "."
|
||||||
|
tx_project=${PROJECT/\./}
|
||||||
|
tx --debug --traceback push -s -r ${tx_project}.${tx_project}-translations
|
||||||
for level in $LEVELS ; do
|
for level in $LEVELS ; do
|
||||||
# Only push if there is actual content in the file. We check
|
# Only push if there is actual content in the file. We check
|
||||||
# that the file contains at least one non-empty msgid string.
|
# that the file contains at least one non-empty msgid string.
|
||||||
if grep -q 'msgid "[^"]' ${PROJECT}/locale/${PROJECT}-log-${level}.pot
|
if grep -q 'msgid "[^"]' ${PROJECT}/locale/${PROJECT}-log-${level}.pot
|
||||||
then
|
then
|
||||||
tx --debug --traceback push -s \
|
tx --debug --traceback push -s \
|
||||||
-r ${PROJECT}.${PROJECT}-log-${level}-translations
|
-r ${tx_project}.${tx_project}-log-${level}-translations
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user