Created
September 8, 2017 20:19
-
-
Save ad-m/d24f8cd8fba63302ca3c9d250dab38e8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| manage.py () | |
| { | |
| if [ -f "manage.py" ]; then | |
| manage="manage.py"; | |
| else | |
| if [ -f "../manage.py" ]; then | |
| manage="../manage.py"; | |
| else | |
| if [ -f "../../manage.py" ]; then | |
| manage="../../manage.py"; | |
| else | |
| if [ -f "../../../manage.py" ]; then | |
| manage="../../../manage.py"; | |
| fi; | |
| fi; | |
| fi; | |
| fi; | |
| echo "manage.py path: $manage"; | |
| python "$manage" "$@" | |
| } | |
| function l10n () | |
| { | |
| manage.py makemessages -l pl && poedit locale/pl/LC_MESSAGES/django.po && manage.py compilemessages -l pl | |
| } | |
| function mass_l10n () | |
| { | |
| find . -name 'models.py' | while read line; do | |
| pushd ${line%/*}; | |
| l10n; | |
| popd; | |
| done | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment