From dcf5765e093dd47b0dc2188bf109bb6dca23fbeb Mon Sep 17 00:00:00 2001 From: adrian w kirk Date: Wed, 21 Apr 2021 11:09:18 +0100 Subject: [PATCH] Sliding text clock. Adding German language also limiting the numer of loaded clocks to 4 --- apps/slidingtext/custom.html | 5 +- apps/slidingtext/slidingtext.locale.de.js | 104 ++++++++++++++++++++++ 2 files changed, 107 insertions(+), 2 deletions(-) create mode 100644 apps/slidingtext/slidingtext.locale.de.js diff --git a/apps/slidingtext/custom.html b/apps/slidingtext/custom.html index 5023d9a3d..b2863ebf3 100644 --- a/apps/slidingtext/custom.html +++ b/apps/slidingtext/custom.html @@ -4,7 +4,7 @@ -

Please select watch languages

+

Please select watch languages (Max 4, only the first 4 selected will be loaded)

@@ -25,6 +25,7 @@ {name:"French",shortname:"fr"}, {name:"Japanese",shortname:"jp"}, {name:"Spanish",shortname:"es"} + {name:"German",shortname:"de"} ]; var selected_languages = ["en","es","jp"]; try{ @@ -51,7 +52,7 @@ for (var i=0; i' + hourOfDay + ' hours text->' + hours) + // Deal with the special times first + if(mins == 0){ + var hours = germanHoursToText(hourOfDay); + return [hours,"UHR", "","",""]; + } else if(mins == 30){ + var hours = germanHoursToText(hourOfDay+1); + return ["", "", "HALB","", hours]; + } else if(mins == 15){ + var hours = germanHoursToText(hourOfDay); + return ["", "", "VIERTEL", "NACH",hours]; + } else if(mins == 45) { + var hours = germanHoursToText(hourOfDay+1); + return ["", "", "VIERTEL", "VOR",hours]; + } else { + var mins_txt = germanMinsToText(mins); + return [hours, "UHR", mins_txt[0],mins_txt[1]]; + } + } +} + +module.exports = GermanDateFormatter; \ No newline at end of file