Handle empty PO files
Some projects like oslo.messaging and oslo.reports have now empty PO files. Pushing empty files to transifex results in an error. Check before pushing of the main file whether it's empty and only push if it's non-empty - like it's done for the log-level PO files already. Change-Id: Ia757e9d4b88bc8eb7b1ce800a25fe0ed1ebe3e76
This commit is contained in:
parent
2f94bc3576
commit
152efbc3bc
@ -37,7 +37,14 @@ if ! git diff-index --quiet HEAD --; then
|
||||
|
||||
# Transifex project name does not include "."
|
||||
tx_project=${PROJECT/\./}
|
||||
tx --debug --traceback push -s -r ${tx_project}.${tx_project}-translations
|
||||
|
||||
# Only push if there is actual content in the file. We check
|
||||
# that the file contains at least one non-empty msgid string.
|
||||
if grep -q 'msgid "[^"]' ${PROJECT}/locale/${PROJECT}.pot ; then
|
||||
tx --debug --traceback push -s \
|
||||
-r ${tx_project}.${tx_project}-translations
|
||||
fi
|
||||
|
||||
for level in $LEVELS ; do
|
||||
# Only push if there is actual content in the file. We check
|
||||
# that the file contains at least one non-empty msgid string.
|
||||
|
Loading…
Reference in New Issue
Block a user