mirror of https://github.com/mue/mue.git
It's broken, but I'll try fix it later
This commit is contained in:
parent
59bf49c0e1
commit
d4a366a782
File diff suppressed because one or more lines are too long
|
@ -18,13 +18,13 @@
|
|||
|
||||
const { setHTMLContent } = require('./utility.js');
|
||||
|
||||
module.exports = class Message {
|
||||
module.exports = class Messages {
|
||||
// English
|
||||
static engMessageSet() {
|
||||
let hour = new Date().getHours(); // Get the current hour
|
||||
let time = 'Good evening'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'Good morning'; //If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 18) time = 'Good afternoon'; //If it's after 6pm, set the time string to "Good afternoon"
|
||||
else if (hour > 18) time = 'Good afternoon'; //If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ module.exports = class Message {
|
|||
let hour = new Date().getHours(); // Get the current hour
|
||||
let time = 'Goedemiddag'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'Goedemorgen'; //If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 18) time = 'Goedenavond'; //If it's after 6pm, set the time string to "Good afternoon"
|
||||
else if (hour > 18) time = 'Goedenavond'; //If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ module.exports = class Message {
|
|||
let hour = new Date().getHours(); // Get the current hour
|
||||
let time = 'Bonsoir'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'Bonjour'; //If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 18) time = 'Bonne après-midi'; //If it's after 6pm, set the time string to "Good afternoon"
|
||||
else if (hour > 18) time = 'Bonne après-midi'; //If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ module.exports = class Message {
|
|||
let hour = new Date().getHours(); // Get the current hour
|
||||
let time = 'Buenas Tardes'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'Buenos Días'; // If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 20) time = 'Buenas Noches'; // If it's after 6pm, set the time string to "Good afternoon"
|
||||
else if (hour > 18) time = 'Buenas Noches'; // If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
|
@ -68,16 +68,16 @@ module.exports = class Message {
|
|||
let hour = new Date().getHours(); // Get the current hour
|
||||
let time = 'Hyvää iltaa'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'Hyvää huomenta'; // If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 20) time = 'Hyvää iltapäivää'; // If it's after 6pm, set the time string to "Good afternoon"
|
||||
else if (hour > 18) time = 'Hyvää iltapäivää'; // If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
|
||||
// German
|
||||
static deMessageSet() {
|
||||
let hour = new Date().getHours(); // Get the current hour
|
||||
let time = 'Guten Abend'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'Guten Morgen'; // If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 20) time = 'Guten Nachmittag'; // If it's after 6pm, set the time string to "Good afternoon"
|
||||
else if (hour > 18) time = 'Guten Nachmittag'; // If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ module.exports = class Message {
|
|||
let hour = new Date().getHours(); // Get the current hour
|
||||
let time = 'ערב טוב'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'בוקר טוב'; // If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 20) time = 'אחר הצהריים טובים'; // If it's after 6pm, set the time string to "Good afternoon"
|
||||
else if (hour > 18) time = 'אחר הצהריים טובים'; // If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
|
@ -95,7 +95,7 @@ module.exports = class Message {
|
|||
let hour = new Date().getHours(); // Get the current hour
|
||||
let time = 'Добрый Вечер'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'добрый утро'; // If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 20) time = 'добрый день'; // If it's after 6pm, set the time string to "Good afternoon"
|
||||
else if (hour > 18) time = 'добрый день'; // If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ module.exports = class Message {
|
|||
let hour = new Date().getHours(); // Get the current hour
|
||||
let time = 'مساء الخير'; // Set the default time string to "Good evening"
|
||||
if (hour < 12) time = 'صباح الخير'; // If it's before 12am, set the time string to "Good morning"
|
||||
else if (hour > 20) time = 'مساء الخير'; // If it's after 6pm, set the time string to "Good afternoon"
|
||||
else if (hour > 18) time = 'مساء الخير'; // If it's before 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
}
|
||||
}
|
|
@ -16,7 +16,7 @@
|
|||
█████████████████████████████████████████████████████████████
|
||||
*/
|
||||
|
||||
module.exports = class Util {
|
||||
module.exports = class Utility {
|
||||
// format time
|
||||
static formatTimeUnit(unit) {
|
||||
return unit < 10 ? '0' + unit : unit;
|
||||
|
|
Loading…
Reference in New Issue