Add multi-hotel Habbo gamedata locale in CMS settings.
Local Build and Deploy / deploy (push) Failing after 33s
Local Build and Deploy / deploy (push) Failing after 33s
Furni name suggestions, import enrichment, and badge texts now follow habbo_gamedata_hotel instead of hardcoded habbo.it. Co-authored-by: Cursor <[email protected]>
This commit is contained in:
1 parent
7bc0845932
commit
d1baaf798a
15 files changed
+275
-65
No files matched your search
@@ -0,0 +1,30 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
habboExternalTextsUrl,
|
||||
habboFurnidataUrl,
|
||||
habboGamedataHotelShort,
|
||||
normalizeHabboGamedataHotel,
|
||||
} from "./habbo-gamedata-hotel";
|
||||
|
||||
describe("habbo-gamedata-hotel", () => {
|
||||
it("normalizes known hotels and falls back to it", () => {
|
||||
expect(normalizeHabboGamedataHotel("ES")).toBe("es");
|
||||
expect(normalizeHabboGamedataHotel("com.br")).toBe("com.br");
|
||||
expect(normalizeHabboGamedataHotel("nope")).toBe("it");
|
||||
expect(normalizeHabboGamedataHotel(null)).toBe("it");
|
||||
});
|
||||
|
||||
it("builds official gamedata URLs", () => {
|
||||
expect(habboFurnidataUrl("de")).toBe(
|
||||
"https://www.habbo.de/gamedata/furnidata_json/1",
|
||||
);
|
||||
expect(habboExternalTextsUrl("com.br")).toBe(
|
||||
"https://www.habbo.com.br/gamedata/external_flash_texts/1",
|
||||
);
|
||||
});
|
||||
|
||||
it("formats short hotel labels", () => {
|
||||
expect(habboGamedataHotelShort("it")).toBe("IT");
|
||||
expect(habboGamedataHotelShort("com.br")).toBe("COM.BR");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user