Minor translation cleanups
Remove .tx file at the end to have a clean repository. Run setup.py with parameter --quiet, the long list of "extracting messages from file XXX" are not needed. Change-Id: I735f02a968aed8b362803781498ccc8085fa0e03
This commit is contained in:
parent
a9159ada11
commit
fe09040a32
@ -14,6 +14,9 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# Used for setup.py babel commands
|
||||
QUIET="--quiet"
|
||||
|
||||
# Initial transifex setup
|
||||
function setup_translation {
|
||||
# Track in HAS_CONFIG whether we run "tx init" since calling it
|
||||
@ -228,6 +231,8 @@ function send_patch {
|
||||
if [ $HAS_CONFIG -eq 1 ]; then
|
||||
git reset -q .tx/config
|
||||
git checkout -- .tx/config
|
||||
else
|
||||
rm -rf .tx
|
||||
fi
|
||||
|
||||
# Don't send a review if nothing has changed.
|
||||
@ -281,9 +286,9 @@ function extract_messages_log {
|
||||
project=$1
|
||||
|
||||
# Update the .pot files
|
||||
python setup.py extract_messages
|
||||
python setup.py $QUIET extract_messages
|
||||
for level in $LEVELS ; do
|
||||
python setup.py extract_messages --no-default-keywords \
|
||||
python setup.py $QUIET extract_messages --no-default-keywords \
|
||||
--keyword ${LKEYWORD[$level]} \
|
||||
--output-file ${project}/locale/${project}-log-${level}.pot
|
||||
done
|
||||
|
@ -47,7 +47,8 @@ extract_messages_log "$PROJECT"
|
||||
PO_FILES=`find ${PROJECT}/locale -name "${PROJECT}.po"`
|
||||
if [ -n "$PO_FILES" ]; then
|
||||
# Use updated .pot file to update translations
|
||||
python setup.py update_catalog --no-fuzzy-matching --ignore-obsolete=true
|
||||
python setup.py $QUIET update_catalog \
|
||||
--no-fuzzy-matching --ignore-obsolete=true
|
||||
fi
|
||||
# We cannot run update_catalog for the log files, since there is no
|
||||
# option to specify the keyword and thus an update_catalog run would
|
||||
|
Loading…
Reference in New Issue
Block a user