preparing svelte login, mastered translations
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
description = "Umbrella : Translations"
|
||||
|
||||
dependencies{
|
||||
implementation("de.srsoftware:tools.http:6.0.0")
|
||||
implementation("org.json:json:20240303")
|
||||
}
|
||||
@@ -1,21 +1,17 @@
|
||||
/* © SRSoftware 2025 */
|
||||
package de.srsoftware.umbrella.translations;
|
||||
|
||||
import static java.lang.System.Logger.Level.INFO;
|
||||
import static java.lang.System.Logger.Level.WARNING;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
import com.sun.net.httpserver.HttpExchange;
|
||||
import de.srsoftware.tools.Path;
|
||||
import de.srsoftware.tools.PathHandler;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import org.json.JSONObject;
|
||||
|
||||
public class Translations extends PathHandler {
|
||||
private static final System.Logger LOG = System.getLogger("Translations");
|
||||
@@ -24,7 +20,6 @@ public class Translations extends PathHandler {
|
||||
|
||||
@Override
|
||||
public boolean doGet(Path path, HttpExchange ex) throws IOException {
|
||||
LOG.log(INFO,"doGet({0},ex)",path);
|
||||
allowOrigin(ex,"*");
|
||||
if (path.empty())return sendContent(ex,501,"Language missing");
|
||||
var lang = path.pop();
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
{
|
||||
'login' : {
|
||||
'Login' : "Mist!"
|
||||
"home" : {
|
||||
"Welcome" : "Willkommen"
|
||||
},
|
||||
"login" : {
|
||||
"do_login" : "anmelden",
|
||||
"Email_or_Username": "Email oder Nutzername",
|
||||
"Login" : "Anmeldung",
|
||||
"OIDC_Login" : "Anmeldung mit OIDC",
|
||||
"Password" : "Passwort"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user