From ade116c98599c5ef201165fb1f0db26d251ad88f Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Tue, 29 Sep 2026 22:06:37 -0500 Subject: [PATCH] fix(dashboard): zone names in help text and pages come from the locale Settings help names zones by locale key (expanded when served), the Property Rent page and the Worlds table name zones in the viewer's language, and the UGC page drops its own inventory name table. Co-Authored-By: Claude Opus 5.5 --- dDashboardServer/routes/SettingsCatalog.cpp | 8 ++++---- dDashboardServer/static/js/ugc.js | 3 +-- dDashboardServer/templates/index.jinja2 | 5 +++-- dDashboardServer/templates/property_rent.jinja2 | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/dDashboardServer/routes/SettingsCatalog.cpp b/dDashboardServer/routes/SettingsCatalog.cpp index 69eb62911..44ac6e74b 100644 --- a/dDashboardServer/routes/SettingsCatalog.cpp +++ b/dDashboardServer/routes/SettingsCatalog.cpp @@ -130,7 +130,7 @@ namespace { c.AddSection("Startup"); c.Add(Bool(MASTER, "prestart_servers", "Start auth, chat and char servers", "Master starts the other servers itself.", true, true)); { - auto worlds = List(MASTER, "prestart_worlds", "Worlds started with master", "Started when master starts, before anyone asks for them. Empty: character select (0) and Venture Explorer (1000).", eListOf::ZONE, "0,1000"); + auto worlds = List(MASTER, "prestart_worlds", "Worlds started with master", "Started when master starts, before anyone asks for them. Empty: character select (0) and %[ZoneTable_1000_DisplayDescription] (1000).", eListOf::ZONE, "0,1000"); worlds.restart = true; c.Add(When(std::move(worlds), MASTER, "prestart_servers", { "1" })); } @@ -186,7 +186,7 @@ namespace { c.Add(Bool(WORLD, "disable_extra_backpack", "No extra backpack space", "DLU gives 2 extra slots per level up; this turns that off.", false)); c.Add(Bool(WORLD, "disable_vanity", "No vanity NPCs", "Hide DLU's extra NPCs and plaques.", false, true)); c.Add(Bool(WORLD, "solo_racing", "Solo racing", "Allow racing alone.", false)); - c.Add(Bool(WORLD, "classic_survival_scoring", "Classic survival scoring", "Rank Avant Gardens Survival by time, like live, instead of score.", false)); + c.Add(Bool(WORLD, "classic_survival_scoring", "Classic survival scoring", "Rank %[ZoneTable_1101_DisplayDescription] by time, like live, instead of score.", false)); c.Add(Bool(WORLD, "pets_take_imagination", "Pets use imagination", "Like live.", false)); c.Add(Bool(WORLD, "allow_nameplate_off", "Players can hide their nameplate", "Staff always can; this lets players (GM 0) turn off the name above their head too.", false)); c.Add(Bool(WORLD, "allow_players_to_skip_cinematics", "Players can skip cinematics", "Most cutscenes get a skip option.", false)); @@ -207,7 +207,7 @@ namespace { c.Add(When(List(WORLD, "hardcore_uscore_reduced_lots", "Reduced U-score enemies", "", eListOf::LOT), WORLD, "hardcore_mode", { "1" })); c.Add(When(List(WORLD, "hardcore_uscore_excluded_enemies", "Enemies without U-score", "", eListOf::LOT), WORLD, "hardcore_mode", { "1" })); - c.AddSection("Property rent", "Owners pay rent for their properties, like live: each property world's PropertyTemplate price and period, or what the Property Rent page sets. Block Yard is free."); + c.AddSection("Property rent", "Owners pay rent for their properties, like live: each property world's PropertyTemplate price and period, or what the Property Rent page sets. %[ZoneTable_1150_DisplayDescription] is free."); c.Add(Bool(WORLD, "property_rent_enabled", "Charge rent", "Rent is taken from the owner's coins when they log in. Unpaid rent makes the property private until it is paid.", false)); c.Add(When(Unit(Int(WORLD, "property_rent_grace_days", "Grace period", "How long rent can be unpaid before the property is made private.", "3", 0, 365), "days"), WORLD, "property_rent_enabled", { "1" })); @@ -248,7 +248,7 @@ namespace { c.AddSection("Logging in"); c.Add(Bool(AUTH, "dont_use_keys", "Don't require play keys", "Everyone with an account can log in, with or without a play key.", false)); c.Add(Bool(AUTH, "closed_to_non_devs", "Staff only", "Only accounts with a GM level can log in.", false)); - c.Add(List(AUTH, "rewardcodes", "Reward codes", "Given to every account at login. 4 opens LEGO Club; 30 stops bricks being used up in build mode. Codes with an item mail it once.", eListOf::REWARD_CODE, "4,30")); + c.Add(List(AUTH, "rewardcodes", "Reward codes", "Given to every account at login. 4 opens %[ZoneTable_1700_DisplayDescription]; 30 stops bricks being used up in build mode. Codes with an item mail it once.", eListOf::REWARD_CODE, "4,30")); c.Add(Bool(AUTH, "log_login_addresses", "Remember login addresses", "Keep the network address each account logs in to the game from, so staff see accounts that share one. " "Addresses are personal data: they're only shown as links between accounts, and deleted after log_login_address_days.", true)); c.Add(Bool(AUTH, "log_client_sysinfo", "Remember client system info", "Keep the system description the client sends when it logs in (Windows version, video card, " diff --git a/dDashboardServer/static/js/ugc.js b/dDashboardServer/static/js/ugc.js index d6f5af1c9..3aae92034 100644 --- a/dDashboardServer/static/js/ugc.js +++ b/dDashboardServer/static/js/ugc.js @@ -526,8 +526,7 @@ // ---- an assembly's references: the builds that use it, and where they are ---- var refs = null, refTimer = null; - var INVENTORIES = { 5: 'Models', 12: 'Vault models', 14: 'Brick-building models' }; - function inventoryName(type) { return (window.Labels && Labels.name('inventories', type)) || INVENTORIES[type] || 'Inventory ' + type; } + function inventoryName(type) { return (window.Labels && Labels.name('inventories', type)) || 'Inventory ' + type; } // Where a creation is: placed on a property (with the name the player gave it there, and its 3D view), in a mail or // in its creator's inventories (`item`: the creation, for its creator's name) function whereText(w, item) { diff --git a/dDashboardServer/templates/index.jinja2 b/dDashboardServer/templates/index.jinja2 index b5e5d1bfb..0161aee90 100644 --- a/dDashboardServer/templates/index.jinja2 +++ b/dDashboardServer/templates/index.jinja2 @@ -216,9 +216,10 @@ $(function () { if (row.state === 'draining') return ' ' + fmt.badge('Moving players', 'warning'); return ''; } + // Zone names in the viewer's language (the live status carries the server's) function withPending(data) { - return (data.worlds || []).concat((data.startingWorlds || []).map(function (w) { - return { zoneName: w.zoneName, mapID: w.mapID, instanceID: w.property ? '' : w.instanceID, cloneID: w.cloneID || 0, players: 0, state: w.state }; + return (data.worlds || []).map(function (w) { return Object.assign({}, w, { zoneName: GameText.zone(w.mapID) }); }).concat((data.startingWorlds || []).map(function (w) { + return { zoneName: GameText.zone(w.mapID), mapID: w.mapID, instanceID: w.property ? '' : w.instanceID, cloneID: w.cloneID || 0, players: 0, state: w.state }; })); } var worlds = $('#worldInstancesTable').DataTable({ diff --git a/dDashboardServer/templates/property_rent.jinja2 b/dDashboardServer/templates/property_rent.jinja2 index 5914d5fea..a56dbb6bd 100644 --- a/dDashboardServer/templates/property_rent.jinja2 +++ b/dDashboardServer/templates/property_rent.jinja2 @@ -8,7 +8,7 @@

Property Rent

What owners pay for each property world, like live. Rent is taken from the owner's coins when they log in; if they can't pay, their property is made private after the grace period and stays private until it is paid (nothing on it changes). - Each world starts with its PropertyTemplate rent (Block Yard is free); set a price here to change it, 0 to make it free.

+ Each world starts with its PropertyTemplate rent ({{ zone_name(1150) }} is free); set a price here to change it, 0 to make it free.

Rent is off: turn on property_rent_enabled in Settings to charge it.