summaryrefslogtreecommitdiffstats
path: root/assets/js/lang/bundle.js
diff options
context:
space:
mode:
authorAnton Luka Šijanec <sijanecantonluka@gmail.com>2020-09-27 22:11:50 +0200
committerGitHub <noreply@github.com>2020-09-27 22:11:50 +0200
commit80e48e2b88f85f03d88bf45a2f2b90e91e386c19 (patch)
tree944d1350550541f65ed70f906bfdb65fedef7e76 /assets/js/lang/bundle.js
parentMerge pull request #27 from beziapp/dev (diff)
parentchangelog (diff)
downloadbeziapp-80e48e2b88f85f03d88bf45a2f2b90e91e386c19.tar
beziapp-80e48e2b88f85f03d88bf45a2f2b90e91e386c19.tar.gz
beziapp-80e48e2b88f85f03d88bf45a2f2b90e91e386c19.tar.bz2
beziapp-80e48e2b88f85f03d88bf45a2f2b90e91e386c19.tar.lz
beziapp-80e48e2b88f85f03d88bf45a2f2b90e91e386c19.tar.xz
beziapp-80e48e2b88f85f03d88bf45a2f2b90e91e386c19.tar.zst
beziapp-80e48e2b88f85f03d88bf45a2f2b90e91e386c19.zip
Diffstat (limited to 'assets/js/lang/bundle.js')
-rw-r--r--assets/js/lang/bundle.js29
1 files changed, 18 insertions, 11 deletions
diff --git a/assets/js/lang/bundle.js b/assets/js/lang/bundle.js
index 4e15832..bd0335c 100644
--- a/assets/js/lang/bundle.js
+++ b/assets/js/lang/bundle.js
@@ -18,9 +18,6 @@ async function refreshLangDOM() {
localforage.getItem("chosenLang").then( (value) => {
chosenLang = value;
})
- // localforage.getItem("chosenCapitalize").then( (value) => { // poor unused code
- // chosenCapitalize = value;
- // })
];
await Promise.all(promises_to_runn);
// this could be done nicer. p. s.: lahko bi se uporablil x-s in x-S za razločitev med capitalize in !capitalize queryselectorall ni case sensitive za imena elementov
@@ -58,16 +55,18 @@ async function setLangConfigAndReload() {
window.location.reload();
}
window.addEventListener("DOMContentLoaded", () => {
- localforage.getItem("chosenLang").then( (value) => {
- if(value == null) {
- setLangConfigAndReload();
- } else {
- chosenLang = value;
- }
- });
- refreshLangDOM();
+ find_chosen_lang();
});
+async function find_chosen_lang() {
+ let value = await localforage.getItem("chosenLang");
+ if(value == null) {
+ setLangConfigAndReload();
+ } else {
+ chosenLang = value;
+ }
+ refreshLangDOM();
+}
const capitalize = (s) => {
if (typeof s !== 'string') return ''
@@ -253,6 +252,10 @@ var langstrings = {
mealSet: "meal set! Reload meals to be sure",
selected: "selected",
meal: "meal",
+ checkedOut: "checked out",
+ checkedIn: "checked in",
+ successfulCheckingInOut: "successfully checked in/out",
+ errorCheckingInOut: "failed to check in/out",
// about
version: "version",
authors: "authors",
@@ -461,6 +464,10 @@ var langstrings = {
mealSet: "obrok nastavljen! osvežite obroke in se prepričajte sami",
selected: "izbrano",
meal: "obrok",
+ checkedOut: "odjavljen",
+ checkedIn: "prijavljen",
+ errorCheckingInOut: "prijava/odjava na obrok NI uspela",
+ successfulCheckingInOut: "prijava/odjava na obrok je uspela",
// about
version: "različica",
authors: "avtorji",