From af7a53069a4ffb8f041b785d89fe0fcb9f4ca63d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Thu, 5 Mar 2020 23:02:04 +0100 Subject: added i18n, converted HTML files, TODO: js UI responses, TODO: translations So basically, multilanguage support from an JavaScript object. - only slovenian and english - no change language UI yet - only HTML strings are actually translated \- all text is translated, but javascript M.toast and other similar stuff does not pass trough s(), d(), S() and D() functions yet - how to i18n: - add a string to js/lang/bundle.js TO ALL LANGUAGES (translation mgmt sys will have to be created) - HTML: create tags, where 1st ? tells wether to just output the string (s) without dot suffix or (d) to try and append a . (for sentences and paragraphs) if it is not there yet. second ? tells wether to leave lowercase strings (l) or (u) to force the first character of the string be uppercase (capitalize()). - put the key of your string as the innerHTML of the x-?? element. - JS: S("key") and D("key") return capitalized, s() and d() do not change case. --- pages/gradings.html | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'pages/gradings.html') diff --git a/pages/gradings.html b/pages/gradings.html index b54ddc2..56d244e 100644 --- a/pages/gradings.html +++ b/pages/gradings.html @@ -27,6 +27,7 @@ + @@ -38,7 +39,7 @@