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
@@ -2,6 +2,7 @@ import { defineConfig } from 'tsup';
|
||||
import { build, transform, type Plugin } from 'esbuild';
|
||||
import fs from 'node:fs';
|
||||
import path from 'node:path';
|
||||
import { catalogOf, parsePo } from './i18n/po.ts';
|
||||
|
||||
const PKG = '../package/luci-app-dawnline';
|
||||
const ADMIN_OUT = `${PKG}/htdocs/luci-static/resources/dawnline`;
|
||||
@@ -48,6 +49,17 @@ async function portalCss(): Promise<string> {
|
||||
return r.outputFiles[0].text.trim();
|
||||
}
|
||||
|
||||
/** The portal's translations: a .po it imports becomes its lookup table (i18n/po.ts). */
|
||||
export const poCatalog: Plugin = {
|
||||
name: 'po-catalog',
|
||||
setup(build) {
|
||||
build.onLoad({ filter: /\.po$/ }, (args) => ({
|
||||
contents: JSON.stringify(catalogOf(parsePo(fs.readFileSync(args.path, 'utf8')))),
|
||||
loader: 'json',
|
||||
}));
|
||||
},
|
||||
};
|
||||
|
||||
// The admin styles are plain .css files under src/admin/styles, imported as
|
||||
// text and joined in styles/index.ts (rendered inside each view): each is
|
||||
// minified here. They get a namespace (and a path not ending in .css) of
|
||||
@@ -107,6 +119,7 @@ export default defineConfig([
|
||||
sourcemap: false,
|
||||
minify: true,
|
||||
noExternal: ['qrcode-generator'],
|
||||
esbuildPlugins: [poCatalog],
|
||||
esbuildOptions(o) {
|
||||
o.legalComments = 'none';
|
||||
o.charset = 'utf8';
|
||||
|
||||
Reference in new issue
Block a user