Dawnline 0.11.0
CI / ucode compiles and tests pass (OpenWrt 25.12) (push) Canceled after 0s
CI / ucode compiles and tests pass (OpenWrt 24.10) (push) Canceled after 0s
CI / ucode static checks (push) Canceled after 0s
CI / ShellCheck (push) Canceled after 0s
CI / Web (format, types, tests, bundles) (push) Canceled after 0s
Build packages / CI (push) Canceled after 0s
Build packages / Version (push) Canceled after 0s
Build packages / Build apk (push) Canceled after 0s
Build packages / Build ipk (push) Canceled after 0s
Build packages / Release (push) Canceled after 0s
CI / ucode compiles and tests pass (OpenWrt 25.12) (push) Canceled after 0s
CI / ucode compiles and tests pass (OpenWrt 24.10) (push) Canceled after 0s
CI / ucode static checks (push) Canceled after 0s
CI / ShellCheck (push) Canceled after 0s
CI / Web (format, types, tests, bundles) (push) Canceled after 0s
Build packages / CI (push) Canceled after 0s
Build packages / Version (push) Canceled after 0s
Build packages / Build apk (push) Canceled after 0s
Build packages / Build ipk (push) Canceled after 0s
Build packages / Release (push) Canceled after 0s
- 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
@@ -5,38 +5,49 @@ import type { UpdateComponent } from '../../api';
|
||||
import { button } from '../../ui/button';
|
||||
import { confirmDialog } from '../../ui/modal';
|
||||
import { E } from '../../e';
|
||||
import { fmt } from '../../../shared/i18n';
|
||||
import type { ComponentsPage, MenuEntry } from './index';
|
||||
|
||||
const SYS_ITEMS: { title: string; sub: string; pkgs: string[]; feature: 'home' | 'https' | 'acme'; optional?: boolean }[] = [
|
||||
{ title: 'Home-like link', sub: 'Policy routing and the veth pair', pkgs: ['ip-full', 'kmod-veth'], feature: 'home' },
|
||||
{ title: 'HTTPS for the portal', sub: 'OpenSSL for uhttpd', pkgs: ['libustream-openssl', 'openssl-util'], feature: 'https' },
|
||||
{
|
||||
title: 'Certificates (ACME)',
|
||||
sub: 'Let’s Encrypt certificate for the portal',
|
||||
pkgs: ['acme', 'acme-acmesh-dnsapi'],
|
||||
feature: 'acme',
|
||||
optional: true,
|
||||
},
|
||||
];
|
||||
interface SysItem {
|
||||
title: string;
|
||||
sub: string;
|
||||
pkgs: string[];
|
||||
feature: 'home' | 'https' | 'acme';
|
||||
optional?: boolean;
|
||||
}
|
||||
|
||||
function sysItems(): SysItem[] {
|
||||
return [
|
||||
{ title: _('Home-like link'), sub: _('Policy routing and the veth pair'), pkgs: ['ip-full', 'kmod-veth'], feature: 'home' },
|
||||
{ title: _('HTTPS for the portal'), sub: _('OpenSSL for uhttpd'), pkgs: ['libustream-openssl', 'openssl-util'], feature: 'https' },
|
||||
{
|
||||
title: _('Certificates (ACME)'),
|
||||
sub: _('Let’s Encrypt certificate for the portal'),
|
||||
pkgs: ['acme', 'acme-acmesh-dnsapi'],
|
||||
feature: 'acme',
|
||||
optional: true,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
const ICONS: Record<string, string> = { home: 'network', https: 'lock', acme: 'file' };
|
||||
|
||||
export function packageRows(page: ComponentsPage, p: UpdateComponent | undefined): { rows: Node[]; updates: number; total: number } {
|
||||
const st = page.st;
|
||||
const pkgs = p?.pkgs ?? {};
|
||||
const items = SYS_ITEMS.filter((it) => (it.feature === 'home' ? st.home : st.portal));
|
||||
const items = sysItems().filter((it) => (it.feature === 'home' ? st.home : st.portal));
|
||||
const runPkgs = async (names: string[], what: string, shown = names) => {
|
||||
const ok = await confirmDialog(
|
||||
`Update ${what}?`,
|
||||
`${shown.join(', ')} from the OpenWrt feeds. Services that use them restart for a moment.`,
|
||||
'Update',
|
||||
fmt(_('Update %s?'), what),
|
||||
fmt(_('%s from the OpenWrt feeds. Services that use them restart for a moment.'), shown.join(', ')),
|
||||
_('Update'),
|
||||
);
|
||||
if (ok) void page.op(`pkgs:${names.join(',')}`, `Updating ${what}`);
|
||||
if (ok) void page.op(`pkgs:${names.join(',')}`, fmt(_('Updating %s'), what));
|
||||
};
|
||||
const menu: (MenuEntry | null)[] = [
|
||||
{ label: 'Check system packages', ic: 'refresh', run: () => page.op('check:packages', 'Checking system packages') },
|
||||
{ label: _('Check system packages'), ic: 'refresh', run: () => page.op('check:packages', _('Checking system packages')) },
|
||||
{
|
||||
label: 'Open the OpenWrt package list',
|
||||
label: _('Open the OpenWrt package list'),
|
||||
ic: 'globe',
|
||||
run: () => window.open('https://openwrt.org/packages/start', '_blank', 'noopener'),
|
||||
},
|
||||
@@ -52,11 +63,16 @@ export function packageRows(page: ComponentsPage, p: UpdateComponent | undefined
|
||||
return page.row(
|
||||
ICONS[it.feature],
|
||||
it.title,
|
||||
[`${it.optional ? 'not installed' : `missing ${lacks.join(', ')}`}`],
|
||||
[it.optional ? _('not installed') : fmt(_('missing %s'), lacks.join(', '))],
|
||||
[
|
||||
button('Install', () => page.op(`pkgs:${lacks.join(',')}`, `Installing ${it.title}`), it.optional ? 'neutral' : 'positive', {
|
||||
disabled: page.busy,
|
||||
}),
|
||||
button(
|
||||
_('Install'),
|
||||
() => page.op(`pkgs:${lacks.join(',')}`, fmt(_('Installing %s'), it.title)),
|
||||
it.optional ? 'neutral' : 'positive',
|
||||
{
|
||||
disabled: page.busy,
|
||||
},
|
||||
),
|
||||
E('span', { class: 'dl-comp-ic' }, page.more(menu)),
|
||||
],
|
||||
);
|
||||
@@ -68,7 +84,7 @@ export function packageRows(page: ComponentsPage, p: UpdateComponent | undefined
|
||||
main ? [`${pkgs[main]!.installed} → ${pkgs[main]!.latest}`, upd.length > 1 ? ` · +${upd.length - 1}` : ''] : [upd.join(', ')],
|
||||
[
|
||||
button(
|
||||
'Update',
|
||||
_('Update'),
|
||||
() =>
|
||||
runPkgs(
|
||||
present.filter((x) => pkgs[x]?.latest || pkgs[x]?.with?.length),
|
||||
|
||||
Reference in new issue
Block a user