浏览代码

Correct i18n issues

* Missing template tags
* Incorrect message formatting
master
Dan Atkinson 13 年前
父节点
当前提交
6046c2ebf0

+ 10
- 12
oscar/apps/basket/abstract_models.py 查看文件

@@ -652,19 +652,17 @@ class AbstractLine(models.Model):
652 652
 
653 653
         current_price_incl_tax = self.product.stockrecord.price_incl_tax
654 654
         if current_price_incl_tax > self.price_incl_tax:
655
-            msg = (
656
-                u"The price of '%(product)s' has increased from %(old_price)s "
657
-                u"to %(new_price)s since you added it to your basket")
658
-            return _(msg) % {'product': self.product.get_title(),
659
-                             'old_price': currency(self.price_incl_tax),
660
-                             'new_price': currency(current_price_incl_tax)}
655
+            return _(
656
+                u"The price of '%(product)s' has increased from %(old_price)s to %(new_price)s since you added it to your basket") % {
657
+                    'product': self.product.get_title(),
658
+                    'old_price': currency(self.price_incl_tax),
659
+                    'new_price': currency(current_price_incl_tax)}
661 660
         if current_price_incl_tax < self.price_incl_tax:
662
-            msg = (
663
-                u"The price of '%(product)s' has decreased from %(old_price)s "
664
-                u"to %(new_price)s since you added it to your basket")
665
-            return _(msg) % {'product': self.product.get_title(),
666
-                             'old_price': currency(self.price_incl_tax),
667
-                             'new_price': currency(current_price_incl_tax)}
661
+            return _(
662
+                u"The price of '%(product)s' has decreased from %(old_price)s to %(new_price)s since you added it to your basket") % {
663
+                    'product': self.product.get_title(),
664
+                    'old_price': currency(self.price_incl_tax),
665
+                    'new_price': currency(current_price_incl_tax)}
668 666
 
669 667
 
670 668
 class AbstractLineAttribute(models.Model):

+ 1
- 1
oscar/apps/dashboard/reports/forms.py 查看文件

@@ -18,7 +18,7 @@ class ReportForm(forms.Form):
18 18
     date_from = forms.DateField(label=_("Date from"))
19 19
     date_to = forms.DateField(label=_("Date to"),
20 20
                               help_text=_("The report is inclusive of this date"))
21
-    download = forms.BooleanField(required=False)
21
+    download = forms.BooleanField(label=_("Download"), required=False)
22 22
 
23 23
     def clean(self):
24 24
         if 'date_from' in self.cleaned_data and 'date_to' in self.cleaned_data and self.cleaned_data['date_from'] > self.cleaned_data['date_to']:

+ 1
- 1
oscar/templates/oscar/dashboard/catalogue/stockalert_list.html 查看文件

@@ -24,7 +24,7 @@
24 24
 {% block dashboard_content %}
25 25
 
26 26
 <div class="well well-info">
27
-	<h3 class="app-ico ico_sync icon">Filter</h3>
27
+	<h3 class="app-ico ico_sync icon">{% trans 'Filter' %}</h3>
28 28
     <p>
29 29
 	<a class="btn btn-info" href="{% url dashboard:stock-alert-list %}">{% trans "All" %}</a>
30 30
 	<a class="btn btn-info" href="{% url dashboard:stock-alert-list %}?status=Open">{% trans "Open" %}</a>

+ 1
- 1
oscar/templates/oscar/dashboard/index.html 查看文件

@@ -29,7 +29,7 @@
29 29
 <div class='row-fluid'>
30 30
     <div class="span12">
31 31
         <div id="order-graph">
32
-            <div class='bar-caption'><h1>Latest Orders (Hourly)</h1></div>
32
+            <div class='bar-caption'><h1>{% trans "Latest Orders (Hourly)" %}</h1></div>
33 33
             <div class='bar-y-axis'>
34 34
                 <ul>
35 35
                 {% for y_value in hourly_report_dict.y_range %}

+ 1
- 1
oscar/templates/oscar/dashboard/orders/statistics.html 查看文件

@@ -33,7 +33,7 @@
33 33
     <form method="get" action="{% url dashboard:order-stats %}" class="form-inline">
34 34
         <h3 class="app-ico ico_magnify icon">Filter</h3>
35 35
         {% include "partials/form_fields_inline.html" with form=form %}
36
-		<button type="submit" class="btn btn-primary">Filter result</button>
36
+		<button type="submit" class="btn btn-primary">{% trans "Filter result" %}</button>
37 37
 		<a href="{% url dashboard:order-stats %}" class="btn">{% trans "Reset" %}</a>
38 38
     </form>
39 39
 </div>

+ 3
- 3
oscar/templates/oscar/dashboard/pages/index.html 查看文件

@@ -19,10 +19,10 @@
19 19
 
20 20
 {% block header %}
21 21
 <div class="well well-info">
22
-    <h3>Search</h3>
22
+    <h3>{% trans "Search" %}</h3>
23 23
     <form action="." method="get" class="form-inline">
24 24
         {% include "partials/form_fields_inline.html" with form=form %}
25
-        <input type="submit" value="Search" class="btn btn-primary"/>
25
+        <input type="submit" value="{% trans "Search" %}" class="btn btn-primary"/>
26 26
     </form>
27 27
 </div>
28 28
 {% endblock header %}
@@ -30,7 +30,7 @@
30 30
 {% block dashboard_content %}
31 31
 
32 32
 <div class="well well-success">
33
-    <h3>Create new page</h3>
33
+    <h3>{% trans "Create new page" %}</h3>
34 34
     <form action="{% url dashboard:page-create %}" method="get" class="form-inline">
35 35
         <input type="submit" value="{% trans "Create" %}" class="btn-primary" />
36 36
     </form>

+ 1
- 1
oscar/templates/oscar/dashboard/promotions/pagepromotion_list.html 查看文件

@@ -27,7 +27,7 @@
27 27
 {% block dashboard_content %}
28 28
 
29 29
 <div class="well well-danger">
30
-    <h3 class="app-ico ico_view icon">View by page</h3>
30
+    <h3 class="app-ico ico_view icon">{% trans "View by page" %}</h3>
31 31
 	<a href="{% url dashboard:promotion-list %}" class="btn btn-primary">{% trans "View all content blocks" %}</a>
32 32
 	<a href="{% url dashboard:promotion-list-by-page %}" class="btn">{% trans "View content blocks by page" %}</a>
33 33
 </div>

+ 1
- 1
oscar/templates/oscar/dashboard/reports/index.html 查看文件

@@ -28,7 +28,7 @@
28 28
 <form method="get" action="." class="form-horizontal">
29 29
     {% include "partials/form_fields.html" with form=form %}
30 30
     <div class="form-actions">
31
-		<button type="submit" class="btn btn-primary">Generate report</button>
31
+		<button type="submit" class="btn btn-primary">{% trans "Generate report" %}</button>
32 32
     </div>
33 33
 </form>
34 34
 

+ 2
- 2
oscar/templates/oscar/dashboard/users/index.html 查看文件

@@ -45,8 +45,8 @@
45 45
             <th>{% trans "Email" %}</th>
46 46
             <th>{% trans "First name" %}</th>
47 47
             <th>{% trans "Last name" %}</th>
48
-            <th>{% trans "Active" %}</th>
49
-            <th>{% trans "Staff status" %}</th>
48
+            <td>{{ user.is_active|yesno:_("True,False") }}</td>
49
+            <td>{{ user.is_staff|yesno:_("True,False") }}</td>
50 50
             <th>{% trans "Date registered" %}</th>
51 51
             <th>{% trans "Num Orders" %}</th>
52 52
             <th></th>

正在加载...
取消
保存