Translations: Handle non-translated module
extract_messages removes the pot file if it does not contain any translations. But then git add will fail since nothing is to add. This currently breaks keystone proposal: http://logs.openstack.org/periodic/keystone-propose-translation-update/2ef243f Add a test for empty directory and exist early if it exists. Change-Id: I3cce7f81856d579dde36445f722ba513a29fae61
This commit is contained in:
parent
568c1a5b7e
commit
67e91f7801
@ -80,6 +80,12 @@ function propose_python {
|
||||
extract_messages "$modulename"
|
||||
extract_messages_log "$modulename"
|
||||
|
||||
# Check for empty directory and exit early
|
||||
local content=$(ls -A $modulename/locale/)
|
||||
if [[ "$content" == "" ]] ; then
|
||||
return
|
||||
fi
|
||||
|
||||
# Now add all changed files to git.
|
||||
# Note we add them here to not have to differentiate in the functions
|
||||
# between new files and files already under git control.
|
||||
|
Loading…
x
Reference in New Issue
Block a user