Fix global 'locale' variable
parent
755580f092
commit
a7109b4fbd
|
|
@ -40,7 +40,7 @@
|
||||||
{ "id": "locale",
|
{ "id": "locale",
|
||||||
"name": "Languages",
|
"name": "Languages",
|
||||||
"icon": "locale.png",
|
"icon": "locale.png",
|
||||||
"version":"0.02",
|
"version":"0.03",
|
||||||
"description": "Translations for different countries",
|
"description": "Translations for different countries",
|
||||||
"tags": "tool,system,locale,translate",
|
"tags": "tool,system,locale,translate",
|
||||||
"type": "locale",
|
"type": "locale",
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,3 @@
|
||||||
0.01: New App!
|
0.01: New App!
|
||||||
0.02: Fix locale.currencySym
|
0.02: Fix locale.currencySym
|
||||||
|
0.03: Fix global 'locale' variable
|
||||||
|
|
|
||||||
|
|
@ -60,9 +60,8 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
var app = `
|
var app = `var locale = ${JSON.stringify(locales[lang])};
|
||||||
locale = ${JSON.stringify(locales[lang])};
|
exports = {
|
||||||
exports = {
|
|
||||||
lang: locale.lang,
|
lang: locale.lang,
|
||||||
currencySym: locale.currency_symbol,
|
currencySym: locale.currency_symbol,
|
||||||
dow: (d,short) => {day = d.getDay();return (short) ? locale.abday.split(",")[day] : locale.day.split(",")[day];},
|
dow: (d,short) => {day = d.getDay();return (short) ? locale.abday.split(",")[day] : locale.day.split(",")[day];},
|
||||||
|
|
@ -75,7 +74,7 @@
|
||||||
translate: s => {s=""+s;return locale.trans[s]||locale.trans[s.toLowerCase()]||s},
|
translate: s => {s=""+s;return locale.trans[s]||locale.trans[s.toLowerCase()]||s},
|
||||||
date: (d,short) => (short) ? \`${dateS}\`: \`${dateN}\`,
|
date: (d,short) => (short) ? \`${dateS}\`: \`${dateN}\`,
|
||||||
time: (d,short) => (short) ? \`${timeS}\`: \`${timeN}\`,
|
time: (d,short) => (short) ? \`${timeS}\`: \`${timeN}\`,
|
||||||
};`;
|
};`;
|
||||||
|
|
||||||
sendCustomizedApp({
|
sendCustomizedApp({
|
||||||
storage:[
|
storage:[
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue