Add full shell, replaceable Omics adapter and bilingual interaction

Implement approved specification #32 and tickets #33-#37. Keep host authentication server-verified and pin session interaction language. Compile scoped base selectors for browser compatibility and retain full gutters during CSS pruning.
This commit is contained in:
Codex
2026-09-13 14:26:39 +02:00
parent 2d1b714ebe
commit d8a29bfbdd
207 changed files with 8570 additions and 2164 deletions
@@ -0,0 +1,28 @@
import type { TranslationParams } from "../../i18n";
/** Keep IDs and parameters in state so open results follow later locale changes. */
export type AdminMessage = string | {
message: string;
params?: Readonly<Record<string, string | number | { message: string }>>;
};
export function adminMessage(message: string, params?: Exclude<AdminMessage, string>["params"]): AdminMessage {
return { message, params };
}
/** Local API diagnostics retain their code; translate only the known message body. */
export function renderAdminDiagnostic(t: (message: string) => string, diagnostic: string): string {
const match = /^([a-z][a-z_]+): (.+)$/.exec(diagnostic);
return match ? `${match[1]}: ${t(match[2])}` : t(diagnostic);
}
export function renderAdminMessage(
t: (message: string, params?: TranslationParams) => string,
value: AdminMessage,
): string {
if (typeof value === "string") return t(value);
const params = value.params && Object.fromEntries(Object.entries(value.params).map(([key, param]) =>
[key, typeof param === "object" ? t(param.message) : param],
));
return t(value.message, params);
}