From c661a8ec251dfed55156f152c3c452fda5eea0dc Mon Sep 17 00:00:00 2001 From: Akihiro MOTOKI Date: Fri, 27 Sep 2013 22:49:41 +0900 Subject: [PATCH] Add I18N related configurations * Add Transifex config * Add babel config to setup.cfg (extract_messages, compile_catalog) * Add Babel to test-requirements.txt (It is only required when extracting and compiling catalogs * Move English PO file to openstack_auth.pot (following other OpenStack projects) * Remove English MO file Change-Id: I7a908006c7a2c586d9d86cbfe3970b56f1461125 --- .tx/config | 7 +++++++ babel.cfg | 1 + openstack_auth/locale/en/LC_MESSAGES/django.mo | Bin 378 -> 0 bytes .../LC_MESSAGES/django.po => openstack_auth.pot} | 0 setup.cfg | 9 +++++++++ test-requirements.txt | 1 + 6 files changed, 18 insertions(+) create mode 100644 .tx/config create mode 100644 babel.cfg delete mode 100644 openstack_auth/locale/en/LC_MESSAGES/django.mo rename openstack_auth/locale/{en/LC_MESSAGES/django.po => openstack_auth.pot} (100%) diff --git a/.tx/config b/.tx/config new file mode 100644 index 00000000..e2387054 --- /dev/null +++ b/.tx/config @@ -0,0 +1,7 @@ +[main] +host = https://www.transifex.com + +[horizon.djangopo] +file_filter = openstack_auth/locale//LC_MESSAGES/django.po +source_file = openstack_auth/locale/openstack_auth.pot +source_lang = en diff --git a/babel.cfg b/babel.cfg new file mode 100644 index 00000000..efceab81 --- /dev/null +++ b/babel.cfg @@ -0,0 +1 @@ +[python: **.py] diff --git a/openstack_auth/locale/en/LC_MESSAGES/django.mo b/openstack_auth/locale/en/LC_MESSAGES/django.mo deleted file mode 100644 index 4b16efe6a604dce28cefd04cf252dcd0417fa38d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 378 zcmYL^u};G<6h%QWWn^aXzy_~4l@P%cRMWU6!bz$$tpuBCO)x5U<+unwgx}*^c##mj z(vb(BXW#d8bojl8*+-6%6XXCnL%Jl$5HGLr?418hy?fKk0NDx_+PB78My7o9z$bz% zL^aFGBC7Pp`2cy_m=)Y@n-*%vNHi^L7+?OoRPM^v`L{hZ@YOid&R>65j#&ao2!E-?dBIlVL@-(f)Y<7#P zZMLe>P;2$hh~&j&-c=q*Ib55b^Ucn|s(F@+-F|V8Mk8l~w)oxG273qn8O}FrW$ZOs gzAE49a5JyRknFs!){FKa?9#1_Z5T0a>7CNB{r; diff --git a/openstack_auth/locale/en/LC_MESSAGES/django.po b/openstack_auth/locale/openstack_auth.pot similarity index 100% rename from openstack_auth/locale/en/LC_MESSAGES/django.po rename to openstack_auth/locale/openstack_auth.pot diff --git a/setup.cfg b/setup.cfg index fb0d174a..b9a550cd 100644 --- a/setup.cfg +++ b/setup.cfg @@ -34,3 +34,12 @@ source-dir = doc/source [nosetests] verbosity=2 detailed-errors=1 + +[extract_messages] +keywords = _ gettext ngettext l_ lazy_gettext +mapping_file = babel.cfg +output_file = openstack_auth/locale/openstack_auth.pot + +[compile_catalog] +directory = openstack_auth/locale +domain = django diff --git a/test-requirements.txt b/test-requirements.txt index 089d4998..499a013e 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,4 +1,5 @@ hacking>=0.5.6,<0.8 +Babel>=0.9.6 coverage>=3.6 mox>=0.5.3 sphinx>=1.1.2