projects
/
Pman.Core
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pman.Gnumeric.js
[Pman.Core]
/
Pman.I18n.js
diff --git
a/Pman.I18n.js
b/Pman.I18n.js
index
0abe1c6
..
eefef4d
100644
(file)
--- a/
Pman.I18n.js
+++ b/
Pman.I18n.js
@@
-47,11
+47,17
@@
Pman.I18n = {
toName: function(type, code)
{
var ret = code;
toName: function(type, code)
{
var ret = code;
- var lang = Pman.Login.authUser.lang || 'en';
+
+ var lang = 'en';
+
+ if(typeof(Pman.Login) != 'undefined' && typeof(Pman.Login.authUser.lang) == 'undefined'){
+ lang = Pman.Login.authUser.lang;
+ }
+
if (code.indexOf('_') > -1) {
var clang = code.split('_').shift();
var cc = code.split('_').pop();
if (code.indexOf('_') > -1) {
var clang = code.split('_').shift();
var cc = code.split('_').pop();
- return this.toName('l', clang.to
UpperCase()) + ' (' + cc
+ ')';
+ return this.toName('l', clang.to
LowerCase()) + ' (' + this.toName('c', cc.toUpperCase())
+ ')';
}
}
@@
-60,6
+66,7
@@
Pman.I18n = {
ret = d.title;
return false; // stop!
}
ret = d.title;
return false; // stop!
}
+ return true;
});
return ret;
});
return ret;
@@
-162,8
+169,8
@@
Pman.I18n = {
});
ret = ret.sort(function(a,b) {
});
ret = ret.sort(function(a,b) {
- if (a[0] == '**')
return 1;
// other always at end..
- if (b[0] == '**')
return -1;
// other always at end..
+ if (a[0] == '**')
{ return 1; }
// other always at end..
+ if (b[0] == '**')
{ return -1; }
// other always at end..
return a[1] > b[1] ? 1 : -1;
});
return a[1] > b[1] ? 1 : -1;
});
@@
-176,7
+183,7
@@
Pman.I18n = {
xtype: 'Store',
proxy: {
xtype: 'HttpProxy',
xtype: 'Store',
proxy: {
xtype: 'HttpProxy',
- url: baseURL + '/
I18N
/Country.html',
+ url: baseURL + '/
Core/I18n
/Country.html',
method: 'GET'
},
method: 'GET'
},
@@
-198,7
+205,7
@@
Pman.I18n = {
xtype: 'Store',
proxy: {
xtype: 'HttpProxy',
xtype: 'Store',
proxy: {
xtype: 'HttpProxy',
- url: baseURL + '/
I18N
/Lang.html',
+ url: baseURL + '/
Core/I18n
/Lang.html',
method: 'GET'
},
method: 'GET'
},
@@
-219,7
+226,7
@@
Pman.I18n = {
xtype: 'Store',
proxy: {
xtype: 'HttpProxy',
xtype: 'Store',
proxy: {
xtype: 'HttpProxy',
- url: baseURL + '/
I18N
/Currency.html',
+ url: baseURL + '/
Core/I18n
/Currency.html',
method: 'GET'
},
method: 'GET'
},