Convert list texts to a separate i18n text, allowing translation and fixing action/passive/... removal. Character sheet now use the character compiler.

This commit is contained in:
Clément Pons
2025-08-25 17:35:15 +02:00
parent 247b14b2c8
commit 69ee62c08e
27 changed files with 2432 additions and 1003 deletions

9
shared/i18n.ts Normal file
View File

@@ -0,0 +1,9 @@
import type { CharacterConfig } from "~/types/character";
import characterConfig from '#shared/character-config.json';
const config = characterConfig as CharacterConfig;
export function getText(id?: string, lang?: string)
{
return id ? (config.texts.hasOwnProperty(id) ? config.texts[id][lang ?? "default"] : '') : undefined;
}