mirror of https://github.com/mue/mue.git
More translations (thanks unto)
This commit is contained in:
parent
1915ef226d
commit
3155f5d15b
|
@ -95,6 +95,10 @@ Dutch - Messages (by [PassTheWessel](https://github.com/PassTheWessel))
|
|||
|
||||
French - Messages (by [Yanderella](https://github.com/Chivi19) and ohlookitsderpy)
|
||||
|
||||
Finnish - Messages (by [untocodes](https://github.com/untocodes))
|
||||
|
||||
German - Messages (by [untocodes](https://github.com/untocodes))
|
||||
|
||||
*Feel free to pull request with other translations!*
|
||||
|
||||
## Credits
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -24,5 +24,7 @@ module.exports = {
|
|||
spcodes: ['es', 'es-AR', 'es-BO', 'es-CL', 'es-CO', 'es-CR', 'es-DO',
|
||||
'es-EC', 'es-ES', 'es-GT', 'es-HN', 'es-MX', 'es-NI', 'es-PA',
|
||||
'es-PE', 'es-PR', 'es-PY', 'es-SV', 'es-UY', 'es-VE'
|
||||
]
|
||||
],
|
||||
ficodes: ['fi'],
|
||||
decodes: ['de', 'de-AT', 'de-DE', 'de-LI', 'de-LU', 'de-CH']
|
||||
}
|
|
@ -31,6 +31,8 @@ module.exports = class Functions {
|
|||
else if (util.contains.call(codes.frcodes, nal)) message.frMessageSet(); //French
|
||||
else if (util.contains.call(codes.ptcodes, nal)) message.ptMessageSet(); //Portuguese
|
||||
else if (util.contains.call(codes.spcodes, nal)) message.spMessageSet(); //Spanish
|
||||
else if (util.contains.call(codes.ficodes, nal)) message.spMessageSet(); //Finnish
|
||||
else if (util.contains.call(codes.decodes, nal)) message.spMessageSet(); //German
|
||||
else message.engMessageSet(); //English
|
||||
};
|
||||
|
||||
|
@ -41,10 +43,10 @@ module.exports = class Functions {
|
|||
|
||||
static setRandomQuote() {
|
||||
let id = util.getRandIndex(quotes.authors);
|
||||
if (util.contains.call(codes.itcodes, nal)) util.setHTMLContent('blockquote', `"${quotes.ita[id]}"`);
|
||||
else if (util.contains.call(codes.ptcodes, nal)) util.setHTMLContent('blockquote', `"${quotes.pt[id]}"` || `"${quotes.eng[id]}"`);
|
||||
else if (util.contains.call(codes.spcodes, nal)) util.setHTMLContent('blockquote', `"${quotes.spa[id]}"`);
|
||||
else util.setHTMLContent('blockquote', `"${quotes.eng[id]}"`);
|
||||
if (util.contains.call(codes.itcodes, nal)) util.setHTMLContent('blockquote', `"${quotes.ita[id]}"`); //Italian
|
||||
else if (util.contains.call(codes.ptcodes, nal)) util.setHTMLContent('blockquote', `"${quotes.pt[id]}"` || `"${quotes.eng[id]}"`); //Portuguese
|
||||
else if (util.contains.call(codes.spcodes, nal)) util.setHTMLContent('blockquote', `"${quotes.spa[id]}"`); //Spanish
|
||||
else util.setHTMLContent('blockquote', `"${quotes.eng[id]}"`); //English
|
||||
util.setHTMLContent('cite', quotes.authors[id]);
|
||||
};
|
||||
|
||||
|
|
|
@ -62,4 +62,22 @@ module.exports = class Message {
|
|||
else if (hour > 20) time = 'Buenas Noches'; // If it's after 6pm, set the time string to "Good afternoon"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
}
|
||||
|
||||
// Finnish
|
||||
static fiMessageSet() {
|
||||
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"
|
||||
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"
|
||||
setHTMLContent('.greeting', time); // Write the string contents to the HTML
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue