diff options
Diffstat (limited to 'client-web')
-rw-r--r-- | client-web/source/locale/de.ts | 4 | ||||
-rw-r--r-- | client-web/source/locale/en.ts | 2 | ||||
-rw-r--r-- | client-web/source/locale/mod.ts | 3 | ||||
-rw-r--r-- | client-web/source/logger.ts | 2 | ||||
-rw-r--r-- | client-web/source/resource/track.ts | 4 | ||||
-rw-r--r-- | client-web/source/user/local.ts | 2 |
6 files changed, 8 insertions, 9 deletions
diff --git a/client-web/source/locale/de.ts b/client-web/source/locale/de.ts index 174d821..70f1b01 100644 --- a/client-web/source/locale/de.ts +++ b/client-web/source/locale/de.ts @@ -9,7 +9,7 @@ export const PO_DE_DE: LanguageStrings = { microphone: "Mikrofon", chatbox_placeholder: "Schreibe eine nachricht", chatbox_label: "Sende nachricht", - join_message: author => [author, " kommt."], + join_message: author => [author, " ist beigetreten."], leave_message: author => [author, " geht."], summary_empty_message: "(leere nachricht)", summery_image: "(bild)", @@ -60,7 +60,7 @@ export const PO_DE_DE: LanguageStrings = { video_stream: "Videoübertragung", audio_stream: "Audioübertragung", disable: "Deaktivieren", - enable: "Aktivieren", + enable: thing => `${thing} aktivieren`, status_await_stream: "Übertragung startet…", notification_perm_explain: "Um Benarchichtigungen zu erhalten, musst du die keks-meet die Berechtigung dafür geben. ", grant: "Berechtigen", diff --git a/client-web/source/locale/en.ts b/client-web/source/locale/en.ts index 418b15c..4f57fc1 100644 --- a/client-web/source/locale/en.ts +++ b/client-web/source/locale/en.ts @@ -60,7 +60,7 @@ export const PO_EN_US: LanguageStrings = { audio_stream: "audio stream", local: "Local", disable: "Disable", - enable: "Enable", + enable: thing => `Enable ${thing}`, status_await_stream: "Awaiting stream…", notification_perm_explain: "For keks-meet to send notifications, it needs you to grant permission: ", grant: "Grant", diff --git a/client-web/source/locale/mod.ts b/client-web/source/locale/mod.ts index 4a570ce..55aa79d 100644 --- a/client-web/source/locale/mod.ts +++ b/client-web/source/locale/mod.ts @@ -13,6 +13,7 @@ export function init_locale(lang: string) { export const LOCALES: { [key: string]: LanguageStrings } = { "en": PO_EN_US, "en-US": PO_EN_US, + "en-GB": PO_EN_US, // close enough "de": PO_DE_DE, "de-DE": PO_DE_DE, } @@ -71,7 +72,7 @@ export interface LanguageStrings { mute: string, video_stream: string, audio_stream: string, - enable: string, + enable: (thing: string) => string, disable: string, notification_perm_explain: string, grant: string, diff --git a/client-web/source/logger.ts b/client-web/source/logger.ts index 0141281..7f15064 100644 --- a/client-web/source/logger.ts +++ b/client-web/source/logger.ts @@ -49,7 +49,7 @@ export function log(k: LogScope | LogDesc, message: string, ...data: unknown[]) setTimeout(() => { e.remove() }, 1000 + 500) - }, (d.error || d.warn) ? 30000 : 3000) + }, d.error ? 30000 : d.warn ? 10000 : 3000) } } diff --git a/client-web/source/resource/track.ts b/client-web/source/resource/track.ts index 6d6c34f..46440ec 100644 --- a/client-web/source/resource/track.ts +++ b/client-web/source/resource/track.ts @@ -15,9 +15,7 @@ import { LocalResource, ResourceHandlerDecl } from "./mod.ts"; export const resource_track: ResourceHandlerDecl = { kind: "track", new_remote: (info, _user, enable) => { - let enable_label = PO.enable - if (info.label) enable_label += ` "${info.label}"` - + const enable_label = PO.enable(`"${info.label ?? info.kind}"`) const enable_button = e("button", { class: "center", onclick: self => { diff --git a/client-web/source/user/local.ts b/client-web/source/user/local.ts index 633ccaf..a90a6f2 100644 --- a/client-web/source/user/local.ts +++ b/client-web/source/user/local.ts @@ -52,7 +52,7 @@ export class LocalUser extends User { log("media", "awaiting local resource") let t!: LocalResource; try { t = await tp } - catch (e) { log("media", `failed ${e.toString()}`) } + catch (e) { log({ scope: "media", warn: true }, e.toString()) } if (!t) return log("media", "ok") this.add_resource(t) |