refactor(dashboard): routes name zones, objects and phrases through GameText

The routes' own zone name helpers and the CDClient's English zone and
leaderboard header copies give way to GameText, so every name comes from
the locale in the viewer's language; the Network page's world labels,
mail, missions, leaderboards, item info (cached per language) and the
settings/vanity help strings too. Reward code 4 and the plaque text name
their zone from the locale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-29 22:06:30 -05:00
parent 17b9479c0e
commit 1f8dd73e0b
29 changed files with 146 additions and 206 deletions

View File

@@ -1,4 +1,5 @@
#include "ModerationTools.h"
#include "GameText.h"
#include "ChatFilterWords.h"
#include <ctime>
@@ -73,7 +74,7 @@ namespace {
nlohmann::json ReportJson(const IModeration::PlayerReport& r, Names& names) {
const auto kind = magic_enum::enum_cast<ePlayerReportKind>(r.kind);
const auto status = static_cast<ePlayerReportStatus>(r.status);
const auto& zones = ZoneNames();
const auto& zones = GameText::ZoneNames();
const auto zone = std::to_string(r.zoneId);
std::string propertyName;
if (r.propertyId) {
@@ -387,7 +388,7 @@ namespace {
query.blockedOnly = allowed;
query.newestFirst = true;
query.limit = CHECK_MESSAGES;
const auto& zones = ZoneNames();
const auto& zones = GameText::ZoneNames();
nlohmann::json messages = nlohmann::json::array();
uint32_t searched = 0;
for (const auto& m : Database::Get()->GetChatMessages(query)) {