summaryrefslogtreecommitdiff
path: root/client-web/source
diff options
context:
space:
mode:
Diffstat (limited to 'client-web/source')
-rw-r--r--client-web/source/index.ts2
-rw-r--r--client-web/source/locale/de.ts89
-rw-r--r--client-web/source/locale/en.ts29
-rw-r--r--client-web/source/locale/mod.ts7
-rw-r--r--client-web/source/preferences/decl.ts48
-rw-r--r--client-web/source/preferences/mod.ts1
-rw-r--r--client-web/source/preferences/ui.ts4
7 files changed, 150 insertions, 30 deletions
diff --git a/client-web/source/index.ts b/client-web/source/index.ts
index b4dd11c..4be573f 100644
--- a/client-web/source/index.ts
+++ b/client-web/source/index.ts
@@ -17,7 +17,7 @@ import { Chat } from "./chat.ts"
import { init_locale } from "./locale/mod.ts";
import { PO } from "./locale/mod.ts";
-export const VERSION = "1.0.3"
+export const VERSION = "1.0.4"
globalThis.onload = () => main()
export interface ClientConfig {
diff --git a/client-web/source/locale/de.ts b/client-web/source/locale/de.ts
new file mode 100644
index 0000000..097f3c9
--- /dev/null
+++ b/client-web/source/locale/de.ts
@@ -0,0 +1,89 @@
+import { LanguageStrings } from "./mod.ts";
+
+export const PO_DE_DE: LanguageStrings = {
+ microphone: "Mikrofon",
+ chatbox_placeholder: "Schreibe eine nachricht",
+ chatbox_label: "Sende nachricht",
+ join_message: author => [author, " kommt."],
+ leave_message: author => [author, " geht."],
+ summary_empty_message: "(leere nachricht)",
+ summery_image: "(bild)",
+ camera: "Kamera",
+ file: "Datei",
+ leave: "Verlassen",
+ screen: "Bildschirm",
+ image_alt: "Bild (Klicken zum Öffnen)",
+ warn_mem_download: "Download zu Arbeitsspeicher, weil Serviceworker nicht verfügbar sind.",
+ confirm_update: "Really update?",
+ warn_short_secret: "Raumgeheimniss sehr kurz; Verschlüsslung ist nicht sicher.",
+ warn_secure_context: "Die Seite ist kein 'Secure Context'",
+ warn_no_webrtc: "WebRTC wird nicht unterstützt.",
+ warn_no_crypto: "SubtleCrypto ist nicht verfügbar",
+ warn_no_sw: "Dein Browser unterstützt die Service Worker API nicht, automatische Updates sind nicht verhinderbar.",
+ warn_old_url: "Du wurdest vom alten URL-Format weitergeleitet. Der Server kennt jetzt das Raumgeheimniss; Verschlüsslung ist nicht sicher.",
+ confirm_quit: "Du teilst Dinge. Wirklich verlassen?",
+ controls: "Steuerung",
+ license: "Lizens",
+ source_code: "Quellcode",
+ stop_sharing: "Teilen beenden",
+ documentation: "Dokumentation",
+ known_rooms: "Bekannte Räume",
+ chat: "Chat",
+ settings: "Einstellungen",
+ edit: "Bearbeiten",
+ finish_edit: "Fertig",
+ add_current_room: "Aktuellen Raum hinzufügen",
+ add: "Hinzufügen",
+ move_down: "Runter",
+ move_up: "Hoch",
+ unknown_user: "Unbekannter Benutzer",
+ status_checking: "Prüfen...",
+ status_connected: "Verbunden",
+ status_failed: "Verbindung fehlgeschlagen",
+ status_disconnected: "Verbindung getrennt",
+ status_no_conn: "Nicht verbunden",
+ status_await_channel_open: "Warten auf Übertragungskanal…",
+ status_await_channel_close: "Warten auf das Schließen des Übertragungskanals…",
+ downloading: "Lädt herunten…",
+ download_again: "Nochmal Heruntenladen",
+ download: "Herunterladen",
+ status_drain_buffer: amount => `Puffer leeren… (buffer: ${amount})`,
+ status_buffering: "Puffert…",
+ status_closing: "Kanal schließt…",
+ mute: "Stumm",
+ video_stream: "Videoübertragung",
+ audio_stream: "Audioübertragung",
+ disable: "Deaktivieren",
+ enable: "Aktivieren",
+ status_await_track: "Spur wird erwartet…",
+ notification_perm_explain: "Um Benarchichtigungen zu erhalten, musst du die keks-meet die Berechtigung dafür geben. ",
+ grant: "Berechtigen",
+ clear_prefs: "Du willst alle Einstellungen löschen? Nimm den hier: ",
+ setting_descs: {
+ language: "Sprache",
+ warn_redirect: "Interne Option, die der Server bei einer Weiterleitung setzt.",
+ image_view_popup: "Öffne Bilder in einem neuen Tab",
+ webrtc_debug: "Zeige erweiterte Informationen zu WebRTC zeugs",
+
+ microphone_enabled: "Füge eine Mikrofonspur beim start hinzu.",
+ screencast_enabled: "Füge eine Bildschirmspur beim start hinzu.",
+ camera_enabled: "Füge eine Kameraspur beim start hinzu.",
+ rnnoise: "Benutze RNNoise für Rauschunterdrückung",
+ native_noise_suppression: "Schlage dem Browser vor, selbst Rauschen zu Unterdrücken",
+ microphone_gain: "Mikrofonlautstärke",
+ video_fps: "Preferierte Bildrate (in 1/s) für Bildschirm und Kamera",
+ video_resolution: "Preferierte Breite für Bildschirm und Kamera",
+ camera_facing_mode: "Preferierte Kameraausrichtung",
+ auto_gain_control: "Automatische Mikrofonlautstärkeanpassung",
+ echo_cancellation: "Echounterrückung",
+ audio_activity_threshold: "Audioaktivitätsschwellwert",
+ optional_audio_default_enable: "Audiospuren automatisch aktivieren",
+ optional_video_default_enable: "Videospuren automatisch aktivieren",
+ notify_chat: "Sende Benarchichtigungen für eingehende Chatnachrichten",
+ notify_join: "Sende Benarchichtigungen wenn Benutzer beitreten",
+ notify_leave: "Sende Benarchichtigungen wenn Benutzer gehen",
+ enable_onbeforeunload: "Frage nach Bestätigung beim verlassen der Seite wenn Spuren geteilt sind.",
+ room_watches: "Bekannte Räume (Als semikolongetrennte Liste von name=geheimnis Paaren)",
+ username: "Benutzername",
+ }
+}
diff --git a/client-web/source/locale/en.ts b/client-web/source/locale/en.ts
index da9d949..3bf5f7e 100644
--- a/client-web/source/locale/en.ts
+++ b/client-web/source/locale/en.ts
@@ -52,12 +52,39 @@ export const PO_EN_US: LanguageStrings = {
status_closing: "Channel closing…",
mute: "Mute",
video_stream: "video stream",
- audio_stream: "video stream",
+ audio_stream: "audio stream",
disable: "Disable",
enable: "Enable",
status_await_track: "Awaiting track…",
notification_perm_explain: "For keks-meet to send notifications, it needs you to grant permission: ",
grant: "Grant",
clear_prefs: "Want to clear all settings? Use this:",
+ setting_descs: {
+ language: "Interface Language",
+ warn_redirect: "Internal option that is set by a server redirect.",
+ image_view_popup: "Open image in popup instead of new tab",
+ webrtc_debug: "Show additional information for WebRTC related stuff",
+
+ microphone_enabled: "Add one microphone track on startup",
+ screencast_enabled: "Add one screencast track on startup",
+ camera_enabled: "Add one camera track on startup",
+ rnnoise: "Use RNNoise for noise suppression",
+ native_noise_suppression: "Suggest the browser to do noise suppression",
+ microphone_gain: "Amplify microphone volume",
+ video_fps: "Preferred framerate (in 1/s) for screencast and camera",
+ video_resolution: "Preferred width for screencast and camera",
+ camera_facing_mode: "Prefer user-facing or env-facing camera",
+ auto_gain_control: "Automatically adjust mic gain",
+ echo_cancellation: "Cancel echo",
+ audio_activity_threshold: "Audio activity threshold",
+ optional_audio_default_enable: "Enable audio tracks by default",
+ optional_video_default_enable: "Enable video tracks by default",
+ notify_chat: "Send notifications for incoming chat messages",
+ notify_join: "Send notifications when users join",
+ notify_leave: "Send notifications when users leave",
+ enable_onbeforeunload: "Prompt for confirmation when leaving the site while local resources are active",
+ room_watches: "Known rooms (as semicolon seperated list of name=secret pairs)",
+ username: "Username",
+ }
}
diff --git a/client-web/source/locale/mod.ts b/client-web/source/locale/mod.ts
index 4febcec..bcaf067 100644
--- a/client-web/source/locale/mod.ts
+++ b/client-web/source/locale/mod.ts
@@ -1,13 +1,17 @@
+import { PO_DE_DE } from "./de.ts";
import { PO_EN_US } from "./en.ts";
+import { PREF_DECLS } from "../preferences/decl.ts";
export let PO: LanguageStrings;
export function init_locale(lang: string) {
+ if (lang == "system") lang = navigator.language
PO = LOCALES[lang]
}
export const LOCALES: { [key: string]: LanguageStrings } = {
- "en-US": PO_EN_US
+ "en-US": PO_EN_US,
+ "de-DE": PO_DE_DE,
}
export interface LanguageStrings {
@@ -69,4 +73,5 @@ export interface LanguageStrings {
grant: string,
status_await_track: string,
clear_prefs: string,
+ setting_descs: { [key in keyof typeof PREF_DECLS]: string },
}
diff --git a/client-web/source/preferences/decl.ts b/client-web/source/preferences/decl.ts
index a75f1d9..a8c33a6 100644
--- a/client-web/source/preferences/decl.ts
+++ b/client-web/source/preferences/decl.ts
@@ -17,34 +17,34 @@ const string = "", bool = false, number = 0; // example types for ts
const optional = <T>(a: T): T | undefined => a
export const PREF_DECLS = {
- username: { type: string, default: "guest-" + hex_id(), description: "Username", allow_url: true },
- language: { type: optional(string), possible_values: Object.keys(LOCALES), description: "Interface Language", allow_url: true },
- warn_redirect: { type: bool, hidden: true, default: false, description: "Internal option that is set by a server redirect.", allow_url: true },
- image_view_popup: { type: bool, default: true, description: "Open image in popup instead of new tab" },
- webrtc_debug: { type: bool, default: false, description: "Show additional information for WebRTC related stuff" },
+ username: { type: string, default: "guest-" + hex_id(), allow_url: true },
+ language: { type: string, possible_values: ["system", ...Object.keys(LOCALES)], default: "system", allow_url: true },
+ warn_redirect: { type: bool, hidden: true, default: false, allow_url: true },
+ image_view_popup: { type: bool, default: true },
+ webrtc_debug: { type: bool, default: false },
/* MEDIA */
- microphone_enabled: { type: bool, default: false, description: "Add one microphone track on startup" },
- screencast_enabled: { type: bool, default: false, description: "Add one screencast track on startup" },
- camera_enabled: { type: bool, default: false, description: "Add one camera track on startup" },
- rnnoise: { type: bool, default: true, description: "Use RNNoise for noise suppression", allow_url: true },
- native_noise_suppression: { type: bool, default: false, description: "Suggest the browser to do noise suppression" },
- microphone_gain: { type: number, default: 1, description: "Amplify microphone volume" },
- video_fps: { type: number, description: "Preferred framerate (in 1/s) for screencast and camera" },
- video_resolution: { type: number, description: "Preferred width for screencast and camera" },
- camera_facing_mode: { type: optional(string), possible_values: ["environment", "user"], description: "Prefer user-facing or env-facing camera" },
- auto_gain_control: { type: bool, description: "Automatically adjust mic gain" },
- echo_cancellation: { type: bool, description: "Cancel echo", allow_url: true },
- audio_activity_threshold: { type: number, optional: true, default: 0.003, description: "Audio activity threshold" },
+ microphone_enabled: { type: bool, default: false },
+ screencast_enabled: { type: bool, default: false },
+ camera_enabled: { type: bool, default: false },
+ rnnoise: { type: bool, default: true, allow_url: true },
+ native_noise_suppression: { type: bool, default: false },
+ microphone_gain: { type: number, default: 1 },
+ video_fps: { type: number },
+ video_resolution: { type: number },
+ camera_facing_mode: { type: optional(string), possible_values: ["environment", "user"] },
+ auto_gain_control: { type: bool },
+ echo_cancellation: { type: bool, allow_url: true },
+ audio_activity_threshold: { type: number, optional: true, default: 0.003 },
// TODO differenciate between mic, cam and screen
- optional_audio_default_enable: { type: bool, default: true, description: "Enable audio tracks by default" },
- optional_video_default_enable: { type: bool, default: false, description: "Enable video tracks by default" },
+ optional_audio_default_enable: { type: bool, default: true },
+ optional_video_default_enable: { type: bool, default: false },
- notify_chat: { type: bool, default: true, description: "Send notifications for incoming chat messages", allow_url: true },
- notify_join: { type: bool, default: true, description: "Send notifications when users join", allow_url: true },
- notify_leave: { type: bool, default: true, description: "Send notifications when users leave", allow_url: true },
+ notify_chat: { type: bool, default: true, allow_url: true },
+ notify_join: { type: bool, default: true, allow_url: true },
+ notify_leave: { type: bool, default: true, allow_url: true },
- enable_onbeforeunload: { type: bool, default: true, description: "Prompt for confirmation when leaving the site while local resources are active" },
- room_watches: { type: string, default: "[]", hidden: true, description: "Known rooms (as semicolon seperated list of name=secret pairs)" }
+ enable_onbeforeunload: { type: bool, default: true },
+ room_watches: { type: string, default: "[]", hidden: true }
}
diff --git a/client-web/source/preferences/mod.ts b/client-web/source/preferences/mod.ts
index 49cd20f..1df57b1 100644
--- a/client-web/source/preferences/mod.ts
+++ b/client-web/source/preferences/mod.ts
@@ -10,7 +10,6 @@ import { PREF_DECLS } from "./decl.ts";
export interface PrefDecl<T> {
default?: T,
type: T,
- description?: string,
possible_values?: T[]
optional?: boolean,
hidden?: boolean
diff --git a/client-web/source/preferences/ui.ts b/client-web/source/preferences/ui.ts
index 47f3a4b..1be4458 100644
--- a/client-web/source/preferences/ui.ts
+++ b/client-web/source/preferences/ui.ts
@@ -18,7 +18,6 @@ export function ui_preferences(): HTMLElement {
if (decl.possible_values) {
const sel = document.createElement("select")
sel.id = id
- sel.value = JSON.stringify(PREFS[key])
for (const v of decl.possible_values) {
const opt = document.createElement("option")
opt.value = opt.textContent = JSON.stringify(v ?? null)
@@ -28,6 +27,7 @@ export function ui_preferences(): HTMLElement {
change_pref(key, JSON.parse(sel.value) ?? undefined)
}
on_pref_changed(key, () => sel.value = JSON.stringify(PREFS[key] ?? null))
+ sel.value = JSON.stringify(PREFS[key])
prim_control = sel
} else if (typeof decl.type == "boolean") {
const checkbox = document.createElement("input")
@@ -79,7 +79,7 @@ export function ui_preferences(): HTMLElement {
use_opt_ = use_opt;
}
- const label = e("label", { for: id }, decl.description ?? `[${key}]`)
+ const label = e("label", { for: id }, PO.setting_descs[key] ?? `[${key}]`)
return e("tr", { class: "pref" }, e("td", {}, label), e("td", {}, use_opt_ ?? ""), e("td", {}, prim_control ?? ""))
})