feat: per-import translation toggle and language picker in studio
Furni imports can now choose whether to translate (per import) and which languages to build, instead of always rebuilding all 13 FurnitureData_<lang> files. The studio header also has a global switch that persists the furnidata_translate_enabled setting, seeding the per-import default.
This commit is contained in:
1 parent
d6af754211
commit
6dced0fb54
5 files changed
+223
-10
No files matched your search
@@ -4,6 +4,7 @@ import { buildFurniImportSource } from "@/lib/habbo-gamedata-hotel";
|
||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||
import { getTreeFlat } from "@/lib/services/catalog-tree";
|
||||
import { getHabboGamedataHotel } from "@/lib/services/habbo-gamedata-hotel";
|
||||
import { siteSettings } from "@/lib/services/site-settings";
|
||||
|
||||
export default async function StudioFurniPage(_props: {
|
||||
params: Promise<{ locale: string }>;
|
||||
@@ -13,15 +14,17 @@ export default async function StudioFurniPage(_props: {
|
||||
redirect("/admin");
|
||||
}
|
||||
|
||||
const [hotel, catalogTree] = await Promise.all([
|
||||
const [hotel, catalogTree, translateEnabled] = await Promise.all([
|
||||
getHabboGamedataHotel(),
|
||||
getTreeFlat(),
|
||||
siteSettings.getBool("furnidata_translate_enabled", true),
|
||||
]);
|
||||
|
||||
return (
|
||||
<StudioClient
|
||||
source={buildFurniImportSource(hotel)}
|
||||
initialTree={catalogTree}
|
||||
defaultTranslate={translateEnabled}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user