Dawnline 0.11.0
Build packages / CI (push) Blocked by required conditions
Build packages / Version (push) Waiting to run
CI / Web (format, types, tests, bundles) (push) Blocked by required conditions
CI / ShellCheck (push) Blocked by required conditions
CI / ucode static checks (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 24.10) (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 25.12) (push) Blocked by required conditions
Build packages / CI (push) Blocked by required conditions
Build packages / Version (push) Waiting to run
CI / Web (format, types, tests, bundles) (push) Blocked by required conditions
CI / ShellCheck (push) Blocked by required conditions
CI / ucode static checks (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 24.10) (push) Blocked by required conditions
CI / ucode compiles and tests pass (OpenWrt 25.12) (push) Blocked by required conditions
- Russian translation. The admin pages, the LuCI menu and the router's messages (errors, Health checks, update steps, the service log) come in Russian with the new luci-i18n-dawnline-ru package, released beside the app. LuCI shows it when its language is Russian, or "auto" with a Russian browser - The translation installs with install.sh when LuCI is in Russian (or with --lang ru), follows every Dawnline update and rollback, and can be added or removed in Components → Dawnline → Translation - The portal speaks the visitor's language: it opens in the system's language and switches between English and Russian in place, from the language pill beside its QR code. It carries its own translation and needs no package - Set-up steps quote the apps' own menus word for word, in Russian too: AmneziaVPN is "+ → Insert → Continue" (it has no "Add server"), and the Mac and Windows menus of WireGuard and AmneziaWG have their real names - Questions in the portal (Reconnect, Remove) read from the left edge and close with Cancel, without × - Numbers, sizes and dates follow the page's language. A server that can't start says why in one sentence; event details and service log lines read as whole sentences - README in Russian (README_ru.md). rules/i18n.md: how strings are written and translated; CI checks the catalogs (npm run i18n:check)
This commit is contained in:
1 parent
caed976e63
commit
2f2aaf6c34
173 files changed
+25645
-2823
No files matched your search
@@ -1,11 +1,14 @@
|
||||
// The page's frame: no navbar. The page fades out under the screen's top and
|
||||
// bottom edges (the top fade only once it scrolls, so the breadcrumb at rest
|
||||
// stays crisp), and opens with a breadcrumb: the Dawnline mark, the place (the
|
||||
// server's name) and the person. The content goes in `body`.
|
||||
// server's name) and the person, then the language and this page's code. The
|
||||
// content goes in `body`.
|
||||
|
||||
import { h, ic, markup } from '../dom';
|
||||
import { placeName, state } from '../state';
|
||||
import { showPageCode } from '../flows/page-code';
|
||||
import { openMenu } from '../ui/menu';
|
||||
import { LANGS, lang, setLang } from '../i18n';
|
||||
|
||||
// The sun rises from behind the horizon once, on the visit's first paint.
|
||||
const LOGO =
|
||||
@@ -37,10 +40,28 @@ export function single(on: boolean) {
|
||||
pageEl?.classList.toggle('single', on);
|
||||
}
|
||||
|
||||
/** The language: its code and a chevron; the menu lists the languages by their own names. */
|
||||
function langPicker(): HTMLElement {
|
||||
const b = h(
|
||||
'button',
|
||||
{ type: 'button', class: 'cr-lang', 'aria-label': _('Language'), 'aria-haspopup': 'menu', 'aria-expanded': 'false' },
|
||||
h('span', {}, lang().toUpperCase()),
|
||||
ic('chevron', 'i cr-down'),
|
||||
);
|
||||
b.addEventListener('click', () =>
|
||||
openMenu(
|
||||
b,
|
||||
LANGS.map((l) => ({ label: l.name, checked: l.code === lang(), run: () => l.code !== lang() && setLang(l.code) })),
|
||||
),
|
||||
);
|
||||
return b;
|
||||
}
|
||||
|
||||
/**
|
||||
* The breadcrumb: the place, then the person (none when the link stopped
|
||||
* working); at its end, this page's code for another device, on the page
|
||||
* itself only (not over a card: paused, link gone, nothing loaded).
|
||||
* working); at its end, the language and this page's code for another
|
||||
* device, on the page itself only (not over a card: paused, link gone,
|
||||
* nothing loaded).
|
||||
*/
|
||||
export function crumbs(gone = false, card = false) {
|
||||
if (!crumbsEl) return;
|
||||
@@ -50,12 +71,13 @@ export function crumbs(gone = false, card = false) {
|
||||
h('span', { class: 'cr-mark' }, markup(LOGO)),
|
||||
h(
|
||||
'nav',
|
||||
{ class: 'cr-path', 'aria-label': 'Breadcrumb' },
|
||||
{ class: 'cr-path', 'aria-label': _('Breadcrumb') },
|
||||
place,
|
||||
p ? [ic('chevron'), h('span', { class: 'cur', 'aria-current': 'page' }, p.name)] : null,
|
||||
),
|
||||
...(card ? [] : [langPicker()]),
|
||||
...(p && !card
|
||||
? [h('button', { type: 'button', class: 'knob cr-qr', 'aria-label': 'Open on another device', onclick: showPageCode }, ic('qr'))]
|
||||
? [h('button', { type: 'button', class: 'knob cr-qr', 'aria-label': _('Open on another device'), onclick: showPageCode }, ic('qr'))]
|
||||
: []),
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user