summaryrefslogtreecommitdiffstats
path: root/assets/js/lang
diff options
context:
space:
mode:
authorsijanec <sijanecantonluka@gmail.com>2020-09-27 19:35:41 +0200
committersijanec <sijanecantonluka@gmail.com>2020-09-27 19:35:41 +0200
commitcc5cd1d44867e6c3ac628f8d141969111c28a46d (patch)
treecc44730acf3b7fe9efded66a672500645a3e1c32 /assets/js/lang
parentfixed missing ], now lopolisc.js fully works, to be integrated into meals.bvr (diff)
downloadbeziapp-cc5cd1d44867e6c3ac628f8d141969111c28a46d.tar
beziapp-cc5cd1d44867e6c3ac628f8d141969111c28a46d.tar.gz
beziapp-cc5cd1d44867e6c3ac628f8d141969111c28a46d.tar.bz2
beziapp-cc5cd1d44867e6c3ac628f8d141969111c28a46d.tar.lz
beziapp-cc5cd1d44867e6c3ac628f8d141969111c28a46d.tar.xz
beziapp-cc5cd1d44867e6c3ac628f8d141969111c28a46d.tar.zst
beziapp-cc5cd1d44867e6c3ac628f8d141969111c28a46d.zip
Diffstat (limited to 'assets/js/lang')
-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",