1
0
Fork 0

Merge pull request #1021 from lunctis-viribus/master

Update locales.js with en_NL and weatherClock
master
Gordon Williams 2021-12-08 11:08:52 +00:00 committed by GitHub
commit 592b5aac4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 21 additions and 3 deletions

View File

@ -4722,7 +4722,7 @@
{
"id": "weatherClock",
"name": "Weather Clock",
"version": "0.02",
"version": "0.03",
"description": "A clock which displays current weather conditions (requires Gadgetbridge and Weather apps).",
"icon": "app.png",
"screenshots": [{"url":"screens/screen1.png"}],

View File

@ -191,6 +191,23 @@ var locales = {
month: "januari,februari,maart,april,mei,juni,juli,augustus,september,oktober,november,december",
trans: { yes: "ja", Yes: "Ja", no: "nee", No: "Nee", ok: "ok", on: "aan", off: "uit", "< Back": "< Terug" }
},
"en_NL": { // English date units with Dutch number, currency and navigation units.
lang: "en_NL",
decimal_point: ",",
thousands_sep: ".",
currency_symbol: "€",
int_curr_symbol: "EUR",
speed: "km/h",
distance: { 0: "m", 1: "km" },
temperature: "°C",
ampm: { 0: "am", 1: "pm" },
timePattern: { 0: "%HH:%MM:%SS ", 1: "%HH:%MM" },
datePattern: { 0: "%b %d %Y", 1: "%d/%m/%Y" }, // Feb 28 2020" // "01/03/2020"(short)
abmonth: "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec",
month: "January,February,March,April,May,June,July,August,September,October,November,December",
abday: "Sun,Mon,Tue,Wed,Thu,Fri,Sat",
day: "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday",
},
"en_CA": {
lang: "en_CA",
decimal_point: ".",

View File

@ -1,2 +1,3 @@
0.01: New App!
0.02: Minor layout format tweak so it uses less memory and draws ok on Bangle.js 1 (#1012)
0.03: Minor layout extra spaces.

View File

@ -101,7 +101,7 @@ function draw() {
var date = new Date();
clockLayout.time.label = locale.time(date, 1);
clockLayout.date.label = locale.date(date, 1).toUpperCase();
clockLayout.dow.label = locale.dow(date, 1).toUpperCase();
clockLayout.dow.label = locale.dow(date, 1).toUpperCase() + " ";
var weatherJson = getWeather();
if(weatherJson && weatherJson.weather){
var currentWeather = weatherJson.weather;
@ -110,7 +110,7 @@ function draw() {
clockLayout.tempUnit.label = temp[2];
clockLayout.weatherIcon.src = chooseIcon(currentWeather.txt);
const wind = locale.speed(currentWeather.wind).match(/^(\D*\d*)(.*)$/);
clockLayout.wind.label = wind[1] + " ";
clockLayout.wind.label = wind[1] + " ".repeat(wind[2].length-1);
clockLayout.windUnit.label = wind[2] + " " + (currentWeather.wrose||'').toUpperCase();
}
else{