From 3e1373b7a0a96cb87f217f3ecbbaa072a2b7efe6 Mon Sep 17 00:00:00 2001 From: zhengxie Date: Sat, 1 Nov 2014 13:40:07 +0800 Subject: [PATCH] Update fabfile --- fabfile/__init__.py | 1 + fabfile.py => fabfile/locale.py | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 fabfile/__init__.py rename fabfile.py => fabfile/locale.py (88%) diff --git a/fabfile/__init__.py b/fabfile/__init__.py new file mode 100644 index 0000000000..a75f7cb9c7 --- /dev/null +++ b/fabfile/__init__.py @@ -0,0 +1 @@ +from . import locale diff --git a/fabfile.py b/fabfile/locale.py similarity index 88% rename from fabfile.py rename to fabfile/locale.py index 313700bba8..4e439c8e4d 100644 --- a/fabfile.py +++ b/fabfile/locale.py @@ -1,10 +1,11 @@ """ -Tools for automating daily tasks. +Tools for i18n. """ -from fabric.api import local +from fabric.api import local, task from fabric.colors import red, green -def i18n_upload(): +@task +def push(): """Update source language, and upload to Transifex. """ local('django-admin.py makemessages -l en -e py,html -i "thirdpart*"') @@ -15,12 +16,14 @@ def i18n_upload(): local('tx push -s') -def i18n_pull(): +@task +def pull(): """Update local po files with Transifex. """ local('tx pull') -def i18n_compile(): +@task(default=True) +def compile(): """Compile po files. """ local('django-admin.py compilemessages')