fix: store trimmed only in cache

This commit is contained in:
TrèsAbhi committed 2026-01-14 11:48:55 -06:00
1 parent 4a6f5845f9
commit 3b4e089756
4 files changed
+20 -29

No files matched your search

+2 -16
View File
@@ -12,29 +12,15 @@ export class ClientAPI extends AbstractAPI {
throw new Error("Cannot fetch full game strings on client");
}
protected async _groupedGameStrings(
locale: string,
group: string,
prefix: boolean
) {
protected async _groupedGameStrings(locale: string, group: string) {
const response = await fetch(`/api/game-strings/${locale}/${group}.json`);
const json = (await response.json()) as Record<string, string>;
if (!prefix) return json;
const strings: Record<string, string> = {};
for (const key in json) {
strings[`${group}__${key}`] = json[key];
}
return strings;
return json;
}
protected async _strings(locale: string) {
const response = await fetch(`/api/strings/${locale}.json`);
const json = (await response.json()) as Strings;
return json;
}
}