diff options
Diffstat (limited to 'client-web/source/preferences/ui.ts')
-rw-r--r-- | client-web/source/preferences/ui.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/client-web/source/preferences/ui.ts b/client-web/source/preferences/ui.ts index 0f26c14..a737e01 100644 --- a/client-web/source/preferences/ui.ts +++ b/client-web/source/preferences/ui.ts @@ -6,7 +6,7 @@ /// <reference lib="dom" /> import { e } from "../helper.ts"; -import { PO } from "../locale/mod.ts"; +import { tr } from "../locale.ts"; import { PREF_DECLS } from "./decl.ts"; import { change_pref, on_pref_changed, PrefDecl, PREFS } from "./mod.ts"; @@ -87,24 +87,24 @@ export function ui_preferences(): HTMLElement { use_opt_ = use_opt; } - const label = e("label", { for: id }, PO.setting_descs[key] ?? `[${key}]`) + const label = e("label", { for: id }, tr(`config.${key}`)) return e("tr", { class: "pref" }, e("td", {}, label), e("td", {}, use_opt_ ?? ""), e("td", {}, prim_control ?? "")) }) const notification_perm = Notification.permission == "granted" ? e("div", {}) : e("div", {}, - e("span", {}, PO.notification_perm_explain), - e("button", { onclick: () => Notification.requestPermission() }, PO.grant), + e("span", {}, tr("config.notification.perm_explain")), + e("button", { onclick: () => Notification.requestPermission() }, tr("config.notification.grant")), ) const reset = e("div", {}, - e("span", {}, PO.clear_prefs), + e("span", {}, tr("config.clear_prefs")), e("button", { onclick: () => { if (confirm("really clear all preferences?")) { localStorage.clear(); globalThis.location.reload() } } }, "RESET"), ) const table = document.createElement("table") table.append(...rows) - return e("div", { class: "preferences", role: "dialog", aria_label: PO.settings }, - e("h2", {}, PO.settings), + return e("div", { class: "preferences", role: "dialog", aria_label: tr("config") }, + e("h2", {}, tr("config")), notification_perm, e("br", {}), table, e("br", {}), reset |