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');