feat(client): say where HD graphics is switched, translate the Custom Races patch card

The community launcher owns the Standard/HD choice (Settings -> "HD graphics"; its setup
also offers it), so the Manager cannot toggle it. The client setup dialog now points players
there. The Custom Races client patch status badges, hints and Install/Repair/Uninstall
buttons were English/Russian ternaries; they are now i18n keys in all six locales.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ДмитрийandClaude Sonnet 5.5 committed 2026-11-20 21:08:55 +05:00
1 parent 169d8b8977
commit f5205662a9
9 files changed
+82 -8

No files matched your search

+1
View File
@@ -85,6 +85,7 @@ export function ClientDialog(props: {
<span className="mt-1 block text-sm text-muted">{t("client.setup.haveHint")}</span>
</button>
</div>
<p className="mt-3 text-xs text-muted">{t("client.setup.hdHint")}</p>
<div className="mt-5 flex justify-end">
<Button variant="ghost" onClick={close}>{t("btn.close")}</Button>
</div>
+8 -8
View File
@@ -282,29 +282,29 @@ export function ModulesPage({ serverId, onChanged, onRegisterGuard }: { serverId
{racesPatchStatus?.state === "enabled" && (
<span className="inline-flex items-center gap-1.5 rounded-full bg-ok/10 px-2.5 py-1 text-xs text-ok border border-ok/30">
<span className="h-1.5 w-1.5 rounded-full bg-ok" />
{locale === "ru" ? "Патч клиента: Включен" : "Client Patch: Active"}
{t("races.patch.active")}
</span>
)}
{racesPatchStatus?.state === "disabled" && (
<span className="inline-flex items-center gap-1.5 rounded-full bg-white/5 px-2.5 py-1 text-xs text-muted border border-white/15" title="MPQ files disabled with .disabled suffix">
<span className="h-1.5 w-1.5 rounded-full bg-muted" />
{locale === "ru" ? "Патч клиента: Отключен (.disabled)" : "Client Patch: Disabled (.disabled)"}
{t("races.patch.disabled")}
</span>
)}
{racesPatchStatus?.state === "not-installed" && (
<span className="inline-flex items-center gap-1.5 rounded-full bg-warn/10 px-2.5 py-1 text-xs text-warn border border-warn/30">
<span className="h-1.5 w-1.5 rounded-full bg-warn" />
{locale === "ru" ? "Патч клиента: Не установлен" : "Client Patch: Not Installed"}
{t("races.patch.notInstalled")}
</span>
)}
{racesPatchStatus?.state === "partially-installed" && (
<span className="inline-flex items-center gap-1.5 rounded-full bg-warn/10 px-2.5 py-1 text-xs text-warn border border-warn/30">
<span className="h-1.5 w-1.5 rounded-full bg-warn" />
{locale === "ru" ? `Патч клиента: ${racesPatchStatus.installedMpqs}/${racesPatchStatus.totalMpqs} MPQ` : `Client Patch: ${racesPatchStatus.installedMpqs}/${racesPatchStatus.totalMpqs} MPQ`}
{t("races.patch.partial", { a: racesPatchStatus.installedMpqs, b: racesPatchStatus.totalMpqs })}
</span>
)}
</div>
{racesPatchStatus?.state === "partially-installed" && <p className="text-xs text-warn">{locale === "ru" ? "Файлы отсутствуют или изменены. Восстановите патч клиента." : "Files are missing or changed. Repair the client patch."}</p>}
{racesPatchStatus?.state === "partially-installed" && <p className="text-xs text-warn">{t("races.patch.partialHint")}</p>}
{(
<Button
size="sm"
@@ -314,11 +314,11 @@ export function ModulesPage({ serverId, onChanged, onRegisterGuard }: { serverId
onClick={() => void installClientPatch()}
>
{racesInstalling && <Loader2 className="mr-1.5 h-3.5 w-3.5 animate-spin" />}
{racesPatchStatus?.state === "not-installed" ? (locale === "ru" ? "Установить патч клиента" : "Install Client Patch") : (locale === "ru" ? "Восстановить патч клиента" : "Repair Client Patch")}
{racesPatchStatus?.state === "not-installed" ? t("races.patch.install") : t("races.patch.repair")}
</Button>
)}
{racesPatchStatus && racesPatchStatus.state !== "not-installed" && <Button size="sm" variant="ghost" disabled={toggling !== null || racesInstalling} onClick={() => void uninstallClientPatch()}>{locale === "ru" ? "Удалить патч клиента" : "Uninstall Client Patch"}</Button>}
<p className="text-xs text-muted">{locale === "ru" ? (m.enabled ? "После установки патч будет включён." : "После установки патч останется отключённым: модуль сервера выключен или отсутствует.") : (m.enabled ? "The patch will be enabled after installation." : "The patch will stay disabled after installation: the server module is off or missing.")}</p>
{racesPatchStatus && racesPatchStatus.state !== "not-installed" && <Button size="sm" variant="ghost" disabled={toggling !== null || racesInstalling} onClick={() => void uninstallClientPatch()}>{t("races.patch.uninstall")}</Button>}
<p className="text-xs text-muted">{t(m.enabled ? "races.patch.willEnable" : "races.patch.willStayOff")}</p>
</div>
)}
</div>