improve user client side translations

This commit is contained in:
2012-11-22 16:42:54 +01:00
parent 6251d07a5a
commit 88489804db
7 changed files with 40 additions and 17 deletions
+4 -2
View File
@@ -20,7 +20,7 @@ html lang="en"
var data_host = '#{Rails.env == 'development' ? 'http://localhost:3000' : 'http://data.qwaiter.com' }';
//var data_host = 'http://localhost:3000';
//data_host = 'http://192.168.1.148:3000';
var $locale = '#{I18n.locale}';
var $locale = 'en';
var $url_vars = null;
// Dummy holder when Qmobile object is not supplied by the mobile phone
var QMobile, Qwaiter, Quser;
@@ -37,7 +37,9 @@ html lang="en"
root_url: function(){return 'file:///Users/bterkuile/Documents/workspace/Qwaiter/assets'},
root_url: function(){return ''},
goHome: function(){ redirect_to('user_root')},
connection_problem: function(){alert('There is a problem connecting to the server')}
connection_problem: function(){alert('There is a problem connecting to the server')},
locale: function(){ return $locale || ($locale = 'en')},
setLocale: function(locale){$locale = locale; return locale}
});
//QMobile.setAuthToken('i5brDZ1HS1okoEq3pMyh');
+3 -3
View File
@@ -1,7 +1,7 @@
.page-header
.table-number
.supplier-name
h4= t('user.active_list.title', list: List.model_name.human)
h4 data-t="active_list.title" = t('user.active_list.title', list: List.model_name.human)
.form-actions
= link_to t('helpers.links.place_order'), user_list_products_path, class: ['user-top-button'], id: 'place-order-on-list'
span#list-needs-payment-button.user-top-button
@@ -10,8 +10,8 @@
table#active-list-table.table
thead
tr
th= Order.model_name.human
th.currency= Product.human_attribute_name(:price)
th data-t="models.order" = Order.model_name.human
th.currency data-t="attributes.product.price" = Product.human_attribute_name(:price)
tbody
tr
td colspan=2 = slider_image
+2 -1
View File
@@ -1,4 +1,5 @@
.page-header= title 'User list history'
.page-header
h2 data-t="list_history.title" = t('user.list_history.title')
nav.pagination
ul#list-history-container
- content_for :footer do
+3 -3
View File
@@ -1,7 +1,7 @@
.page-header
.table-number
.supplier-name
h4= t('user.show_products.title', products: Product.model_name.human_plural)
h4 data-t="show_products.title" = t('user.show_products.title', products: Product.model_name.human_plural)
.form-actions
= link_to t('helpers.links.show_active_list', list: List.model_name.human), user_active_list_path, class: ['user-top-button'], id: 'show-active-list'
span#list-needs-payment-button.user-top-button
@@ -14,9 +14,9 @@
table#active-order-table.table.hide
thead
tr
th= Product.model_name.human
th data-t="models.product"= Product.model_name.human
th #
th.currency Total
th.currency data-t="basket.total"= t('user.basket.total')
th
tbody
tfoot