mirror of
https://github.com/jazzband/django-admin2.git
synced 2026-04-26 09:34:47 +00:00
Added checkmessages command to i18n.sh
This commit is contained in:
parent
d5a33da0a3
commit
4f70167f49
1 changed files with 10 additions and 0 deletions
10
i18n.sh
10
i18n.sh
|
|
@ -45,6 +45,12 @@ function compilemessages {
|
|||
( cd example2/polls; django-admin.py compilemessages )
|
||||
}
|
||||
|
||||
function checkmessages {
|
||||
ls -1 djadmin2/locale/*/LC_MESSAGES/django.po | xargs -I {} msgfmt -c {}
|
||||
ls -1 example/blog/locale/*/LC_MESSAGES/django.po | xargs -I {} msgfmt -c {}
|
||||
ls -1 example2/polls/locale/*/LC_MESSAGES/django.po | xargs -I {} msgfmt -c {}
|
||||
}
|
||||
|
||||
function pulltx {
|
||||
assert_tx
|
||||
echo "### Pulling new translations from Transifex..."
|
||||
|
|
@ -66,6 +72,7 @@ case $1 in
|
|||
echo "Available commands:"
|
||||
echo "--- makemessages: Generate or update .po files"
|
||||
echo "--- compilemessages: Compile .po files to .mo files";
|
||||
echo "--- checkmessages: Check .po files for syntax errors";
|
||||
echo "--- pulltx: Pull new translations from Transifex";
|
||||
echo "--- pushtx: Push translations and sources to Transifex";
|
||||
;;
|
||||
|
|
@ -75,6 +82,9 @@ case $1 in
|
|||
"compilemessages")
|
||||
compilemessages
|
||||
;;
|
||||
"checkmessages")
|
||||
checkmessages
|
||||
;;
|
||||
"pulltx")
|
||||
pulltx
|
||||
;;
|
||||
|
|
|
|||
Loading…
Reference in a new issue