You've already forked obsidian-visualiser
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:
9
shared/i18n.ts
Normal file
9
shared/i18n.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user