1
0
Fork 0

Allow translate to work even if not given a string

master
Gordon Williams 2020-03-05 10:01:16 +00:00
parent 0232fc00cc
commit 18a9f2c71f
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@
distance: n => (n < 1000) ? Math.round(n) + locale.distance[0] : Math.round(n/1000) + locale.distance[1],
speed: s => Math.round(s) +locale.speed,
temp: t => Math.round(t) + locale.temperature,
translate: s => 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}\`,
time: (d,short) => (short) ? \`${timeS}\`: \`${timeN}\`,
};`;