Localization + bugfixes

This commit is contained in:
Roman 2023-01-18 16:36:29 +01:00
parent 136ad48a5e
commit 878cd62bbe
6 changed files with 27 additions and 11 deletions

@ -45,4 +45,5 @@ return [
"gpg_key" => "GPG-Schlüssel", "gpg_key" => "GPG-Schlüssel",
"2fa_token" => "Zwei-Faktor Authentifizierung (2FA)", "2fa_token" => "Zwei-Faktor Authentifizierung (2FA)",
"profile_picture_of" => "Profilbild von", "profile_picture_of" => "Profilbild von",
"language" => "Sprache",
]; ];

@ -15,6 +15,7 @@ return [
"request" => "Anfordern", "request" => "Anfordern",
"cancel" => "Abbrechen", "cancel" => "Abbrechen",
"confirm" => "Bestätigen", "confirm" => "Bestätigen",
"ok" => "OK",
"language" => "Sprache", "language" => "Sprache",
"loading" => "Laden", "loading" => "Laden",
"logout" => "Ausloggen", "logout" => "Ausloggen",
@ -22,6 +23,9 @@ return [
"name" => "Name", "name" => "Name",
"type" => "Typ", "type" => "Typ",
"size" => "Größe", "size" => "Größe",
"not_supported" => "Nicht unterstützt",
"yes" => "Ja",
"no" => "Nein",
# dialog / actions # dialog / actions
"action" => "Aktion", "action" => "Aktion",
@ -36,6 +40,7 @@ return [
"delete" => "Löschen", "delete" => "Löschen",
"info" => "Info", "info" => "Info",
"reload" => "Aktualisieren", "reload" => "Aktualisieren",
"success" => "Erfolg",
# file # file
"choose_file" => "Datei auswählen", "choose_file" => "Datei auswählen",
@ -65,7 +70,4 @@ return [
"datefns_time_format_precise" => "HH:mm:ss", "datefns_time_format_precise" => "HH:mm:ss",
"datefns_datetime_format" => "dd.MM.yyyy HH:mm", "datefns_datetime_format" => "dd.MM.yyyy HH:mm",
"datefns_datetime_format_precise" => "dd.MM.yyyy HH:mm:ss", "datefns_datetime_format_precise" => "dd.MM.yyyy HH:mm:ss",
# API
"no_api_key_registered" => "Kein gültiger API-Schlüssel registriert",
]; ];

@ -45,4 +45,5 @@ return [
"gpg_key" => "GPG Key", "gpg_key" => "GPG Key",
"2fa_token" => "Two-Factor Authentication (2FA)", "2fa_token" => "Two-Factor Authentication (2FA)",
"profile_picture_of" => "Profile Picture of", "profile_picture_of" => "Profile Picture of",
"language" => "Language",
]; ];

@ -12,6 +12,9 @@ return [
"name" => "Name", "name" => "Name",
"type" => "Type", "type" => "Type",
"size" => "Size", "size" => "Size",
"not_supported" => "Not supported",
"yes" => "Yes",
"no" => "No",
# dialog / actions # dialog / actions
"action" => "Action", "action" => "Action",
@ -24,6 +27,7 @@ return [
"request" => "Request", "request" => "Request",
"cancel" => "Cancel", "cancel" => "Cancel",
"confirm" => "Confirm", "confirm" => "Confirm",
"ok" => "OK",
"remove" => "Remove", "remove" => "Remove",
"change" => "Change", "change" => "Change",
"reset" => "Reset", "reset" => "Reset",
@ -34,6 +38,7 @@ return [
"delete" => "Delete", "delete" => "Delete",
"info" => "Info", "info" => "Info",
"reload" => "Reload", "reload" => "Reload",
"success" => "Success",
# file # file
"choose_file" => "Choose File", "choose_file" => "Choose File",
@ -66,7 +71,4 @@ return [
"datefns_time_format_precise" => "pp", "datefns_time_format_precise" => "pp",
"datefns_datetime_format" => "MM/dd/yyyy p", "datefns_datetime_format" => "MM/dd/yyyy p",
"datefns_datetime_format_precise" => "MM/dd/yyyy pp", "datefns_datetime_format_precise" => "MM/dd/yyyy pp",
# API
"no_api_key_registered" => "No valid API-Key registered",
]; ];

@ -326,11 +326,21 @@ export default class API {
} }
async confirmGpgToken(token) { async confirmGpgToken(token) {
return this.apiCall("user/confirmGPG", { token: token }); let res = await this.apiCall("user/confirmGPG", { token: token });
if (res.success) {
this.user.gpgKey.confirmed = true;
}
return res;
} }
async removeGPG(password) { async removeGPG(password) {
return this.apiCall("user/removeGPG", { password: password }); let res = await this.apiCall("user/removeGPG", { password: password });
if (res.success) {
this.user.gpgKey = null;
}
return res;
} }
async downloadGPG(userId) { async downloadGPG(userId) {

@ -215,13 +215,13 @@ export class BoolColumn extends DataColumn {
renderData(L, entry, index) { renderData(L, entry, index) {
let data = super.renderData(L, entry); let data = super.renderData(L, entry);
return L(data ? "general.true" : "general.false"); return L(data ? "general.yes" : "general.no");
} }
} }
export class ControlsColumn extends DataColumn { export class ControlsColumn extends DataColumn {
constructor(buttons = [], params = {}) { constructor(label, buttons = [], params = {}) {
super("general.controls", null, { align: "center", ...params, sortable: false }); super(label, null, { align: "center", ...params, sortable: false });
this.buttons = buttons; this.buttons = buttons;
} }