Skip to content

Commit

Permalink
fixed unicode for Criterion; updated Polish translations
Browse files Browse the repository at this point in the history
  • Loading branch information
pigletto authored and diefenbach committed Jan 20, 2013
1 parent b0d627f commit c59230d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
13 changes: 10 additions & 3 deletions lfs/criteria/models.py
Expand Up @@ -6,6 +6,7 @@
from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.utils.encoding import force_unicode
from django.utils.translation import ugettext_lazy as _, ugettext
from django.template import RequestContext
from django.template.loader import render_to_string
Expand Down Expand Up @@ -148,10 +149,16 @@ class Meta:
]

def __unicode__(self):
""" We're using force unicode as this basically fails:
from django.utils import translation
from django.utils.translation import ugettext_lazy as _
translation.activate('pl')
u'test: %s' % _('Payment method')
"""
return ugettext("%(name)s: %(operator)s %(value)s") % {
'name': self.get_name(),
'operator': self.get_current_operator_as_string(),
'value': self.get_value_as_string()
'name': force_unicode(self.get_name()),
'operator': force_unicode(self.get_current_operator_as_string()),
'value': force_unicode(self.get_value_as_string())
}

def save(self, *args, **kwargs):
Expand Down
Binary file modified lfs/locale/pl/LC_MESSAGES/django.mo
Binary file not shown.
4 changes: 2 additions & 2 deletions lfs/locale/pl/LC_MESSAGES/django.po
Expand Up @@ -8,7 +8,7 @@ msgstr ""
"Project-Id-Version: LFS\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-10-13 20:33+0200\n"
"PO-Revision-Date: 2012-10-15 22:19+0100\n"
"PO-Revision-Date: 2012-10-28 22:25+0100\n"
"Last-Translator: Maciej Wiśniowski <pigletto@gmail.com>\n"
"Language-Team: natcam.pl <hello@natcam.pl>\n"
"Language: \n"
Expand Down Expand Up @@ -1370,7 +1370,7 @@ msgstr "Kraje"
#: criteria/models.py:577
#: templates/manage/payment/payment_methods.html:3
msgid "Payment methods"
msgstr "Metody płatności"
msgstr "Sposoby płatności"

#: criteria/models.py:637
#: templates/manage/shipping_methods/shipping_methods.html:4
Expand Down
2 changes: 2 additions & 0 deletions lfs/other_translations.py
Expand Up @@ -9,3 +9,5 @@
_('Zip Code')
_(u'Last Order Number')
_(u'Format')
_(u"Cart Price")
_(u"Combined Length and Girth")

0 comments on commit c59230d

Please sign in to comment.