diff --git a/apps/locale/locale.html b/apps/locale/locale.html index ff1831466..51a1d2312 100644 --- a/apps/locale/locale.html +++ b/apps/locale/locale.html @@ -172,19 +172,19 @@ exports = { name : "en_GB", currencySym:"£", abmonth : locale.abmonth, month : locale.month, })}; -exports = { +exports = { name: ${js(locale.lang)}, currencySym: ${js(locale.currency_symbol)}, - dow: (d,short) => {day = d.getDay();return (short) ? l.abday.split(",")[day] : l.day.split(",")[day];}, - month: (d,short) => { month = d.getMonth(); return (short) ? l.abmonth.split(",")[month] : l.month.split(",")[month];}, + dow: (d,short) => l[short ? 'abday' : 'day'].split(',')[d.getDay()], + month: (d,short) => l[short ? 'abmonth' : 'month'].split(',')[d.getMonth()], number: n => n.toString(), currency: n => ${currency}, distance: n => (n < ${distanceUnits[locale.distance[1]]}) ? Math.round(n/${distanceUnits[locale.distance[0]]}) + ${js(locale.distance[0])} : Math.round(n/${distanceUnits[locale.distance[1]]}) + ${js(locale.distance[1])}, speed: s => Math.round(s/${speedUnits[locale.speed]}) + ${js(locale.speed)}, temp: t => Math.round(${temperature}) + ${js(locale.temperature)}, - translate: s => ${locale.trans?`{var t=${js(locale.trans)};s=""+s;return t[s]||t[s.toLowerCase()]||s;}`:`s`}, - date: (d,short) => (short) ? \`${dateS}\`: \`${dateN}\`, - time: (d,short) => (short) ? \`${timeS}\`: \`${timeN}\`, + translate: s => ${locale.trans?`{var t=${js(locale.trans)};s=''+s;return t[s]||t[s.toLowerCase()]||s;}`:`s`}, + date: (d,short) => short ? \`${dateS}\`: \`${dateN}\`, + time: (d,short) => short ? \`${timeS}\`: \`${timeN}\`, meridian: d => (d.getHours() <= 12) ? ${js(locale.ampm[0])}:${js(locale.ampm[1])}, };`; console.log("Locale Module is:",localeModule);