Revert "locale: Measure temperature in Kelvin"

This reverts commit 26d8855e
master
Richard de Boer 2020-04-22 10:59:00 +02:00
parent 319307cdd1
commit 6d07882eae
3 changed files with 3 additions and 4 deletions

View File

@ -65,7 +65,7 @@
{ "id": "locale",
"name": "Languages",
"icon": "locale.png",
"version":"0.07",
"version":"0.06",
"description": "Translations for different countries",
"tags": "tool,system,locale,translate",
"type": "locale",

View File

@ -6,4 +6,3 @@
Add correct scaling for speed/distance/temperature
0.06: Remove translations if not required
Ensure 'on' is always supplied for translations
0.07: Measure temperature in Kelvin

View File

@ -112,8 +112,8 @@ exports = { name : "en_GB", currencySym:"£",
`${js(locale.currency_symbol)} + n.toFixed(2)`:
`n.toFixed(2) + ${js(locale.currency_symbol)}`;
var temperature;
if (locale.temperature=='°C') temperature="(t-273.15)";
else if (locale.temperature=='°F') temperature="((t-273.15)*9/5)+32";
if (locale.temperature=='°C') temperature="t";
else if (locale.temperature=='°F') temperature="(t*9/5)+32";
else throw new Error("Unknown temperature unit "+locale.temperature);
var localeModule = `var l = ${JSON.stringify({