Make translation scripts more robust
In case of new projects, the locale directory might not exist. Create it so that the jobs do not fail. Change-Id: I9b8af9ae61a026d351d00ae93f1d74877e5925b2
This commit is contained in:
parent
dc063e1e95
commit
edcac0194f
@ -230,6 +230,12 @@ function setup_loglevel_vars {
|
||||
|
||||
# Run extract_messages for user visible messages.
|
||||
function extract_messages {
|
||||
local project=$1
|
||||
|
||||
# In case this is an initial run, the locale directory might not
|
||||
# exist, so create it since extract_messages will fail if it does
|
||||
# not exist. So, create it if needed.
|
||||
mkdir -p ${project}/locale
|
||||
|
||||
# Update the .pot files
|
||||
# The "_C" and "_P" prefix are for more-gettext-support blueprint,
|
||||
|
@ -79,7 +79,7 @@ function propose_python {
|
||||
pull_from_zanata "$PROJECT"
|
||||
|
||||
# Extract all messages from project, including log messages.
|
||||
extract_messages
|
||||
extract_messages "$PROJECT"
|
||||
extract_messages_log "$PROJECT"
|
||||
|
||||
# Now add all changed files to git.
|
||||
@ -123,7 +123,7 @@ function propose_django_openstack_auth {
|
||||
pull_from_zanata "$PROJECT"
|
||||
|
||||
# Update the .pot file
|
||||
extract_messages
|
||||
extract_messages "openstack_auth"
|
||||
|
||||
# Compress downloaded po files
|
||||
compress_po_files "openstack_auth"
|
||||
|
@ -42,7 +42,7 @@ case "$PROJECT" in
|
||||
;;
|
||||
django_openstack_auth)
|
||||
setup_django_openstack_auth "$ZANATA_VERSION"
|
||||
extract_messages
|
||||
extract_messages openstack_auth
|
||||
;;
|
||||
horizon)
|
||||
setup_horizon "$ZANATA_VERSION"
|
||||
@ -55,7 +55,7 @@ case "$PROJECT" in
|
||||
*)
|
||||
setup_project "$PROJECT" "$ZANATA_VERSION"
|
||||
setup_loglevel_vars
|
||||
extract_messages
|
||||
extract_messages "$PROJECT"
|
||||
extract_messages_log "$PROJECT"
|
||||
;;
|
||||
esac
|
||||
|
Loading…
x
Reference in New Issue
Block a user