Browse Source

Added i18n support to oscar's templates

master
David Winterbottom 13 years ago
parent
commit
a74007399c
45 changed files with 304 additions and 284 deletions
  1. 3
    2
      oscar/apps/partner/wrappers.py
  2. 7
    7
      oscar/templates/README.rst
  3. 3
    2
      oscar/templates/base.html
  4. 37
    34
      oscar/templates/basket/basket.html
  5. 6
    5
      oscar/templates/basket/partials/basket_quick.html
  6. 5
    10
      oscar/templates/basket/saved_list.html
  7. 4
    4
      oscar/templates/catalogue/browse.html
  8. 18
    18
      oscar/templates/catalogue/detail.html
  9. 3
    1
      oscar/templates/catalogue/partials/add_to_basket_form.html
  10. 2
    1
      oscar/templates/catalogue/partials/add_to_basket_form_compact.html
  11. 5
    4
      oscar/templates/catalogue/partials/gallery.html
  12. 8
    3
      oscar/templates/catalogue/partials/pagination.html
  13. 3
    2
      oscar/templates/catalogue/partials/product.html
  14. 2
    1
      oscar/templates/catalogue/partials/stock_record.html
  15. 17
    24
      oscar/templates/checkout/checkout.html
  16. 8
    7
      oscar/templates/checkout/gateway.html
  17. 13
    13
      oscar/templates/checkout/payment_details.html
  18. 4
    3
      oscar/templates/checkout/preview.html
  19. 9
    9
      oscar/templates/checkout/shipping_address.html
  20. 6
    6
      oscar/templates/checkout/shipping_methods.html
  21. 22
    19
      oscar/templates/checkout/thank_you.html
  22. 4
    3
      oscar/templates/checkout/user_address_delete.html
  23. 4
    3
      oscar/templates/checkout/user_address_form.html
  24. 2
    2
      oscar/templates/flatpages/help.html
  25. 8
    9
      oscar/templates/offer/detail.html
  26. 4
    5
      oscar/templates/partials/brand.html
  27. 2
    3
      oscar/templates/partials/extrahead.html
  28. 3
    2
      oscar/templates/partials/footer.html
  29. 0
    6
      oscar/templates/partials/footer_checkout.html
  30. 6
    5
      oscar/templates/partials/nav_accounts.html
  31. 14
    13
      oscar/templates/partials/nav_alternate.html
  32. 14
    12
      oscar/templates/partials/nav_primary.html
  33. 2
    1
      oscar/templates/partials/search.html
  34. 3
    1
      oscar/templates/promotions/automaticproductlist.html
  35. 2
    1
      oscar/templates/promotions/default.html
  36. 3
    1
      oscar/templates/promotions/handpickedproductlist.html
  37. 2
    1
      oscar/templates/promotions/home.html
  38. 3
    2
      oscar/templates/promotions/partials/product_carousel.html
  39. 5
    4
      oscar/templates/promotions/singleproduct.html
  40. 3
    7
      oscar/templates/registration/password_reset_complete.html
  41. 5
    3
      oscar/templates/reviews/_vote_bit.html
  42. 5
    4
      oscar/templates/reviews/add_review.html
  43. 3
    2
      oscar/templates/reviews/review.html
  44. 15
    15
      oscar/templates/reviews/reviews.html
  45. 7
    4
      runtests.py

+ 3
- 2
oscar/apps/partner/wrappers.py View File

@@ -30,8 +30,9 @@ class DefaultWrapper(object):
30 30
         if max_qty is None:
31 31
             return True, None
32 32
         if max_qty < quantity:
33
-            return False, _("'%s' - A maximum of %d can be bought" % (
34
-                stockrecord.product.title, max_qty))
33
+            return False, _("'%(title)s' - A maximum of %(max)d can be bought" %
34
+                            {'title': stockrecord.product.title,
35
+                             'max': max_qty})
35 36
         return True, None
36 37
 
37 38
     def max_purchase_quantity(self, stockrecord, user=None):

oscar/templates/templates.rst → oscar/templates/README.rst View File

@@ -14,26 +14,26 @@ Layouts
14 14
 Currently there are 5 different layouts that extend the base.html
15 15
 
16 16
 layout.html :
17
-    For single column layouts 
17
+    For single column layouts
18 18
 * detail.html
19 19
 * basket.html
20 20
 * flatpages/default.html
21 21
 
22 22
 layout_2_col.html :
23 23
     For two column layouts whereby first column is subservient (aside) to the main column
24
-* home.html 
24
+* home.html
25 25
 * browse.html
26 26
 
27 27
 layout_3_col.html :
28
-    For three column layouts whereby first and third columns are subservient (aside) to the main middlecolumn 
28
+    For three column layouts whereby first and third columns are subservient (aside) to the main middlecolumn
29 29
 * Currently NOT used
30 30
 
31 31
 checkout/layout.html :
32 32
   For the checkout pages, removes the main navigation and uses a single column by default
33
-* checkout.html 
34
-* gateway.html 
33
+* checkout.html
34
+* gateway.html
35 35
 * thank_you.html
36
-  
36
+
37 37
 dashboard/layout.html :
38 38
   For dashboard section specifically different from the other frontend features:
39 39
 * separate css
@@ -57,7 +57,7 @@ form_fields_inline.html :
57 57
 Partials form_fields::
58 58
 
59 59
     'include "partials/form_fields.html" with form=form'
60
-    
60
+
61 61
 Partials form_fields_inline::
62 62
 
63 63
     'include "partials/form_fields_inline.html" with form=form'

+ 3
- 2
oscar/templates/base.html View File

@@ -1,7 +1,8 @@
1
+{% load i18n %}
1 2
 <!DOCTYPE html> 
2 3
 <html lang="{% block language %}en-gb{% endblock %}">
3 4
     <head>
4
-		<title>{% if display_version %}[Build {{ version }}] {% endif %}{% block title %}{{ shop_name }} - {{ shop_tagline }}{% endblock %}</title>
5
+		<title>{% if display_version %}[{% trans "Build" %} {{ version }}] {% endif %}{% block title %}{{ shop_name }} - {{ shop_tagline }}{% endblock %}</title>
5 6
         <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
6 7
         <meta name="created" content='{% now "jS M Y h:i" %}' />
7 8
         <meta name="description" content="{% block description %}{% endblock %}" />
@@ -66,6 +67,6 @@
66 67
 		</script>
67 68
 
68 69
 		{# Page meta-data #}
69
-		<!-- Version: {{ version }} -->
70
+		<!-- {% trans "Version:" %} {{ version }} -->
70 71
     </body>
71 72
 </html>

+ 37
- 34
oscar/templates/basket/basket.html View File

@@ -1,9 +1,10 @@
1 1
 {% extends "layout.html" %}
2 2
 {% load currency_filters %}
3 3
 {% load thumbnail %}
4
+{% load i18n %}
4 5
 
5 6
 {% block title %}
6
-Basket | {{ block.super }}
7
+{% trans "Basket" %} | {{ block.super }}
7 8
 {% endblock %}
8 9
 
9 10
 {% block checkout-nav %}
@@ -12,32 +13,34 @@ Basket | {{ block.super }}
12 13
 
13 14
 {% block header %}
14 15
 <div class="page-header action">
15
-    <h1>Basket</h1>
16
+    <h1>{% trans "Basket" %}</h1>
16 17
 </div>
17 18
 {% endblock header %}
18 19
 
19 20
 {% block content %}
20 21
 
21 22
 {% if basket_warnings %}
22
-	<h5>Important messages about items in your basket</h5>
23
+    <h5>{% trans "Important messages about items in your basket" %}</h5>
23 24
 	{% for warning in basket_warnings %}
24 25
 	<div class="alert">{{ warning }}</div>
25 26
 	{% endfor %}
26 27
 {% endif %}
27 28
 
28 29
 {% if upsell_messages %}
29
-	<h2>You could be missing out on offers!</h2>
30
+<h2>{% trans "You could be missing out on offers!" %}</h2>
30 31
 	{% for upsell in upsell_messages %}
31
-	<div class="warning">{{ upsell.message }} to quality for the <a href="{{ upsell.offer.get_absolute_url }}">{{ upsell.offer.name }}</a> special offer</div>
32
+    {% blocktrans with message=upsell.message url=upsell.offer.get_absolute_url offer_name=upsell.offer.name %}
33
+	<div class="warning">{{ upsell_message }} to qualify for the <a href="{{ url }}">{{ offer_name }}</a> special offer</div>
34
+    {% endblocktrans %}
32 35
 	{% endfor %}
33 36
 {% endif %}
34 37
 
35 38
 {% if not basket.is_empty %}
36 39
 <div class="basket-title">
37 40
     <div class="row-fluid">
38
-        <h4 class="span6">Items to buy now</h4>
39
-        <h4 class="span5">Quantity</h4>
40
-        <h4 class="span1">Price</h4>
41
+        <h4 class="span6">{% trans "Items to buy now" %}</h4>
42
+        <h4 class="span5">{% trans "Quantity" %}</h4>
43
+        <h4 class="span1">{% trans "Price" %}</h4>
41 44
     </div>
42 45
 </div>
43 46
 
@@ -64,10 +67,10 @@ Basket | {{ block.super }}
64 67
     	    <div class="span5">
65 68
     		    <div class="checkout-quantity">
66 69
     		        {{ form.quantity }} 
67
-    		        <button class="btn" type="submit">Update</button>
68
-    			    <a href="#" data-id="{{ forloop.counter0 }}" data-behaviours="remove" class="inline">Remove</a>
70
+                    <button class="btn" type="submit">{% trans "Update" %}</button>
71
+                    <a href="#" data-id="{{ forloop.counter0 }}" data-behaviours="remove" class="inline">{% trans "Remove" %}</a>
69 72
 					{% if request.user.is_authenticated %}
70
-					| <a href="#" data-id="{{ forloop.counter0 }}" data-behaviours="save" class="inline">Save for later</a>
73
+                    | <a href="#" data-id="{{ forloop.counter0 }}" data-behaviours="save" class="inline">{% trans "Save for later" %}</a>
71 74
 					{% endif %}
72 75
     			    <div style="display:none">
73 76
     				    {{ form.save_for_later }}
@@ -87,18 +90,18 @@ Basket | {{ block.super }}
87 90
 	{% block vouchers %}
88 91
 	<div class="span6">
89 92
 		<div class="sub-header">
90
-		    <h2>Voucher/Promo Code</h2>
93
+            <h2>{% trans "Voucher/Promo Code" %}</h2>
91 94
 		</div>
92
-		<p id="voucher_form_link"><a href="#voucher" class="btn">I have a voucher code...</a></p>
95
+        <p id="voucher_form_link"><a href="#voucher" class="btn">{% trans "I have a voucher code..." %}</a></p>
93 96
 
94 97
 	        <div id="voucher_form_container" style="display:none">
95
-	        	<h4>Voucher code</h4>
98
+                <h4>{% trans "Voucher code" %}</h4>
96 99
 	        	<form action="{% url basket:vouchers-add %}" method="post" class="form-horizontal">
97 100
 	        		{% csrf_token %}
98 101
 	        		{% include "partials/form_fields.html" with form=voucher_form %}
99 102
 	        		<div class="form-actions">
100
-	        			<button type="submit" class="btn btn-info">Add voucher</button>
101
-	        			or <a href="#" id="voucher_form_cancel">cancel</a>
103
+                        <button type="submit" class="btn btn-info">{% trans "Add voucher" %}</button>
104
+                        or <a href="#" id="voucher_form_cancel">{% trans "cancel" %}</a>
102 105
 	        		</div>
103 106
 	        	</form>
104 107
 	        </div>
@@ -108,7 +111,7 @@ Basket | {{ block.super }}
108 111
 	{% block baskettotals %}
109 112
 	<div class="span6">
110 113
 		<div class="sub-header">
111
-			<h2>Basket Totals</h2>
114
+            <h2>{% trans "Basket Totals" %}</h2>
112 115
 		</div>
113 116
 		<div id="basket_totals">
114 117
 			<table class="table table-striped table-condensed">
@@ -116,20 +119,20 @@ Basket | {{ block.super }}
116 119
 				{% with offer_discounts=basket.offer_discounts voucher_discounts=basket.grouped_voucher_discounts %}
117 120
 				{% if offer_discounts or voucher_discounts %}
118 121
 					<tr>
119
-						<th>Basket total (before discounts)</th>
122
+                        <th>{% trans "Basket total (before discounts)" %}</th>
120 123
 						<td>{{ basket.total_incl_tax_excl_discounts|currency }}</td>
121 124
 					</tr>
122 125
 					{% if offer_discounts %}
123 126
 						{% for discount in offer_discounts %}
124 127
 						<tr>
125
-							<td class="basket-discount">Special offer: {{ discount.name }}</td>
128
+                            <td class="basket-discount">{% trans "Special offer:" %} {{ discount.name }}</td>
126 129
 							<td>-{{ discount.discount|currency }}</td>
127 130
 						</tr>
128 131
 						{% endfor %}
129 132
 					{% endif %}
130 133
 					{% if voucher_discounts %}
131 134
 						<tr>
132
-							<th>Vouchers</th>
135
+                            <th>{% trans "Vouchers" %}</th>
133 136
 							<td></td>
134 137
 						</tr>
135 138
 						{% for discount in voucher_discounts %}
@@ -146,22 +149,22 @@ Basket | {{ block.super }}
146 149
 						{% endfor %}
147 150
 					{% endif %}
148 151
 					<tr>
149
-						<th>Basket total (after discounts)</th>
152
+                        <th>{% trans "Basket total (after discounts)" %}</th>
150 153
 						<td>{{ basket.total_incl_tax|currency }}</td>
151 154
 					</tr>
152 155
 				{% else %}
153 156
 					<tr>
154
-						<th>Basket total</th>
157
+                        <th>{% trans "Basket total" %}</th>
155 158
 						<td>{{ basket.total_incl_tax|currency }}</td>
156 159
 					</tr>
157 160
 				{% endif %}
158 161
 				{% endwith %}
159 162
 				<tr>
160
-					<th>Shipping ({{ shipping_method.name }})</th>
163
+                    <th>{% trans "Shipping" %} ({{ shipping_method.name }})</th>
161 164
 					<td>{{ shipping_charge_incl_tax|currency }}</td>
162 165
 				</tr>
163 166
 				<tr>
164
-					<th class="total"><h4>Order total</h4></th>
167
+                    <th class="total"><h4>{% trans "Order total" %}</h4></th>
165 168
 					<td class="total"><h4>{{ order_total_incl_tax|currency }}</h4></td>
166 169
 				</tr>
167 170
 				</tbody>
@@ -174,30 +177,30 @@ Basket | {{ block.super }}
174 177
 	
175 178
 {% block formactions %}
176 179
 	<div class="form-actions clearfix" >
177
-		<a href="{% url checkout:index %}" class="pull-right btn btn-large btn-primary">Proceed to checkout</a>
180
+        <a href="{% url checkout:index %}" class="pull-right btn btn-large btn-primary">{% trans "Proceed to checkout" %}</a>
178 181
 	</div>
179 182
 {% endblock formactions %}
180 183
 
181 184
 {% else %}
182 185
     {% block emptybasket %}
183
-        <p>Your basket is empty, you should probably add some items to buy.</p>
184
-        <a href="/" class="btn btn-primary">Continue shopping</a>
186
+    <p>{% trans "Your basket is empty, you should probably add some items to buy." %}</p>
187
+    <a href="/" class="btn btn-primary">{% trans "Continue shopping" %}</a>
185 188
     {% endblock %}
186 189
 {% endif %}
187 190
 
188 191
 {% if request.user.is_authenticated %}
189 192
 <div class="well">
190 193
     <div class="sub-header">
191
-        <h3>To buy later</h3>
194
+        <h3>{% trans "To buy later" %}</h3>
192 195
     </div>
193 196
 
194 197
     {% if not saved_formset %}
195
-    <p>Your saved basket is empty.</p>
198
+    <p>{% trans "Your saved basket is empty." %}</p>
196 199
 
197 200
     {% else %}
198 201
     <div class="row-fluid basket-title">
199
-        <h4 class="span8">To buy an item now, click "Move to basket"</h4>
200
-        <h4 class="span4">Price</h4>
202
+        <h4 class="span8">{% trans "To buy an item now, click 'Move to basket'" %}</h4>
203
+        <h4 class="span4">{% trans "Price" %}</h4>
201 204
     </div>
202 205
     <form action="{% url basket:saved %}" method="post" class="form-stacked later_summary" id="saved_basket_formset">
203 206
         {% csrf_token %}
@@ -214,15 +217,15 @@ Basket | {{ block.super }}
214 217
 					{% endwith %}
215 218
     		    </div>
216 219
     			<h4><a href="{{ form.instance.product.get_absolute_url }}">{{ form.instance.description }}</a></h4>
217
-    			<p class="app-ico instock avaliability ">{{ form.instance.product.stockrecord.availability }}</p>
218
-    			<a href="#" data-id="{{ forloop.counter0 }}" data-behaviours="remove">Remove</a>
220
+                <p class="app-ico {{ form.instance.product.stockrecord.availability_code }}">{{ form.instance.product.stockrecord.availability }}</p>
221
+                <a href="#" data-id="{{ forloop.counter0 }}" data-behaviours="remove">{% trans "Remove" %}</a>
219 222
     			<div style="display:none">
220 223
     				{{ form.move_to_basket }}
221 224
     				{{ form.DELETE }}
222 225
     			</div>
223 226
     		</div>
224 227
             <div class="span2"><p class="price">{{ form.instance.unit_price_incl_tax|currency }}</p></div>
225
-            <div class="span2"><a href="#" data-id="{{ forloop.counter0 }}" class="btn btn-success pull-right" data-behaviours="move">Move to basket</a></div>
228
+            <div class="span2"><a href="#" data-id="{{ forloop.counter0 }}" class="btn btn-success pull-right" data-behaviours="move">{% trans "Move to basket" %}</a></div>
226 229
         </div>
227 230
         {% endfor %}
228 231
     </form>

+ 6
- 5
oscar/templates/basket/partials/basket_quick.html View File

@@ -1,6 +1,7 @@
1 1
 {% load currency_filters %}
2 2
 {% load history_tags %}
3 3
 {% load basket_tags %}
4
+{% load i18n %}
4 5
 
5 6
 <ul class="basket_item">
6 7
 {% if request.basket.num_lines %}
@@ -8,18 +9,18 @@
8 9
     <li>
9 10
         <article>
10 11
             <h4><a href="{{ line.product.get_absolute_url }}">{{ line.description }}</a></h4>
11
-            <p><strong>Quantity:</strong> <span>{{ line.quantity }}</span> x <span>{{ line.unit_price_excl_tax|currency }}</span></p>
12
+			<p><strong>{% trans "Quantity:" %}</strong> <span>{{ line.quantity }}</span> x <span>{{ line.unit_price_excl_tax|currency }}</span></p>
12 13
         </article>
13 14
     </li>
14 15
     {% endfor %}
15 16
     <li class="form-actions">
16
-        <h4><small>Total Excl Tax: {{ request.basket.total_excl_tax|currency }}</small> Total: {{ basket.total_incl_tax|currency }}</h4>
17
-		<p><a href="{% url basket:summary %}" class="btn btn-info btn-small">View Basket</a></p>
18
-        <p><a href="{% url checkout:index %}" class="btn btn-primary btn-small">Checkout</a></p>
17
+	<h4><small>{% trans "Total Excl Tax:" %} {{ request.basket.total_excl_tax|currency }}</small> {% trans "Total:" %} {{ basket.total_incl_tax|currency }}</h4>
18
+	<p><a href="{% url basket:summary %}" class="btn btn-info btn-small">{% trans "View Basket" %}</a></p>
19
+	<p><a href="{% url checkout:index %}" class="btn btn-primary btn-small">{% trans "Checkout" %}</a></p>
19 20
     </li>
20 21
 {% else %}
21 22
     <li>
22
-        <p>Your basket is empty, you should probably add some items to buy.</p>
23
+	<p>{% trans "Your basket is empty, you should probably add some items to buy." %}</p>
23 24
     </li>
24 25
 {% endif %}
25 26
 </ul>

+ 5
- 10
oscar/templates/basket/saved_list.html View File

@@ -1,18 +1,13 @@
1 1
 {% extends "layout.html" %}
2
-
3 2
 {% load currency_filters %}
3
+{% load i18n %}
4 4
 
5 5
 {% block header %}
6
-<h2>Saved Basket</h2>
6
+    <h2>{% trans "Saved Basket" %}</h2>
7 7
 {% endblock header %}
8 8
 
9
-
10 9
 {% block content %}
11
-
12
-{% for item in saved_items %}
13
-<p>{{ item }}</p>
14
-{% endfor %}
15
-
16
-
10
+    {% for item in saved_items %}
11
+    <p>{{ item }}</p>
12
+    {% endfor %}
17 13
 {% endblock content %}
18
-

+ 4
- 4
oscar/templates/catalogue/browse.html View File

@@ -2,7 +2,7 @@
2 2
 {% load currency_filters %}
3 3
 {% load basket_tags %}
4 4
 {% load promotion_tags %}
5
-
5
+{% load i18n %}
6 6
 
7 7
 {% block title %}
8 8
 {{ summary }} | {{ block.super }}
@@ -14,7 +14,7 @@
14 14
 {% block breadcrumbs %}
15 15
 <ul class="breadcrumb">
16 16
     <li>
17
-        <a href="{% url promotions:home %}">Home</a>
17
+	<a href="{% url promotions:home %}">{% trans "Home" %}</a>
18 18
         <span class="divider">/</span>
19 19
     </li>
20 20
     <li class="active"><a href=".">{{ summary }}</a></li>
@@ -25,7 +25,7 @@
25 25
     <div class="side_categories" style="padding: 8px 0;">
26 26
         {% if categories %}
27 27
     	<ul class="nav nav-list">
28
-    	    <li class="nav-header">Browse Categories</li>
28
+			<li class="nav-header">{% trans "Browse Categories" %}</li>
29 29
     	    {% for category in categories %}
30 30
             <li><a href="{{ category.0.get_absolute_url }}">{{ category.0.name }}</a>
31 31
             	{% if category.1 %}
@@ -72,6 +72,6 @@
72 72
 			</div>
73 73
 		</section>
74 74
     {% else %}
75
-		<p class="nonefound">No products found.</p>
75
+	<p class="nonefound">{% trans "No products found." %}</p>
76 76
     {% endif %}
77 77
 {% endblock content %}

+ 18
- 18
oscar/templates/catalogue/detail.html View File

@@ -1,7 +1,7 @@
1 1
 {% extends "layout.html" %}
2
-
3 2
 {% load currency_filters %}
4 3
 {% load history_tags %}
4
+{% load i18n %}
5 5
 
6 6
 {% block title %}
7 7
 {{ product.title }} | {{ block.super }}
@@ -10,7 +10,7 @@
10 10
 {% block breadcrumbs %}
11 11
 <ul class="breadcrumb">
12 12
     <li>
13
-        <a href="{% url promotions:home %}">Home</a>
13
+	<a href="{% url promotions:home %}">{% trans "Home" %}</a>
14 14
         <span class="divider">/</span>
15 15
     </li>
16 16
 	{% with category=product.categories.all.0 %}
@@ -57,15 +57,15 @@
57 57
 			{% else %}
58 58
 			<p class="star">No Rating 
59 59
 			
60
-			<a href="{% url catalogue:reviews-add product.slug product.id %}#addreview">Add review</a>
60
+			<a href="{% url catalogue:reviews-add product.slug product.id %}#addreview">{% trans "Add review" %}</a>
61 61
 			</p>
62 62
 			{% endif %}
63 63
             
64
-            <p><strong>Product Code:</strong> <code>{{ product.upc }}</code></p>
64
+			<p><strong>{% trans "Product Code:" %}</strong> <code>{{ product.upc }}</code></p>
65 65
              
66 66
             <hr/>
67 67
             <ul>
68
-                <li><a href="#product_description">Read the full description</a></li>
68
+				<li><a href="#product_description">{% trans "Read the full description" %}</a></li>
69 69
             </ul>
70 70
 
71 71
             {% include "catalogue/partials/add_to_basket_form.html" %}
@@ -83,25 +83,25 @@
83 83
     <h2>Product Information</h2>
84 84
     <table class="table table-striped table-condensed">
85 85
         <tr>
86
-            <th>UPC</th><td>{{ product.upc }}</td>
86
+			<th>{% trans "UPC" %}</th><td>{{ product.upc }}</td>
87 87
         </tr>
88 88
         <tr>
89
-            <th>Product class</th><td>{{ product.product_class.name }}</td>
89
+			<th>{% trans "Product class" %}</th><td>{{ product.product_class.name }}</td>
90 90
         </tr>
91 91
         {% if product.stockrecord %}
92 92
         <tr>
93
-            <th>Price (excl. tax)</th><td>{{ product.stockrecord.price_incl_tax|currency }}</td>
93
+			<th>{% trans "Price (excl. tax)" %}</th><td>{{ product.stockrecord.price_incl_tax|currency }}</td>
94 94
         </tr>
95 95
         <tr>
96
-            <th>Price (incl. tax)</th><td>{{ product.stockrecord.price_excl_tax|currency }}</td>
96
+			<th>{% trans "Price (incl. tax)" %}</th><td>{{ product.stockrecord.price_excl_tax|currency }}</td>
97 97
         </tr>
98 98
         <tr>
99
-            <th>Availability</th>
99
+			<th>{% trans "Availability" %}</th>
100 100
             <td>{{ product.stockrecord.availability }}</td>
101 101
         </tr>
102 102
         {% endif %}
103 103
         <tr>
104
-            <th>Product type</th>
104
+			<th>{% trans "Product type" %}</th>
105 105
             <td>
106 106
             {% if product.is_group %}Product group{% else %}{% if product.is_variant %}Variant{% else %}Stand-alone{% endif %}{% endif %}
107 107
             </td>
@@ -113,7 +113,7 @@
113 113
         </tr>
114 114
         {% endfor %}
115 115
         <tr>
116
-            <th>Num reviews</th>
116
+			<th>{% trans "Num reviews" %}</th>
117 117
             <td>{{ reviews.count }}</td>
118 118
         </tr>
119 119
         <tr>
@@ -126,11 +126,11 @@
126 126
     {% block product_review %}
127 127
     <section>
128 128
         <div id="reviews" class="sub-header">
129
-            <h2>Customer Reviews</h2>
129
+			<h2>{% trans "Customer Reviews" %}</h2>
130 130
         </div>
131 131
         <p>Read customer reviews on this product.</p>
132 132
        <div class="review_read">
133
-           <a href="{% url catalogue:reviews-add product.slug product.id %}#addreview" class="btn btn-success">Add a review</a>
133
+		   <a href="{% url catalogue:reviews-add product.slug product.id %}#addreview" class="btn btn-success">{% trans "Add a review" %}</a>
134 134
        </div>
135 135
 
136 136
         {% if reviews %}
@@ -139,7 +139,7 @@
139 139
                     <article class="review">
140 140
                         <header>
141 141
                             <h3 class="star"><a href="{{ review.get_absolute_url }}">{{ review.title }} <span>{{ review.score }}</span></a></h3>
142
-                            <h4>Reviewed by {{ review.get_reviewer_name }} <small>({{ review.date_created }})</small></h4>
142
+							<h4>{% trans "Reviewed by" %} {{ review.get_reviewer_name }} <small>({{ review.date_created }})</small></h4>
143 143
                         </header>
144 144
                         <div class="row-fluid">
145 145
                             <div class="span8 review_content">  
@@ -159,7 +159,7 @@
159 159
                     </article>
160 160
                 {% endfor %}
161 161
                 <div class="review_all">
162
-                    <a href="{% url catalogue:reviews-list product.slug product.id %}" class="btn">See all reviews</a>
162
+					<a href="{% url catalogue:reviews-list product.slug product.id %}" class="btn">{% trans "See all reviews" %}</a>
163 163
                 </div>
164 164
             </div>
165 165
         {% endif %}
@@ -170,7 +170,7 @@
170 170
         {% if product.related_products.count %}
171 171
         <div class="span6">
172 172
             <div class="sub-header">
173
-                <h2>Related items</h2>
173
+				<h2>{% trans "Related items" %}</h2>
174 174
             </div>
175 175
             <div class="es-carousel-wrapper">
176 176
                 <div class="es-carousel">
@@ -189,7 +189,7 @@
189 189
         {% if product.recommended_products.count %}
190 190
         <div class="span6">
191 191
             <div class="sub-header">
192
-                <h2>Recommended items</h2>
192
+				<h2>{% trans "Recommended items" %}</h2>
193 193
             </div>
194 194
             <div class="es-carousel-wrapper">
195 195
                 <div class="es-carousel">

+ 3
- 1
oscar/templates/catalogue/partials/add_to_basket_form.html View File

@@ -1,4 +1,6 @@
1 1
 {% load basket_tags %}
2
+{% load i18n %}
3
+
2 4
 {% if product.stockrecord and product.stockrecord.is_available_to_buy %}
3 5
     {% basket_form basket product as basket_form %}
4 6
     <form action="{% url basket:add %}" method="post" class="form-stacked">
@@ -6,7 +8,7 @@
6 8
         {% include "partials/form_fields.html" with form=basket_form %}
7 9
 
8 10
         <div class="form-actions">
9
-            <button type="submit" class="btn btn-large btn-primary" value="Add to basket">Add to basket</button>
11
+			<button type="submit" class="btn btn-large btn-primary" value="Add to basket">{% trans "Add to basket" %}</button>
10 12
         </div>
11 13
     </form>
12 14
 {% endif %}

+ 2
- 1
oscar/templates/catalogue/partials/add_to_basket_form_compact.html View File

@@ -1,8 +1,9 @@
1 1
 {% load basket_tags %}
2
+{% load i18n %}
2 3
 
3 4
 {% basket_form basket product as basket_form single %}
4 5
 <form action="{% url basket:add %}" method="post">
5 6
     {% csrf_token %}
6 7
     {{ basket_form.as_p }}
7
-    <input type="submit" class="btn btn-primary" value="Add to basket" />
8
+	<button type="submit" class="btn btn-primary">{% trans "Add to basket" %}</button>
8 9
 </form>

+ 5
- 4
oscar/templates/catalogue/partials/gallery.html View File

@@ -1,4 +1,5 @@
1 1
 {% load thumbnail %}
2
+{% load i18n %}
2 3
 
3 4
 {% with product.images.all as all_images %}
4 5
     {# use length rather then count as the images get queried anyways #}
@@ -7,8 +8,8 @@
7 8
     <script id="img-wrapper-tmpl" type="text/x-jquery-tmpl">
8 9
         <div class="rg-image-wrapper">
9 10
             <div class="rg-image-nav">
10
-               <a href="#" class="rg-image-nav-prev">Previous Image</a>
11
-               <a href="#" class="rg-image-nav-next">Next Image</a>
11
+				<a href="#" class="rg-image-nav-prev">{% trans "Previous Image" %}</a>
12
+				<a href="#" class="rg-image-nav-next">{% trans "Next Image" %}</a>
12 13
             </div>
13 14
             <div class="rg-image"></div>
14 15
             <div class="rg-loading"></div>
@@ -24,8 +25,8 @@
24 25
                     <!-- Elastislide Carousel Thumbnail Viewer -->
25 26
                     <div class="es-carousel-wrapper">
26 27
                             <div class="es-nav">
27
-                                    <span class="es-nav-prev">Previous</span>
28
-                                    <span class="es-nav-next">Next</span>
28
+								<span class="es-nav-prev">{% trans "Previous" %}</span>
29
+								<span class="es-nav-next">{% trans "Next" %}</span>
29 30
                             </div>
30 31
                             <div class="es-carousel">
31 32
                                     <ul>

+ 8
- 3
oscar/templates/catalogue/partials/pagination.html View File

@@ -1,13 +1,18 @@
1 1
 {% load display_tags %}
2
+{% load i18n %}
2 3
 
3 4
 <div>
4 5
     <ul class="pager">
5 6
         {% if page_obj.has_previous %}
6
-        <li class="previous"><a href="?{% get_parameters page %}page={{ page_obj.previous_page_number }}">previous</a></li>
7
+		<li class="previous"><a href="?{% get_parameters page %}page={{ page_obj.previous_page_number }}">{% trans "previous" %}</a></li>
7 8
         {% endif %}
8
-        <li class="current">Page {{ page_obj.number }} of {{ paginator.num_pages }}</li>
9
+		<li class="current">
10
+		{% blocktrans with page_num=page_obj.number total_pages=paginator.num_pages %}
11
+		Page {{ page_num }} of {{ total_pages }}
12
+		{% endblocktrans %}
13
+		</li>
9 14
         {% if page_obj.has_next %}
10
-        <li class="next"><a href="?{% get_parameters page %}page={{ page_obj.next_page_number }}">next</a></li>
15
+		<li class="next"><a href="?{% get_parameters page %}page={{ page_obj.next_page_number }}">{% trans "next" %}</a></li>
11 16
         {% endif %}
12 17
     </ul>
13 18
 </div>

+ 3
- 2
oscar/templates/catalogue/partials/product.html View File

@@ -1,5 +1,6 @@
1 1
 {% load currency_filters %}
2 2
 {% load thumbnail %}
3
+{% load i18n %}
3 4
 
4 5
 <article class="product_pod">
5 6
     <div class="image_container">
@@ -29,13 +30,13 @@
29 30
     <div class="product_price">
30 31
         {% if product.has_stockrecord %}    
31 32
             {% if product.is_group %}
32
-                <h4><span>From</span> {{ product.min_variant_price_incl_tax|currency }}</h4>
33
+			<h4><span>{% trans "From" %}</span> {{ product.min_variant_price_incl_tax|currency }}</h4>
33 34
             {% else %}
34 35
                 <h4>{{ product.stockrecord.price_incl_tax|currency }}</h4>
35 36
             {% endif %}
36 37
             <p class="app-ico {{ product.stockrecord.availability_code }} avaliability ">{{ product.stockrecord.availability|truncatewords:2 }}</p>
37 38
         {% else %}
38
-            <p class="app-ico avaliability outofstock">Not available</p>
39
+		<p class="app-ico avaliability outofstock">{% trans "Not available" %}</p>
39 40
         {% endif %}
40 41
 
41 42
         {% include "catalogue/partials/add_to_basket_form_compact.html" %}

+ 2
- 1
oscar/templates/catalogue/partials/stock_record.html View File

@@ -1,4 +1,5 @@
1 1
 {% load currency_filters %}
2
+{% load i18n %}
2 3
 
3 4
 {% if product.is_group %}
4 5
     <h2 class="price_color">From {{ product.min_variant_price_incl_tax|currency }}</h2>
@@ -7,6 +8,6 @@
7 8
         <h2 class="price_color">{{ product.stockrecord.price_incl_tax|currency }}</h2>
8 9
         <p class="app-ico {{ product.stockrecord.availability_code }} avaliability ">{{ product.stockrecord.availability|truncatewords:2 }}</p>
9 10
     {% else %}
10
-        <p class="app-ico avaliability outofstock">Not available</p>
11
+	<p class="app-ico avaliability outofstock">{% trans "Not available" %}</p>
11 12
     {% endif %}
12 13
 {% endif %}

+ 17
- 24
oscar/templates/checkout/checkout.html View File

@@ -1,8 +1,9 @@
1 1
 {% extends "checkout/layout.html" %}
2 2
 {% load currency_filters %}
3
+{% load i18n %}
3 4
 
4 5
 {% block title %}
5
-Checkout | {{ block.super }}
6
+{% trans "Checkout" %} | {{ block.super }}
6 7
 {% endblock %}
7 8
 
8 9
 {% block header %}
@@ -24,28 +25,28 @@ Checkout | {{ block.super }}
24 25
     {% block shipping_address %}
25 26
     <div class="span6">
26 27
         <div class="sub-header">
27
-            <h2>Shipping address</h2>
28
+			<h2>{% trans "Shipping address" %}</h2>
28 29
         </div>
29 30
         <div class="well well-info">
30 31
             <dl>
31
-                <dt>Address</dt>
32
+				<dt>{% trans "Address" %}</dt>
32 33
                 <dd>
33 34
                     {% for field in shipping_address.active_address_fields %}
34 35
                     {{ field }}<br/>
35 36
                     {% endfor %}
36 37
                 </dd>
37 38
                 {% if shipping_address.phone_number %}
38
-                <dt>Contact number</dt>
39
+				<dt>{% trans "Contact number" %}</dt>
39 40
                 <dd>{{ shipping_address.phone_number }}</dd>
40 41
                 {% endif %}
41 42
                 {% if shipping_address.notes %}
42
-                <dt>Shipping notes</dt>
43
+				<dt>{% trans "Shipping notes" %}</dt>
43 44
                 <dd>{{ shipping_address.notes }}</dd>
44 45
                 {% endif %}
45 46
             </dl>
46 47
             {% block shipping_address_actions %}
47 48
             <div class="alert-actions">
48
-                <a href="{% url checkout:shipping-address %}" class="btn">Change shipping address</a>
49
+				<a href="{% url checkout:shipping-address %}" class="btn">{% trans "Change shipping address" %}</a>
49 50
             </div>
50 51
             {% endblock %}
51 52
         </div>
@@ -55,12 +56,12 @@ Checkout | {{ block.super }}
55 56
     {% block payment_method %}
56 57
    <div class="span6">
57 58
        <div class="sub-header">
58
-            <h2>Payment</h2>
59
+		   <h2>{% trans "Payment" %}</h2>
59 60
         </div>
60 61
         <div class="well well-success">
61
-            <p>Payment details to go here</p>
62
+			<p>{% trans "Payment details to go here" %}</p>
62 63
             <div class="alert-actions">
63
-				<a href="{% url checkout:payment-details %}" class="btn">Change payment details</a>
64
+				<a href="{% url checkout:payment-details %}" class="btn">{% trans "Change payment details" %}</a>
64 65
             </div>
65 66
         </div>    
66 67
     </div>
@@ -69,13 +70,13 @@ Checkout | {{ block.super }}
69 70
 
70 71
 {% block order_contents %}
71 72
     <div class="sub-header">
72
-        <h2>Order contents</h2>
73
+		<h2>{% trans "Order contents" %}</h2>
73 74
     </div>
74 75
     <div class="basket-title">
75 76
         <div class="row-fluid">
76
-            <h4 class="span10">Items in basket</h4>
77
-            <h4 class="span1">Quantity</h4>
78
-            <h4 class="span1">Price</h4>
77
+			<h4 class="span10">{% trans "Items in basket" %}</h4>
78
+			<h4 class="span1">{% trans "Quantity" %}</h4>
79
+			<h4 class="span1">{% trans "Price" %}</h4>
79 80
         </div>
80 81
     </div>
81 82
     {% for line in basket.all_lines %}
@@ -104,14 +105,6 @@ Checkout | {{ block.super }}
104 105
         </div>
105 106
     </div>
106 107
     {% endfor %}
107
-    <!-- {% if shipping_total_excl_tax %}
108
-        <div class="basket-items">
109
-            <div class="row-fluid">
110
-                <h4 class="span11">Shipping charge</h4>
111
-                <div class="span1">{{ shipping_total_incl_tax|currency }}</div>
112
-            </div>
113
-        </div>
114
-        {% endif %} -->
115 108
     {% if shipping_method %}
116 109
     <div class="basket-items">
117 110
         <div class="row-fluid">
@@ -125,19 +118,19 @@ Checkout | {{ block.super }}
125 118
     {% endif %}
126 119
     <div class="basket-items">
127 120
         <div class="row-fluid">
128
-            <h4 class="span11">Basket total:</h4>
121
+			<h4 class="span11">{% trans "Basket total:" %}</h4>
129 122
             <div class="span1">{{ basket.total_incl_tax|currency }}</div>
130 123
         </div>
131 124
     </div>
132 125
     <div class="basket-items total">
133 126
         <div class="row-fluid">
134
-            <h3 class="span11">Order total:</h3>
127
+			<h3 class="span11">{% trans "Order total:" %}</h3>
135 128
             <h3 class="span1">{{ order_total_incl_tax|currency }}</h3>
136 129
         </div>
137 130
     </div>
138 131
     {% block order_contents_actions %}
139 132
     <div class="form-actions">
140
-        <a href="{% url basket:summary %}" class="btn">Edit order contents</a>
133
+		<a href="{% url basket:summary %}" class="btn">{% trans "Edit order contents" %}</a>
141 134
     </div>
142 135
     {% endblock %}
143 136
 {% endblock order_contents %}

+ 8
- 7
oscar/templates/checkout/gateway.html View File

@@ -1,8 +1,9 @@
1 1
 {% extends "checkout/layout.html" %}
2 2
 {% load currency_filters %}
3
+{% load i18n %}
3 4
 
4 5
 {% block title %}
5
-Checkout gateway | {{ block.super }}
6
+{% trans "Checkout gateway" %} | {{ block.super }}
6 7
 {% endblock %}
7 8
 
8 9
 {% block checkout-nav %}
@@ -12,7 +13,7 @@ Checkout gateway | {{ block.super }}
12 13
 {% block content %}
13 14
 
14 15
 <div class="sub-header">
15
-	<h2>Who are you?</h2>
16
+	<h2>{% trans "Who are you?" %}</h2>
16 17
 </div>
17 18
 
18 19
 <form action="." method="post" class="form-stacked well">
@@ -36,7 +37,7 @@ Checkout gateway | {{ block.super }}
36 37
 		<div class="controls">
37 38
 			<label class="radio">
38 39
 			     <input type="radio" id="id_options_1" name="options" value="existing" {% if form.password.errors %}checked="checked"{% endif %} />
39
-			    I have an account and my password is:
40
+				 {% trans "I have an account and my password is" %}:
40 41
 			</label>
41 42
 		</div>
42 43
 	</div>
@@ -52,20 +53,20 @@ Checkout gateway | {{ block.super }}
52 53
 		</div>
53 54
 	</div>	
54 55
 			
55
-    <p><a href="{% url password-reset %}">Get a password reminder</a></p>
56
+	<p><a href="{% url password-reset %}">{% trans "Get a password reminder" %}</a></p>
56 57
 	
57 58
 	<div class="control-group">
58 59
 		<div class="controls">
59 60
 			<label class="radio">
60 61
 			     <input type="radio" id="id_options_0" name="options" value="new" {% if not form.password.errors %}checked="checked"{% endif %} />
61
-			    I don't want to create an account:
62
+				 {% trans "I don't want to create an account" %}:
62 63
 			</label>
63 64
 		</div>
64 65
 	</div>
65 66
 		
66 67
 	<div class="form-actions">
67
-		<button type="submit" class="btn btn-large btn-primary">Continue</button>
68
-		 Alternatively <a href="{% url customer:register %}?next={% url checkout:index %}">create an account</a> before you checkout.
68
+		<button type="submit" class="btn btn-large btn-primary">{% trans "Continue" %}</button>
69
+		{% trans "Alternatively" %} <a href="{% url customer:register %}?next={% url checkout:index %}">{% trans "create an account" %}</a> {% trans "before you checkout." %}
69 70
 	</div>
70 71
 </form>
71 72
 

+ 13
- 13
oscar/templates/checkout/payment_details.html View File

@@ -1,8 +1,9 @@
1 1
 {% extends "checkout/checkout.html" %}
2 2
 {% load currency_filters %}
3
+{% load i18n %}
3 4
 
4 5
 {% block title %}
5
-Payment details | {{ block.super }}
6
+{% trans "Payment details" %} | {{ block.super }}
6 7
 {% endblock %}
7 8
 
8 9
 {% block checkout-nav %}
@@ -15,18 +16,17 @@ Payment details | {{ block.super }}
15 16
 {% block payment_method %}{% endblock %}
16 17
 
17 18
 {% block payment_details %}
18
-<div class="sub-header">
19
-	<h2>Enter payment details</h2>
20
-</div>
19
+	<div class="sub-header">
20
+		<h2>Enter payment details</h2>
21
+	</div>
21 22
 
22
-{% block payment_details_content %}
23
-<p>This page needs implementing within your project.  Or you could use one of django-oscar's
24
-plugin libraries:</p>
25
-<ul>
26
-	<li><a href="https://github.com/tangentlabs/django-oscar-paypal">django-oscar-paypal</a></li>
27
-	<li><a href="https://github.com/tangentlabs/django-oscar-datacash">django-oscar-datacash</a></li>
28
-</ul>
29
-<a href="{% url checkout:preview %}" class="btn btn-primary btn-large">Continue</a>
30
-{% endblock payment_details_content %}
23
+	{% block payment_details_content %}
24
+		<p>{% trans "This page needs implementing within your project.  Or you could use one of Oscar's plugin libraries:" %}</p>
25
+		<ul>
26
+			<li><a href="https://github.com/tangentlabs/django-oscar-paypal">django-oscar-paypal</a></li>
27
+			<li><a href="https://github.com/tangentlabs/django-oscar-datacash">django-oscar-datacash</a></li>
28
+		</ul>
29
+		<a href="{% url checkout:preview %}" class="btn btn-primary btn-large">{% trans "Continue" %}</a>
30
+	{% endblock payment_details_content %}
31 31
 
32 32
 {% endblock payment_details %}

+ 4
- 3
oscar/templates/checkout/preview.html View File

@@ -1,7 +1,8 @@
1 1
 {% extends "checkout/checkout.html" %}
2
+{% load i18n %}
2 3
 
3 4
 {% block title %}
4
-Order preview | {{ block.super }}
5
+{% trans "Order preview" %} | {{ block.super }}
5 6
 {% endblock %}
6 7
 
7 8
 {% block checkout-nav %}
@@ -9,12 +10,12 @@ Order preview | {{ block.super }}
9 10
 {% endblock %}
10 11
 
11 12
 {% block place_order %}
12
-<h3>Please review the information above, then click "Place Order"</h3>
13
+<h3>{% trans "Please review the information above, then click 'Place Order'" %}</h3>
13 14
 <form method="post" action="{% url checkout:preview %}" id="place-order-form">
14 15
 	<input type="hidden" name="action" value="place_order" />
15 16
 	{% csrf_token %}
16 17
     <div class="form-actions">
17
-        <button id='place-order' type="submit" value="Place order" class="pull-right btn btn-primary btn-large js-disable-on-click">Place order</button>
18
+		<button id='place-order' type="submit" class="pull-right btn btn-primary btn-large js-disable-on-click">{% trans "Place order" %}</button>
18 19
     </div>
19 20
 </form>
20 21
 {% endblock place_order %}

+ 9
- 9
oscar/templates/checkout/shipping_address.html View File

@@ -1,7 +1,7 @@
1 1
 {% extends "checkout/checkout.html" %}
2 2
 
3 3
 {% block title %}
4
-Shipping address | {{ block.super }}
4
+{% trans "Shipping address" %} | {{ block.super }}
5 5
 {% endblock %}
6 6
 
7 7
 {% block checkout-nav %}
@@ -12,7 +12,7 @@ Shipping address | {{ block.super }}
12 12
 
13 13
 {% block shipping_address %}
14 14
     <div class="sub-header">
15
-        <h2>Where should we ship to?</h2>
15
+		<h2>{% trans "Where should we ship to?" %}</h2>
16 16
     </div>
17 17
     {% if request.user.is_authenticated %}
18 18
         {% if addresses %}
@@ -31,9 +31,9 @@ Shipping address | {{ block.super }}
31 31
 								{% csrf_token %}
32 32
 								<input type="hidden" name="action" value="ship_to" />
33 33
 								<input type="hidden" name="address_id" value="{{ address.id }}" />
34
-								<button type="submit" value="Ship to this address" class="btn btn-primary  ship-address">Ship to this address</button>
35
-								<a class="btn btn-small btn-info" href="{% url checkout:user-address-update address.id %}">Edit</a>
36
-								<a href="{% url checkout:user-address-delete address.id %}" class="btn btn-small btn-danger">Delete</a>
34
+								<button type="submit" value="Ship to this address" class="btn btn-primary  ship-address">{% trans "Ship to this address" %}</button>
35
+								<a class="btn btn-small btn-info" href="{% url checkout:user-address-update address.id %}">{% trans "Edit" %}</a>
36
+								<a href="{% url checkout:user-address-delete address.id %}" class="btn btn-small btn-danger">{% trans "Delete" %}</a>
37 37
 							</form>
38 38
 						</div>
39 39
 					</li>
@@ -45,10 +45,10 @@ Shipping address | {{ block.super }}
45 45
                 </ul>
46 46
             </div>
47 47
             <div class="sub-header">
48
-			<h3>Or a new address?</h3>
48
+				<h3>{% trans "Or a new address?" %}</h3>
49 49
     		</div>
50 50
         {% else %}
51
-            <p>Your addressbook is currently empty</p>
51
+		<p>{% trans "Your addressbook is currently empty" %}</p>
52 52
         {% endif %}
53 53
 	</div>
54 54
     {% endif %}
@@ -57,8 +57,8 @@ Shipping address | {{ block.super }}
57 57
     	<form action="{% url checkout:shipping-address %}" method="post" class="form-horizontal">
58 58
             {% csrf_token %}
59 59
             {% include "partials/form_fields.html" with form=form %}
60
-            <div class="form-actions"><button type="submit" class="btn btn-large btn-primary">Continue</button>
61
-                or <a href="{% url basket:summary %}">return to basket</a></div>
60
+			<div class="form-actions"><button type="submit" class="btn btn-large btn-primary">{% trans "Continue" %}</button>
61
+				{% trans "or" %} <a href="{% url basket:summary %}">{% trans "return to basket" %}</a></div>
62 62
         </form>
63 63
     </div>
64 64
 {% endblock shipping_address %}

+ 6
- 6
oscar/templates/checkout/shipping_methods.html View File

@@ -2,7 +2,7 @@
2 2
 {% load currency_filters %}
3 3
 
4 4
 {% block title %}
5
-Shipping method | {{ block.super }}
5
+{% trans "Shipping method" %} | {{ block.super }}
6 6
 {% endblock %}
7 7
 
8 8
 {% block checkout-nav %}
@@ -15,12 +15,12 @@ Shipping method | {{ block.super }}
15 15
 
16 16
 {% block shipping_method %}
17 17
 <div class="sub-header">
18
-	<h2>Choose a shipping method</h2>
18
+	<h2>{% trans "Choose a shipping method" %}</h2>
19 19
 </div>
20 20
 <div class="basket-title">
21 21
     <div class="row-fluid">
22
-        <h4 class="span9">Method</h4>
23
-        <h4 class="span3">Cost</h4>
22
+		<h4 class="span9">{% trans "Method" %}</h4>
23
+		<h4 class="span3">{% trans "Cost" %}</h4>
24 24
     </div>
25 25
 </div>
26 26
 {% for method in methods %}
@@ -28,7 +28,7 @@ Shipping method | {{ block.super }}
28 28
     <div class="row-fluid">
29 29
         <div class="span9">
30 30
             <h4>{{ method.name }}</h4>
31
-            <p>Description: {{ method.description }}</p>
31
+			<p>{% trans "Description:" %} {{ method.description }}</p>
32 32
         </div>
33 33
         <div class="span1">
34 34
             {{ method.basket_charge_incl_tax|currency }}
@@ -37,7 +37,7 @@ Shipping method | {{ block.super }}
37 37
             <form method="post" action="{% url checkout:shipping-method %}">
38 38
                 {% csrf_token %}
39 39
                 <input type="hidden" name="method_code" value="{{ method.code }}" class="btn" />
40
-                <button type="submit" class="btn btn-large btn-primary pull-right">Select option</button>
40
+				<button type="submit" class="btn btn-large btn-primary pull-right">{% trans "Select option" %}</button>
41 41
             </form>
42 42
         </div>    
43 43
     </div>

+ 22
- 19
oscar/templates/checkout/thank_you.html View File

@@ -1,8 +1,9 @@
1 1
 {% extends "checkout/layout.html" %}
2 2
 {% load currency_filters %}
3
+{% load i18n %}
3 4
 
4 5
 {% block title %}
5
-Confirmation of order {{ order.number }} | {{ block.super }}
6
+{% trans "Confirmation of order" %} {{ order.number }} | {{ block.super }}
6 7
 {% endblock title %}
7 8
 
8 9
 {% block checkout-nav %}{% endblock %}
@@ -10,18 +11,20 @@ Confirmation of order {{ order.number }} | {{ block.super }}
10 11
 
11 12
 {% block content %}
12 13
 <div class="sub-header">
13
-    <h1>Confirmation for order #{{ order.number }}</h1>
14
+	<h1>{% blocktrans with order_num=order.number %}
15
+		Confirmation for order #{{ order_num }}
16
+		{% endblocktrans %}</h1>
14 17
 </div>
15
-<p>Your order has been placed and a confirmation email has ben sent - your order number is <span class="label label-success">{{ order.number }}</span></p>
16
-<p>Please make a note of this reference or print this page and quote it in any communication
17
-with us regarding your order.</p>
18
+<p>{% trans "Your order has been placed and a confirmation email has ben sent - your order number is" %}
19
+<span class="label label-success">{{ order.number }}</span></p>
20
+<p>{% trans "Please make a note of this reference or print this page and quote it in any communication with us regarding your order." %}</p>
18 21
 
19 22
 <div class="row-fluid">
20 23
     <div class="span6">
21 24
 		{% block shipping_info %}
22 25
         <div class="well well-info">
23
-            <h3>Shipping</h3>
24
-            <p>Your order will be delivered to:</p>
26
+			<h3>{% trans "Shipping" %}</h3>
27
+			<p>{% trans "Your order will be delivered to:" %}</p>
25 28
             {% for line in order.shipping_address.active_address_fields %}
26 29
             {{ line }}<br/>
27 30
             {% endfor %}
@@ -31,7 +34,7 @@ with us regarding your order.</p>
31 34
     <div class="span6">
32 35
 		{% block payment_info %}
33 36
         <div class="well well-success">
34
-            <h3>Payment</h3>
37
+			<h3>{% trans "Payment" %}</h3>
35 38
             {% for source in order.sources.all %}
36 39
             {{ source }}
37 40
             {% endfor %}
@@ -40,15 +43,15 @@ with us regarding your order.</p>
40 43
     </div>
41 44
 </div>
42 45
 <div class="sub-header">
43
-    <h3>Order details</h3>
46
+	<h3>{% trans "Order details" %}</h3>
44 47
 </div>
45 48
 
46 49
 <div class="basket-title">
47 50
     <div class="row-fluid">
48
-        <h4 class="span7">Items purchased</h4>
49
-        <h4 class="span3">Estimated dispatch date</h4>
50
-        <h4 class="span1">Quantity</h4>
51
-        <h4 class="span1">Cost</h4>
51
+		<h4 class="span7">{% trans "Items purchased" %}</h4>
52
+		<h4 class="span3">{% trans "Estimated dispatch date" %}</h4>
53
+		<h4 class="span1">{% trans "Quantity" %}</h4>
54
+		<h4 class="span1">{% trans "Cost" %}</h4>
52 55
     </div>
53 56
 </div>
54 57
 
@@ -82,26 +85,26 @@ with us regarding your order.</p>
82 85
 
83 86
 <div class="basket-items">
84 87
     <div class="row-fluid">
85
-        <h4 class="span11">Basket total</h4>
88
+		<h4 class="span11">{% trans "Basket total" %}</h4>
86 89
         <div class="span1">{{ order.basket_total_incl_tax|currency }}</div>
87 90
     </div>
88 91
 </div>
89 92
 <div class="basket-items">
90 93
     <div class="row-fluid">
91
-        <h4 class="span11">Shipping charge - {{order.shipping_method}}</h4>
94
+		<h4 class="span11">{% trans "Shipping charge - {{order.shipping_method}}" %}</h4>
92 95
         <div class="span1">{{ order.shipping_incl_tax|currency }}</div>
93 96
     </div>
94 97
 </div>
95 98
 <div class="basket-items total">
96 99
     <div class="row-fluid">
97
-        <h3 class="span11">Order total</h3>
100
+		<h3 class="span11">{% trans "Order total" %}</h3>
98 101
         <h3 class="span1">{{ order.total_incl_tax|currency }}</h3>
99 102
     </div>
100 103
 </div>
101 104
  
102 105
 {% if not order.user %}
103 106
     <div class="sub-header">
104
-        <h4>Tracking your order</h4>
107
+		<h4>{% trans "Tracking your order" %}</h4>
105 108
     </div>
106 109
 	<p>You can
107 110
 	<a href="{% url customer:anon-order order.number order.verification_hash %}">track the status of your order</a>.</p>
@@ -109,8 +112,8 @@ with us regarding your order.</p>
109 112
 {% endif %}
110 113
 
111 114
 <div class="form-actions">
112
-    <a onclick="window.print()" href="#" class="btn btn-primary btn-large">Print this page</a>
113
-    <a href="/" class="btn btn-primary btn-large pull-right">Continue shopping</a>
115
+	<a onclick="window.print()" href="#" class="btn btn-primary btn-large">{% trans "Print this page" %}</a>
116
+	<a href="/" class="btn btn-primary btn-large pull-right">{% trans "Continue shopping" %}</a>
114 117
 </div>
115 118
 {% endblock content %}
116 119
 

+ 4
- 3
oscar/templates/checkout/user_address_delete.html View File

@@ -1,4 +1,5 @@
1 1
 {% extends "checkout/checkout.html" %}
2
+{% load i18n %}
2 3
 
3 4
 {% block order_contents %}{% endblock %}
4 5
 {% block shipping_method %}{% endblock %}
@@ -6,7 +7,7 @@
6 7
 {% block payment_details %}{% endblock %}
7 8
 
8 9
 {% block checkout-nav %}
9
-{% include 'checkout/nav.html' with step=1 %}
10
+	{% include 'checkout/nav.html' with step=1 %}
10 11
 {% endblock %}
11 12
 
12 13
 {% block shipping_address %}
@@ -15,8 +16,8 @@
15 16
 <form action="." method="post">
16 17
     {% csrf_token %}
17 18
 	{{ object.summary }}
18
-	<p>Are you sure you want to delete this address? <button type="submit" class="btn btn-danger">Yes!</button>
19
-	or <a href="{% url checkout:shipping-address %}">cancel</a>.</p>
19
+	<p>{% trans "Are you sure you want to delete this address?" %} <button type="submit" class="btn btn-danger">{% trans "Yes!" %}</button>
20
+	{% trans "or" %} <a href="{% url checkout:shipping-address %}">{% trans "cancel" %}</a>.</p>
20 21
 </form>
21 22
 
22 23
 {% endblock shipping_address %}

+ 4
- 3
oscar/templates/checkout/user_address_form.html View File

@@ -1,4 +1,5 @@
1 1
 {% extends "checkout/checkout.html" %}
2
+{% load i18n %}
2 3
 
3 4
 {% block order_contents %}{% endblock %}
4 5
 {% block shipping_method %}{% endblock %}
@@ -10,14 +11,14 @@
10 11
 {% endblock %}
11 12
 
12 13
 {% block shipping_address %}
13
-<h1>Enter an address for your addressbook</h1>
14
+<h1>{% trans "Enter an address for your addressbook" %}</h1>
14 15
 <p> </p>
15 16
     <form action="{{ form_url }}" method="post" class="form-horizontal">
16 17
         {% csrf_token %}
17 18
         {% include "partials/form_fields.html" with form=form %}
18 19
         <div class="form-actions">
19
-            <button type="submit" class="btn btn-large btn-primary">Save</button>
20
-            or <a href="{% url checkout:shipping-address %}">cancel</a>.
20
+			<button type="submit" class="btn btn-large btn-primary">{% trans "Save"	%}</button>
21
+			{% trans "or" %} <a href="{% url checkout:shipping-address %}">{% trans "cancel" %}</a>.
21 22
         </div>
22 23
     </form>
23 24
 {% endblock shipping_address %}

+ 2
- 2
oscar/templates/flatpages/help.html View File

@@ -1,12 +1,12 @@
1 1
 {% extends "layout_2_col.html" %}
2
-
2
+{% load i18n %}
3 3
 {% load currency_filters %}
4 4
 
5 5
 {% block column_left %} 
6 6
    <div class="well" style="padding: 8px 0;">
7 7
        {% load flatpages %}
8 8
        <ul class="nav nav-list">
9
-           <li class="nav-header">Pages</li>
9
+		   <li class="nav-header">{% trans "Pages" %}</li>
10 10
            {% get_flatpages '/help/' as flatpages %}
11 11
            {% for page in flatpages %}
12 12
            <li><a href="{{ page.url }}">{{ page.title }}</a></li>

+ 8
- 9
oscar/templates/offer/detail.html View File

@@ -1,13 +1,14 @@
1 1
 {% extends "layout.html" %}
2
+{% load i18n %}
2 3
 
3 4
 {% block title %}
4
-Offer '{{ offer.name }}' | {{ block.super }}
5
+{% trans "Offer" %} '{{ offer.name }}' | {{ block.super }}
5 6
 {% endblock %}
6 7
 
7 8
 {% block breadcrumbs %}
8 9
 <ul class="breadcrumb">
9 10
     <li>
10
-        <a href="{% url promotions:home %}">Home</a>
11
+	<a href="{% url promotions:home %}">{% trans "Home" %}</a>
11 12
         <span class="divider">/</span>
12 13
     </li>
13 14
     <li>
@@ -20,7 +21,7 @@ Offer '{{ offer.name }}' | {{ block.super }}
20 21
 
21 22
 {% block header %}
22 23
 <div class="page-header action">
23
-	<h1>Offer '{{ offer.name }}'</h1>
24
+	<h1>{% trans "Offer" %} '{{ offer.name }}'</h1>
24 25
 </div>
25 26
 {% endblock header %}
26 27
 
@@ -30,16 +31,14 @@ Offer '{{ offer.name }}' | {{ block.super }}
30 31
     </div>
31 32
 
32 33
 	{% if not offer.is_active %}
33
-		<div class="alert alert-error">
34
-			This offer has expired
35
-		</div>
34
+	<div class="alert alert-error">{% trans " This offer has expired " %}</div>
36 35
 	{% endif %}
37 36
 
38 37
     {% if offer.description %}
39
-	    <h3>Description</h3>
38
+	<h3>{% trans "Description" %}</h3>
40 39
     	<p>{{ offer.description }}</p>
41 40
     {% endif %}
42
-	<h3>What you need to do</h3>
41
+	<h3>{% trans "What you need to do" %}</h3>
43 42
 	<p>{{ upsell_message }}</p>
44 43
     {% if products.count %}
45 44
 		<section>
@@ -58,6 +57,6 @@ Offer '{{ offer.name }}' | {{ block.super }}
58 57
 			</div>
59 58
 		</section>
60 59
     {% else %}
61
-		<p class="nonefound">No products found.</p>
60
+	<p class="nonefound">{% trans "No products found." %}</p>
62 61
     {% endif %}
63 62
 {% endblock content %}

+ 4
- 5
oscar/templates/partials/brand.html View File

@@ -1,19 +1,18 @@
1 1
 {% load currency_filters %}
2
+{% load i18n %}
2 3
 
3 4
 <h1 class="span6"><a href="{% url promotions:home %}">{% block brand_title %}{{ shop_name }}</a><small> {{ shop_tagline }}</small>{% endblock %}</h1>
4 5
 {% if not hide_basket %}
5 6
 <ul class="cart span6">
6 7
     <li>
7 8
         <div class="btn-group">
8
-            <a class="btn" href="{% url basket:summary %}">View Basket</a>
9
+			<a class="btn" href="{% url basket:summary %}">{% trans "View Basket" %}</a>
9 10
             <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> <span class="caret"></span> </a>
10 11
             <ul class="dropdown-menu span9">
11
-                <li>
12
-                    {% include "basket/partials/basket_quick.html" %}
13
-                </li>
12
+                <li> {% include "basket/partials/basket_quick.html" %} </li>
14 13
             </ul>
15 14
         </div>
16 15
     </li>
17
-    <li class="cart_summary"><strong>Basket total: <span>{{ basket.total_incl_tax|currency }}</span></strong></li>
16
+	<li class="cart_summary"><strong>{% trans "Basket total:" %} <span>{{ basket.total_incl_tax|currency }}</span></strong></li>
18 17
 </ul><!-- /cart -->
19 18
 {% endif %}

+ 2
- 3
oscar/templates/partials/extrahead.html View File

@@ -1,6 +1,5 @@
1 1
 {% if product %}
2
-<!-- Colorbox for image galleries -->
3
-<link rel="stylesheet" href="{{ STATIC_URL }}oscar/js/colorbox/colorbox.css" type="text/css" media="screen" charset="utf-8"/>
2
+	<!-- Colorbox for image galleries -->
3
+	<link rel="stylesheet" href="{{ STATIC_URL }}oscar/js/colorbox/colorbox.css" type="text/css" media="screen" charset="utf-8"/>
4 4
 {% endif %}
5
-<!-- Responsive - will need to be minified -->
6 5
 <link rel="stylesheet" href="{{ STATIC_URL }}oscar/css/responsive.css" />

+ 3
- 2
oscar/templates/partials/footer.html View File

@@ -1,8 +1,9 @@
1
+{% load i18n %}
1 2
 <footer class="footer container-fluid">
2 3
     {% block footer %}
3 4
         <ul class="footer_links">   
4
-            <li><a href="/about/">About</a></li>
5
-            <li class="top_page"><a href="#top_page" class="app-ico ico_fill_up">Top of the page</a></li>            
5
+			<li><a href="/about/">{% trans "About" %}</a></li>
6
+			<li class="top_page"><a href="#top_page" class="app-ico ico_fill_up">{% trans "Top of the page" %}</a></li>
6 7
         </ul>
7 8
     {% endblock %}
8 9
 </footer>

+ 0
- 6
oscar/templates/partials/footer_checkout.html View File

@@ -1,10 +1,4 @@
1 1
 <footer class="footer container-fluid">
2 2
     {% block footer %}
3
-	    {% comment %}
4
-        <ul class="footer_links">
5
-            <li><a href="#terms-and-conditions">Terms and conditions</a></li>
6
-			<li><a href="#shipping">Shipping</a></li>
7
-        </ul>
8
-		{% endcomment %}
9 3
     {% endblock %}
10 4
 </footer>

+ 6
- 5
oscar/templates/partials/nav_accounts.html View File

@@ -1,18 +1,19 @@
1
+{% load i18n %}
1 2
 <div id="top_page" class="navbar accounts">
2 3
 	<div class="navbar-inner">
3 4
 		<div class="container-fluid">
4 5
 			<ul class="nav pull-right">
5 6
 				{% if user.is_authenticated %}
6 7
 				    {% if user.get_full_name %}
7
-					<li><div>Welcome <em>{{ user.get_full_name }}</em></div></li>
8
+					<li><div>{% trans "Welcome" %} <em>{{ user.get_full_name }}</em></div></li>
8 9
 					{% endif %}
9
-					<li> <a href="{% url customer:summary %}" class="app-ico ico_profile">Account</a></li>
10
-					<li><a href="{% url customer:logout %}" class="app-ico ico_logout">Logout</a></li>
10
+					<li> <a href="{% url customer:summary %}" class="app-ico ico_profile">{% trans "Account" %}</a></li>
11
+					<li><a href="{% url customer:logout %}" class="app-ico ico_logout">{% trans "Logout" %}</a></li>
11 12
 					{% if user.is_staff %}
12
-						<li><a href="{% url dashboard:index %}" class="app-ico ico_settings">Dashboard</a></li>
13
+					<li><a href="{% url dashboard:index %}" class="app-ico ico_settings">{% trans "Dashboard" %}</a></li>
13 14
 					{% endif %}
14 15
 				{% else %}
15
-					<li><a href="{% url customer:login %}" class="app-ico ico_logout">Login</a></li>
16
+				<li><a href="{% url customer:login %}" class="app-ico ico_logout">{% trans "Login" %}</a></li>
16 17
 				{% endif %}
17 18
 			</ul>
18 19
 		</div>

+ 14
- 13
oscar/templates/partials/nav_alternate.html View File

@@ -1,5 +1,6 @@
1 1
 {% load currency_filters %}
2 2
 {% load category_tags %}
3
+{% load i18n %}
3 4
 <div class="navbar primary">
4 5
     <div class="navbar-inner">
5 6
         <div class="container" style="width: auto;">
@@ -9,21 +10,21 @@
9 10
                 <span class="icon-bar"></span>
10 11
             </a>
11 12
             <a class="btn btn-navbar app-ico ico_shop_bag btn-cart hidden" href="{% url checkout:index %}">
12
-                <strong>Basket 
13
+				<strong>{% trans "Basket" %}
13 14
                 {% if request.basket.lines.count %}
14
-                    Total: {{ basket.total_incl_tax|currency }}
15
+				{% trans "Total:" %} {{ basket.total_incl_tax|currency }}
15 16
                 {% endif %}
16 17
                 </strong>
17 18
             </a>
18
-			<a class="brand hidden" href="{% url promotions:home %}">Oscar</a>
19
+			<a class="brand hidden" href="{% url promotions:home %}">{{ shop_name }}</a>
19 20
              <div class="nav-collapse">
20 21
                   <!-- Added 'open' to dropdown so below menu will display - only on home page -->
21 22
                   <div id="browse" class="nav dropdown open">
22 23
                         {% if categories %}
23 24
                         <!-- Removed data-toggle="dropdown" from the anchor so the dropdown doesn't work on the home page -->
24
-                        <a href="#browse" class="dropdown-toggle">Browse Store</a>
25
+						<a href="#browse" class="dropdown-toggle">{% trans "Browse Store" %}</a>
25 26
                         <ul class="dropdown-menu nav-tabs nav-stacked">
26
-                            <li><a href="/products">All Products</a></li>
27
+							<li><a href="/products">{% trans "All Products" %}</a></li>
27 28
                         {% for category in categories %}
28 29
                             <li><a href="{{ category.0.get_absolute_url }}">{{ category.0.name }} {% if category.1 %}<span class="app-ico ico_fill_right"></span>{% endif %}</a>
29 30
                             {% if category.1 %}
@@ -37,19 +38,19 @@
37 38
                         {% endfor %}
38 39
                         </ul>
39 40
                     {% else %}
40
-                        <a href="#browse" class="dropdown-toggle" data-toggle="dropdown">Browse Store</a>   
41
+					<a href="#browse" class="dropdown-toggle" data-toggle="dropdown">{% trans "Browse Store" %}</a>
41 42
                         <ul class="dropdown-menu nav-tabs nav-stacked">
42
-                            <li><a href="/products">All Products</a></li>
43
+							<li><a href="/products">{% trans "All Products" %}</a></li>
43 44
                             <li>
44
-                                <a href="#" >Contains a Submenu  <span class="app-ico ico_fill_right"></span></a>
45
+							<a href="#" >{% trans "Contains a Submenu" %}  <span class="app-ico ico_fill_right"></span></a>
45 46
                                 <ul class="sub-nav dropdown-menu nav nav-tabs nav-stacked span3">
46
-                                    <li><a href="#" class="app-ico ico_outline_right"> Submenu Link</a></li>
47
-                                    <li><a href="#" class="app-ico ico_outline_right"> Submenu Link</a></li>
48
-                                    <li><a href="#" class="app-ico ico_outline_right"> Submenu Link</a></li>
49
-                                    <li><a href="#" class="app-ico ico_outline_right"> Submenu Link</a></li>
47
+									<li><a href="#" class="app-ico ico_outline_right">{% trans "Submenu Link" %}</a></li>
48
+									<li><a href="#" class="app-ico ico_outline_right">{% trans "Submenu Link" %}</a></li>
49
+									<li><a href="#" class="app-ico ico_outline_right">{% trans "Submenu Link" %}</a></li>
50
+									<li><a href="#" class="app-ico ico_outline_right">{% trans "Submenu Link" %}</a></li>
50 51
                                 </ul>
51 52
                             </li>
52
-                            <li><a href="/">Go Home!</a></li>
53
+							<li><a href="/">{% trans "Go Home!" %}</a></li>
53 54
                         </ul>
54 55
                     {% endif %}
55 56
                 </div>

+ 14
- 12
oscar/templates/partials/nav_primary.html View File

@@ -1,5 +1,7 @@
1 1
 {% load currency_filters %}
2 2
 {% load category_tags %}
3
+{% load i18n %}
4
+
3 5
 <div class="navbar primary">
4 6
     <div class="navbar-inner">
5 7
         <div class="container" style="width: auto;">
@@ -9,9 +11,9 @@
9 11
                 <span class="icon-bar"></span>
10 12
             </a>
11 13
             <a class="btn btn-navbar app-ico ico_shop_bag btn-cart hidden" href="{% url checkout:index %}">
12
-                <strong>Basket 
14
+				<strong>{% trans "Basket" %}
13 15
                 {% if request.basket.all_lines.count %}
14
-                    Total: {{ basket.total_incl_tax|currency }}
16
+				{% trans "Total:" %} {{ basket.total_incl_tax|currency }}
15 17
                 {% endif %}
16 18
                 </strong>
17 19
             </a>
@@ -20,9 +22,9 @@
20 22
                 <div id="browse" class="nav dropdown">
21 23
                     
22 24
                     {% if categories %}
23
-                        <a href="#browse" class="dropdown-toggle" data-toggle="dropdown">Browse Store</a>   
25
+					<a href="#browse" class="dropdown-toggle" data-toggle="dropdown">{% trans "Browse Store" %}</a>
24 26
                         <ul class="dropdown-menu nav-tabs nav-stacked">
25
-                            <li><a href="/products">All Products</a></li>
27
+							<li><a href="/products">{% trans "All Products" %}</a></li>
26 28
                         {% for category in categories %}
27 29
                             <li><a href="{{ category.0.get_absolute_url }}">{{ category.0.name }} {% if category.1 %}<span class="app-ico ico_fill_right"></span>{% endif %}</a>
28 30
                             {% if category.1 %}
@@ -36,19 +38,19 @@
36 38
                         {% endfor %}
37 39
                         </ul>
38 40
                     {% else %}
39
-                        <a href="#browse" class="dropdown-toggle" data-toggle="dropdown">Browse Store</a>   
41
+					<a href="#browse" class="dropdown-toggle" data-toggle="dropdown">{% trans "Browse Store" %}</a>
40 42
                         <ul class="dropdown-menu nav-tabs nav-stacked">
41
-                            <li><a href="/products">All Products</a></li>
43
+							<li><a href="/products">{% trans "All Products" %}</a></li>
42 44
                             <li>
43
-                                <a href="#" >Contains a Submenu  <span class="app-ico ico_fill_right"></span></a>
45
+							<a href="#" >{% trans "Contains a Submenu" %}  <span class="app-ico ico_fill_right"></span></a>
44 46
                                 <ul class="sub-nav dropdown-menu nav nav-tabs nav-stacked span3">
45
-                                    <li><a href="#" class="app-ico ico_outline_right"> Submenu Link</a></li>
46
-                                    <li><a href="#" class="app-ico ico_outline_right"> Submenu Link</a></li>
47
-                                    <li><a href="#" class="app-ico ico_outline_right"> Submenu Link</a></li>
48
-                                    <li><a href="#" class="app-ico ico_outline_right"> Submenu Link</a></li>
47
+									<li><a href="#" class="app-ico ico_outline_right">{% trans "Submenu Link" %}</a></li>
48
+									<li><a href="#" class="app-ico ico_outline_right">{% trans "Submenu Link" %}</a></li>
49
+									<li><a href="#" class="app-ico ico_outline_right">{% trans "Submenu Link" %}</a></li>
50
+									<li><a href="#" class="app-ico ico_outline_right">{% trans "Submenu Link" %}</a></li>
49 51
                                 </ul>
50 52
                             </li>
51
-                            <li><a href="/">Go Home!</a></li>
53
+							<li><a href="{% url promotions:home %}">{% trans "Go Home!" %}</a></li>
52 54
                         </ul>
53 55
                     {% endif %}
54 56
                 </div>

+ 2
- 1
oscar/templates/partials/search.html View File

@@ -1,5 +1,6 @@
1
+{% load i18n %}
1 2
 <form method="get" action="{% url search:search %}" class="form-search navbar-search pull-right">
2 3
     {# {{ search_form.q.label_tag }} #}
3 4
     {{ search_form.q }}
4
-    <input type="submit" value="Search" class="btn" /> 
5
+	<input type="submit" value="{% trans "Search" %}" class="btn" />
5 6
 </form>

+ 3
- 1
oscar/templates/promotions/automaticproductlist.html View File

@@ -1,3 +1,5 @@
1
+{% load i18n %}
2
+
1 3
 <section class="well well-blank">
2 4
     <div class="sub-header">
3 5
         <h2>{{ promotion.name }}</h2>
@@ -15,7 +17,7 @@
15 17
     </div>
16 18
 
17 19
     {% if block.link_url %}
18
-        <a href="{{ block.link_url }}">See more</a>
20
+	<a href="{{ block.link_url }}">{% trans "See more" %}</a>
19 21
     {% endif %}
20 22
 </section>
21 23
 

+ 2
- 1
oscar/templates/promotions/default.html View File

@@ -1,4 +1,5 @@
1 1
 {% load currency_filters %}
2
+{% load i18n %}
2 3
 
3 4
 <h2>{{ block.title }}</h2>
4 5
 
@@ -15,7 +16,7 @@
15 16
             {{ product.stockrecord.price_incl_tax|currency }}<br/>
16 17
             {{ product.stockrecord.availability }}
17 18
         {% else %}
18
-            Not available    
19
+		{% trans "Not available" %}
19 20
         {% endif %}
20 21
     {% endif %}    
21 22
 </li>

+ 3
- 1
oscar/templates/promotions/handpickedproductlist.html View File

@@ -1,3 +1,5 @@
1
+{% load i18n %}
2
+
1 3
 <section class="well well-blank">
2 4
     <div class="sub-header">
3 5
         <h2>{{ promotion.name }}</h2>
@@ -15,6 +17,6 @@
15 17
     </div>
16 18
 
17 19
 	{% if block.link_url %}
18
-		<a href="{{ block.link_url }}">See more</a>
20
+	<a href="{{ block.link_url }}">{% trans "See more" %}</a>
19 21
 	{% endif %}
20 22
 </section>

+ 2
- 1
oscar/templates/promotions/home.html View File

@@ -1,4 +1,5 @@
1 1
 {% extends "layout_2_col.html" %}
2
+{% load i18n %}
2 3
 
3 4
 {% block navigation %}
4 5
     {% include "partials/nav_alternate.html" %}
@@ -9,7 +10,7 @@
9 10
 
10 11
 {% block header %}
11 12
 <div class="sub-header">
12
-    <h2>Welcome!</h2>
13
+	<h2>{% trans "Welcome!" %}</h2>
13 14
 </div>
14 15
 {% endblock header %}
15 16
 

+ 3
- 2
oscar/templates/promotions/partials/product_carousel.html View File

@@ -1,5 +1,6 @@
1 1
 {% load currency_filters %}
2 2
 {% load thumbnail %}
3
+{% load i18n %}
3 4
 
4 5
 <article class="product_pod">
5 6
     <div class="image_container">
@@ -20,8 +21,8 @@
20 21
                 <h4><span>{{ product.stockrecord.price_incl_tax|currency }}</span></h4>
21 22
                 <p class="app-ico {{ product.stockrecord.availability_code }} avaliability ">{{ product.stockrecord.availability|truncatewords:2 }}</p>
22 23
             {% else %}
23
-                <p class="app-ico avaliability outofstock">Not available</p>
24
-                <button class="btn">Notify me</button> 
24
+			<p class="app-ico avaliability outofstock">{% trans "Not available" %}</p>
25
+			<button class="btn">{% trans "Notify me" %}</button>
25 26
             {% endif %}
26 27
     {% endif %}
27 28
         </div>

+ 5
- 4
oscar/templates/promotions/singleproduct.html View File

@@ -1,6 +1,7 @@
1 1
 {% load currency_filters %}
2 2
 {% load basket_tags %}
3 3
 {% load thumbnail %}
4
+{% load i18n %}
4 5
 
5 6
 <article class="well promotion_single">
6 7
     <div class="sub-header">
@@ -20,14 +21,14 @@
20 21
     	    <h3>{{ product.title }}</h3>
21 22
     		<div class="product_price">
22 23
     			{% if product.is_group %}
23
-    				<p>From {{ product.min_variant_price_incl_tax|currency }}</p>
24
+				<p>{% trans "From" %} {{ product.min_variant_price_incl_tax|currency }}</p>
24 25
     			{% else %}
25 26
     				{% if product.has_stockrecord %} 
26 27
     					<h4><span>{{ product.stockrecord.price_incl_tax|currency }}</span></h4>
27 28
 						<p class="app-ico {{ product.stockrecord.availability_code }} avaliability">{{ product.stockrecord.availability|truncatewords:2 }}</p>
28 29
     				{% else %}
29
-    				<p class="app-ico notavailable avaliability">Not available</p>
30
-    				<button class="btn">Notify me</button> 
30
+					<p class="app-ico notavailable avaliability">{% trans "Not available" %}</p>
31
+					<button class="btn">{% trans "Notify me" %}</button>
31 32
     				{% endif %}
32 33
     			{% endif %}
33 34
     		</div>
@@ -40,7 +41,7 @@
40 41
         			        {% endfor %}
41 42
     		            </ul>
42 43
     		        {% else %}
43
-    		            <p class="star">No Rating</p>
44
+					<p class="star">{% trans "No rating" %}</p>
44 45
     		        {% endif %}
45 46
     		    {% endwith %}
46 47
     		{% endblock product_review %}

+ 3
- 7
oscar/templates/registration/password_reset_complete.html View File

@@ -4,11 +4,7 @@
4 4
 {% block title %}{% trans 'Password reset complete' %} | {{ block.super }}{% endblock %}
5 5
 
6 6
 {% block content %}
7
-
8
-<h1>{% trans 'Password reset complete' %}</h1>
9
-
10
-<p>{% trans "Your password has been set.  You may go ahead and log in now." %}</p>
11
-
12
-<p><a href="{{ login_url }}">{% trans 'Log in' %}</a></p>
13
-
7
+	<h1>{% trans 'Password reset complete' %}</h1>
8
+	<p>{% trans "Your password has been set.  You may go ahead and log in now." %}</p>
9
+	<p><a href="{{ login_url }}">{% trans 'Log in' %}</a></p>
14 10
 {% endblock %}

+ 5
- 3
oscar/templates/reviews/_vote_bit.html View File

@@ -1,13 +1,15 @@
1
+{% load i18n %}
2
+
1 3
 {% if user.is_authenticated %}
2
-Is this review helpful?<br/>
4
+{% trans "Is this review helpful?" %}<br/>
3 5
     <form action="{{ review.get_absolute_url }}" method="post" class="vote_agree" >
4 6
         {% csrf_token %}               
5 7
         <input type="hidden" name="delta" value="1"/>
6
-        <button type="submit" value="I agree" class="btn btn-success btn-small">Yes</button>
8
+		<button type="submit" class="btn btn-success btn-small">{% trans "Yes" %}</button>
7 9
     </form>
8 10
     <form  action="{{ review.get_absolute_url }}" method="post">
9 11
         {% csrf_token %}                
10 12
         <input type="hidden" name="delta" value="-1"/>
11
-        <button type="submit" class="btn btn-small" value="I disagree">No</button>
13
+		<button type="submit" class="btn btn-small">{% trans "No" %}</button>
12 14
     </form>
13 15
 {% endif %}

+ 5
- 4
oscar/templates/reviews/add_review.html View File

@@ -1,15 +1,16 @@
1 1
 {% extends "catalogue/detail.html" %}
2
+{% load i18n %}
2 3
 
3 4
 {% block product_review %}
4 5
 <div id="addreview" class="review_add">
5
-    <legend>Leave a product review</legend>
6
+	<legend>{% trans "Leave a product review" %}</legend>
6 7
     <form method="post" action="./#addreview" class="form-horizontal" >
7 8
         {% csrf_token %}
8 9
         {% include "partials/form_fields.html" with form=form %}
9 10
         <div class="form-actions">
10
-            <button type="submit" value="Submit" class="btn btn-primary">Submit</button>
11
-			or
12
-            <a href="{{ product.get_absolute_url }}" >cancel</a>
11
+			<button type="submit"  class="btn btn-primary">{% trans "Submit" %}</button>
12
+			{% trans "or" %}
13
+			<a href="{{ product.get_absolute_url }}" >{% trans "cancel" %}</a>
13 14
         </div>
14 15
     </form>
15 16
 </div>

+ 3
- 2
oscar/templates/reviews/review.html View File

@@ -1,9 +1,10 @@
1 1
 {% extends "catalogue/detail.html" %}
2
+{% load i18n %}
2 3
 
3 4
 {% block product_review %}
4 5
 {% if review %}		
5 6
     <h4 id="review-{{ review.pk }}"> {{ review.title }} </h4>
6
-    <p> Score: {{ review.score|floatformat:1 }} / 5.0</p>
7
-    <p> Comments: {{ review.body }}</p>						
7
+	<p> {% trans "Score:" %} {{ review.score|floatformat:1 }} / 5.0</p>
8
+	<p> {% trans "Comments:" %} {{ review.body }}</p>
8 9
 {% endif %}
9 10
 {% endblock %}

+ 15
- 15
oscar/templates/reviews/reviews.html View File

@@ -1,17 +1,17 @@
1 1
 {% extends "layout.html" %}
2
-
3 2
 {% load currency_filters %}
4 3
 {% load history_tags %}
5 4
 {% load thumbnail %}
5
+{% load i18n %}
6 6
 
7 7
 {% block title %}
8
-Reviews for {{ product.title }} | {{ block.super }}
8
+{% trans "Reviews for" %} {{ product.title }} | {{ block.super }}
9 9
 {% endblock %}
10 10
 
11 11
 {% block breadcrumbs %}
12 12
 <ul class="breadcrumb">
13 13
     <li>
14
-        <a href="{% url promotions:home %}">Home</a>
14
+	<a href="{% url promotions:home %}">{% trans "Home" %}</a>
15 15
         <span class="divider">/</span>
16 16
     </li>
17 17
     <li>
@@ -20,7 +20,7 @@ Reviews for {{ product.title }} | {{ block.super }}
20 20
         <span class="divider">/</span>
21 21
         {% endwith %}
22 22
     </li>
23
-    <li class="active"><a href=".">Reviews of {{ product.get_title }}</a></li>
23
+	<li class="active"><a href=".">{% trans "Reviews of" %} {{ product.get_title }}</a></li>
24 24
 </ul>
25 25
 {% endblock %}
26 26
 
@@ -35,15 +35,15 @@ Reviews for {{ product.title }} | {{ block.super }}
35 35
     <div class="row-fluid">
36 36
         <div class='span9'>
37 37
             <div class="well">
38
-                <p>Read customer reviews on this product.</p>
39
-                <p><a href="{% url catalogue:reviews-add product.slug product.id %}" class="btn btn-primary">Add a review</a></p>
38
+				<p>{% trans "Read customer reviews on this product." %}</p>
39
+				<p><a href="{% url catalogue:reviews-add product.slug product.id %}" class="btn btn-primary">{% trans "Add a review" %}</a></p>
40 40
             </div>
41 41
             {% if reviews %}
42
-            <h4> Sort by: </h4>
42
+			<h4>{% trans "Sort by:" %}</h4>
43 43
             <form action="." method="get">
44 44
                 <select name="sort_by">
45
-                        <option value="score">Score</option>
46
-                        <option value="recency">Recency</option>
45
+					<option value="score">{% trans "Score" %}</option>
46
+					<option value="recency">{% trans "Recency" %}</option>
47 47
                 </select>
48 48
                 <input type="submit" value="Go" />
49 49
             </form>
@@ -55,11 +55,9 @@ Reviews for {{ product.title }} | {{ block.super }}
55 55
                     <p>{{ review.date_created }}<p>
56 56
                     <p>{{ review.body|linebreaks }}</p>
57 57
                     <p><a href="{{ review.get_absolute_url }}">Permalink</a>
58
-
59
-                                {% include 'reviews/_vote_bit.html' %}
60
-
58
+					{% include 'reviews/_vote_bit.html' %}
61 59
                     {% if review.has_votes %}
62
-                        <p>{{ review.num_up_votes }} customers agreed.</p>
60
+					<p>{% blocktrans %}{{ review.num_up_votes }} customers agreed.{% endblocktrans %}</p>
63 61
                     {% endif %}
64 62
                 </div>
65 63
                 {% endfor %}
@@ -68,15 +66,17 @@ Reviews for {{ product.title }} | {{ block.super }}
68 66
             <div class="pagination">
69 67
                 <span class="step-links">
70 68
                     {% if page_obj.has_previous %}
71
-                        <a href="?page={{ page_obj.previous_page_number }}">Previous</a>
69
+					<a href="?page={{ page_obj.previous_page_number }}">{% trans "Previous" %}</a>
72 70
                     {% endif %}
73 71
                     {% if paginator.num_pages > 1 %}
74 72
                     <span class="current">
73
+						{% blocktrans %}
75 74
                         Page {{ page_obj.number }} of {{ paginator.num_pages }}.
75
+						{% endblocktrans %}
76 76
                     </span>
77 77
                     {% endif %}
78 78
                     {% if page_obj.has_next %}
79
-                        <a href="?page={{ page_obj.next_page_number }}">Next</a>
79
+					<a href="?page={{ page_obj.next_page_number }}">{% trans "Next" %}</a>
80 80
                     {% endif %}
81 81
                 </span>
82 82
             </div>

+ 7
- 4
runtests.py View File

@@ -13,8 +13,9 @@ from django_nose import NoseTestSuiteRunner
13 13
 logging.disable(logging.CRITICAL)
14 14
 
15 15
 
16
-def run_tests(verbosity, *test_args):
17
-    test_runner = NoseTestSuiteRunner(verbosity=verbosity)
16
+def run_tests(options, *test_args):
17
+    test_runner = NoseTestSuiteRunner(verbosity=options.verbosity,
18
+                                      pdb=options.pdb)
18 19
     if not test_args:
19 20
         test_args = ['tests']
20 21
     num_failures = test_runner.run_tests(test_args)
@@ -28,15 +29,17 @@ if __name__ == '__main__':
28 29
                       action='store_true', help="Generate coverage report")
29 30
     parser.add_option('-v', '--verbosity', dest='verbosity', default=1,
30 31
                       type='int', help="Verbosity of output")
32
+    parser.add_option('-d', '--pdb', dest='pdb', default=False,
33
+                      action='store_true', help="Whether to drop into PDB on failure/error")
31 34
     (options, args) = parser.parse_args()
32 35
 
33 36
     if options.use_coverage:
34 37
         print 'Running tests with coverage'
35 38
         c = coverage(source=['oscar'])
36 39
         c.start()
37
-        run_tests(options.verbosity, *args)
40
+        run_tests(options, *args)
38 41
         c.stop()
39 42
         print 'Generate HTML reports'
40 43
         c.html_report()
41 44
     else:
42
-        run_tests(options.verbosity, *args)
45
+        run_tests(options, *args)

Loading…
Cancel
Save