feat: add runtime i18n API with manifest translations

This commit is contained in:
gem
2026-06-12 10:19:14 +08:00
parent 79ee35db2f
commit 4ea3663853
8 changed files with 141 additions and 0 deletions

View File

@@ -217,6 +217,7 @@ void main() {
expect(store.markedPackages, [fallback.rootPath]);
});
});
}
Map<String, Object?> _context(GamePackage package) {
@@ -393,6 +394,12 @@ class _FakeScriptEngine implements ScriptEngine {
@override
GameDiff dispatchEvent(RuntimeEvent event) => GameDiff.empty;
@override
void setTranslations({
required String locale,
required Map<String, Map<String, String>> translations,
}) {}
}
const _validScript = '''