mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-15 09:04:10 +00:00
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:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user