Add Swedish translation (thanks sheldon) and other edits

This commit is contained in:
David Ralph 2019-01-24 20:28:54 +00:00
parent 1f87afa956
commit 7f7436a33c
9 changed files with 21 additions and 17 deletions

View File

@ -105,6 +105,8 @@ Russian - Messages (by [dondish](https://github.com/dondish))
Arabic - Messages (by [MrSheldon](https://github.com/MrSheldon))
Swedish - Messages (by [MrSheldon](https://github.com/MrSheldon))
*Feel free to pull request with other translations!*
## Credits

View File

@ -1 +1 @@
{"version":3,"sourceRoot":"","sources":["../scss/modules/_background.scss","../scss/modules/_quote.scss","../scss/modules/_time-greeting.scss","../scss/base.scss"],"names":[],"mappings":"CAkBA,gDACA,+CACA,iDACA,8CACA,6CACA,2CACA,6CACA,2CACA,iDACA,8CACA,+CACA,+CACA,+CACA,6CACA,+CACA,+CACA,+CACA,+CACA,+CACA,gDACA,gDACA,8CACA,8CACA,kDACA,8CCxBA,OAEI,yBAEA,YACA,kBAEA,iBACA,kBAEA,kBAEI,oBAEA,kBAEA,2BACI,YACA,mBAGJ,0BACI,YACA,kBAIR,YACI,iBC1BR,UAEC,uBAEA,kBAMD,KAEC,uBAEA,gBCXD,sBACA,KAEC,aACA,sBACA,6BACA,mBAEA,SAEA,sBACA,wBACA,sBAEA,qBACA,WAEA,gBAEC,sBACD,iBAID,WACC,qBACA,kBACA,gBACA,0GAKD,MACC,0BAGD,sBAGC","file":"base.css"}
{"version":3,"sourceRoot":"","sources":["../scss/modules/_background.scss","../scss/modules/_quote.scss","../scss/modules/_time-greeting.scss","../scss/base.scss"],"names":[],"mappings":"CAkBA,gDACA,+CACA,iDACA,8CACA,6CACA,2CACA,6CACA,2CACA,iDACA,8CACA,+CACA,+CACA,+CACA,6CACA,+CACA,+CACA,+CACA,+CACA,+CACA,gDACA,gDACA,8CACA,8CACA,kDACA,8CCxBA,OACI,yBAEA,YACA,kBAEA,iBACA,kBAEA,kBACI,oBACA,kBAEA,2BACI,YACA,mBAGJ,0BACI,YACA,kBAIR,YACI,iBCvBR,UACC,uBACA,kBAKD,KACC,uBACA,gBCND,sBACA,KAEC,aACA,sBACA,6BACA,mBAEA,SAEA,sBACA,wBACA,sBAEA,qBACA,WAEA,gBAEG,sBACH,iBAID,WACC,qBACA,kBACA,gBACA,0GAKD,MACC,0BAGD,sBAGC","file":"base.css"}

File diff suppressed because one or more lines are too long

View File

@ -32,5 +32,6 @@ module.exports = {
arcodes: ['ar', 'ar-DZ', 'ar-BH', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW',
'ar-LB', 'ar-LY', 'ar-QA', 'ar-SA', 'ar-SY', 'ar-TN', 'ar-AE',
'ar-YE'
]
],
svcodes: ['sv', 'sv-FI', 'sv-SV']
}

View File

@ -36,6 +36,7 @@ module.exports = class Function {
else if (util.contains.call(codes.hecodes, nal)) message.heMessageSet(); //Hebrew
else if (util.contains.call(codes.rucodes, nal)) message.ruMessageSet(); //Russian
else if (util.contains.call(codes.arcodes, nal)) message.arMessageSet(); //Arabic
else if (util.contains.call(codes.svcodes, nal)) message.svMessageSet(); //Swedish
else message.engMessageSet(); //English
};

View File

@ -75,7 +75,7 @@ module.exports = class Message {
else time = time; //If it's unknown, set the time stirng to "Good evening"
setHTMLContent('.greeting', time); // Write the string contents to the HTML
}
// German
static deMessageSet() {
let hour = new Date().getHours(); // Get the current hour
@ -105,8 +105,8 @@ module.exports = class Message {
setHTMLContent('.greeting', time); // Write the string contents to the HTML
}
// Arabic
static arMessageSet() {
// Arabic
static arMessageSet() {
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"
@ -114,4 +114,13 @@ module.exports = class Message {
else time = time; //If it's unknown, set the time stirng to "Good evening"
setHTMLContent('.greeting', time); // Write the string contents to the HTML
}
// Swedish
static svMessageSet() {
let hour = new Date().getHours(); // Get the current hour
let time = 'God kväll'; // Set the default time string to "Good evening"
if (hour < 12) time = 'God morgon'; // If it's before 12am, set the time string to "Good morning"
else if (hour > 18) time = 'Dod eftermiddag'; // If it's before 6pm, set the time string to "Good afternoon"
setHTMLContent('.greeting', time); // Write the string contents to the HTML
}
}

View File

@ -40,7 +40,7 @@ body {
overflow: hidden;
-moz-user-select: none; /* Firefox */
-moz-user-select: none; /* Firefox */
user-select: none; /* Non-prefixed version, currently supported by Chrome and Opera */
}

View File

@ -17,7 +17,6 @@
*/
.quote {
--shadow-shift: 0.125rem;
width: 37.5%;
@ -27,11 +26,9 @@
text-align: center;
blockquote {
margin: 0 0 0.25rem 0;
line-height: 1.125;
::before {
content: '';
margin-right: 0.25ch;

View File

@ -19,19 +19,13 @@
/* Greeting */
.greeting {
--shadow-shift: 0.2rem;
font-size: 3.25rem;
}
/* Time */
time {
--shadow-shift: 0.4rem;
font-size: 12rem;
}