Skip to content

Commit fd98582

Browse files
committed
Add compiled .mo files and use ugettext_lazy
Adds the compiled .mo files so translations work out of the box. Moved all calls from `gettext_lazy` to `ugettext_lazy` for unicode support (needed e.g. for French accents). Updated MANIFEST.in to include the locale files for install.
1 parent 541af19 commit fd98582

File tree

13 files changed

+10
-9
lines changed

13 files changed

+10
-9
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ coverage.xml
4444
*,cover
4545

4646
# Translations
47-
*.mo
47+
#*.mo Include so users don't have to self-build
4848
*.pot
4949

5050
# Django stuff:

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ include README.md
33
recursive-include wooey/templates *
44
recursive-include wooey/static *
55
recursive-include wooey/conf *
6+
recursive-include wooey/locale *
67
recursive-exclude * *.pyc

wooey/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from __future__ import absolute_import
22
from django.contrib.admin import ModelAdmin, site, TabularInline
33
from django.forms import ModelForm, ValidationError
4-
from django.utils.translation import gettext_lazy as _
4+
from django.utils.translation import ugettext_lazy as _
55

66
from .models import Script, ScriptVersion, ScriptGroup, ScriptParameter, WooeyJob, ScriptParameterGroup, WooeyFile
77

wooey/backend/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from django.db.utils import OperationalError
1818
from django.core.files.storage import default_storage
1919
from django.core.files import File
20-
from django.utils.translation import gettext_lazy as _
20+
from django.utils.translation import ugettext_lazy as _
2121
from django.db.models import Q
2222

2323
from celery.contrib import rdb

wooey/docs_settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import os
22
from django.conf import settings
3-
from django.utils.translation import gettext_lazy as _
3+
from django.utils.translation import ugettext_lazy as _
44
SECRET_KEY = 'not-so-secret'
55
from .settings import *

wooey/locale/de/LC_MESSAGES/django.mo

4 KB
Binary file not shown.

wooey/locale/fr/LC_MESSAGES/django.mo

4.02 KB
Binary file not shown.

wooey/locale/nl/LC_MESSAGES/django.mo

3.88 KB
Binary file not shown.

wooey/models/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from django.core.files.storage import SuspiciousFileOperation
1616
from django.core.urlresolvers import reverse_lazy, reverse
1717
from django.contrib.auth.models import Group
18-
from django.utils.translation import gettext_lazy as _
18+
from django.utils.translation import ugettext_lazy as _
1919
from django.db import transaction
2020
from django.utils.text import get_valid_filename
2121

wooey/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
__author__ = 'chris'
22
import os
33
from django.conf import settings
4-
from django.utils.translation import gettext_lazy as _
4+
from django.utils.translation import ugettext_lazy as _
55

66

77
def get(key, default):

0 commit comments

Comments
 (0)