1
0
forked from 0ad/0ad

Remove internationalization of log messages

As log messages aren't supposed to be translatable, this removes the
internationalization of all log messages, which had it enabled.

Patch by: @Dunedan
Accepted by: @Itms
Differential Revision: https://code.wildfiregames.com/D5314
This was SVN commit r28179.
This commit is contained in:
Dunedan 2024-08-05 15:27:12 +00:00
parent 0831f5d3ce
commit 56f6d76b78
7 changed files with 17 additions and 20 deletions

View File

@ -243,7 +243,7 @@ function init(initData)
run.setCurrent();
g_CampaignMenu = new CampaignMenu(run);
} catch (err) {
error(sprintf(translate("Error loading campaign run %s: %s."), CampaignRun.getCurrentRunFilename(), err));
error(sprintf("Error loading campaign run %s: %s.", CampaignRun.getCurrentRunFilename(), err));
Engine.SwitchGuiPage("page_pregame.xml", {});
}
}

View File

@ -190,7 +190,7 @@ function pollAndHandleNetworkClient()
if (!message)
break;
log(sprintf(translate("Net message: %(message)s"), { "message": uneval(message) }));
log(sprintf("Net message: %(message)s", { "message": uneval(message) }));
// If we're rejoining an active game, we don't want to actually display
// the game setup screen, so perform similar processing to gamesetup.js
// in this screen

View File

@ -70,7 +70,7 @@ var g_MainMenuItems = [
}
catch(err)
{
error(translate("Error opening campaign run:"));
error("Error opening campaign run:");
error(err.toString());
}
},
@ -127,7 +127,7 @@ var g_MainMenuItems = [
}
catch(err)
{
error(translate("Error opening campaign run:"));
error("Error opening campaign run:");
error(err.toString());
}
},

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2023 Wildfire Games.
/* Copyright (C) 2024 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -658,39 +658,39 @@ InReaction CCameraController::HandleEvent(const SDL_Event_* ev)
else if (hotkey == "camera.scroll.speed.increase")
{
m_ViewScrollSpeed *= m_ViewScrollSpeedModifier;
LOGMESSAGERENDER(g_L10n.Translate("Scroll speed increased to %.1f"), m_ViewScrollSpeed);
LOGMESSAGERENDER("Scroll speed increased to %.1f", m_ViewScrollSpeed);
return IN_HANDLED;
}
else if (hotkey == "camera.scroll.speed.decrease")
{
m_ViewScrollSpeed /= m_ViewScrollSpeedModifier;
LOGMESSAGERENDER(g_L10n.Translate("Scroll speed decreased to %.1f"), m_ViewScrollSpeed);
LOGMESSAGERENDER("Scroll speed decreased to %.1f", m_ViewScrollSpeed);
return IN_HANDLED;
}
else if (hotkey == "camera.rotate.speed.increase")
{
m_ViewRotateXSpeed *= m_ViewRotateSpeedModifier;
m_ViewRotateYSpeed *= m_ViewRotateSpeedModifier;
LOGMESSAGERENDER(g_L10n.Translate("Rotate speed increased to X=%.3f, Y=%.3f"), m_ViewRotateXSpeed, m_ViewRotateYSpeed);
LOGMESSAGERENDER("Rotate speed increased to X=%.3f, Y=%.3f", m_ViewRotateXSpeed, m_ViewRotateYSpeed);
return IN_HANDLED;
}
else if (hotkey == "camera.rotate.speed.decrease")
{
m_ViewRotateXSpeed /= m_ViewRotateSpeedModifier;
m_ViewRotateYSpeed /= m_ViewRotateSpeedModifier;
LOGMESSAGERENDER(g_L10n.Translate("Rotate speed decreased to X=%.3f, Y=%.3f"), m_ViewRotateXSpeed, m_ViewRotateYSpeed);
LOGMESSAGERENDER("Rotate speed decreased to X=%.3f, Y=%.3f", m_ViewRotateXSpeed, m_ViewRotateYSpeed);
return IN_HANDLED;
}
else if (hotkey == "camera.zoom.speed.increase")
{
m_ViewZoomSpeed *= m_ViewZoomSpeedModifier;
LOGMESSAGERENDER(g_L10n.Translate("Zoom speed increased to %.1f"), m_ViewZoomSpeed);
LOGMESSAGERENDER("Zoom speed increased to %.1f", m_ViewZoomSpeed);
return IN_HANDLED;
}
else if (hotkey == "camera.zoom.speed.decrease")
{
m_ViewZoomSpeed /= m_ViewZoomSpeedModifier;
LOGMESSAGERENDER(g_L10n.Translate("Zoom speed decreased to %.1f"), m_ViewZoomSpeed);
LOGMESSAGERENDER("Zoom speed decreased to %.1f", m_ViewZoomSpeed);
return IN_HANDLED;
}
return IN_PASS;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2022 Wildfire Games.
/* Copyright (C) 2024 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -89,9 +89,6 @@ bool LoadModJSON(const PIVFS& vfs, OsPath modsPath, OsPath mod, std::string& tex
else
{
// Print a warning - we'll keep trying, which could have adverse effects.
if (L10n::IsInitialised())
LOGWARNING(g_L10n.Translate("Could not write external mod.json for zipped mod '%s'. The mod should be reinstalled."), mod.string8());
else
LOGWARNING("Could not write external mod.json for zipped mod '%s'. The mod should be reinstalled.", mod.string8());
}
return true;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2021 Wildfire Games.
/* Copyright (C) 2024 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -139,7 +139,7 @@ Status SavedGames::Save(const CStrW& name, const CStrW& description, CSimulation
OsPath realPath;
WARN_RETURN_STATUS_IF_ERR(g_VFS->GetRealPath(filename, realPath));
LOGMESSAGERENDER(g_L10n.Translate("Saved game to '%s'"), realPath.string8());
LOGMESSAGERENDER("Saved game to '%s'", realPath.string8());
debug_printf("Saved game to '%s'\n", realPath.string8().c_str());
return INFO::OK;

View File

@ -684,7 +684,7 @@ void CRenderer::RenderScreenShot(const bool needsPresent)
OsPath realPath;
g_VFS->GetRealPath(filename, realPath);
LOGMESSAGERENDER(g_L10n.Translate("Screenshot written to '%s'"), realPath.string8());
LOGMESSAGERENDER("Screenshot written to '%s'", realPath.string8());
debug_printf(
CStr(g_L10n.Translate("Screenshot written to '%s'") + "\n").c_str(),
@ -810,7 +810,7 @@ void CRenderer::RenderBigScreenShot(const bool needsPresent)
OsPath realPath;
g_VFS->GetRealPath(filename, realPath);
LOGMESSAGERENDER(g_L10n.Translate("Screenshot written to '%s'"), realPath.string8());
LOGMESSAGERENDER("Screenshot written to '%s'", realPath.string8());
debug_printf(
CStr(g_L10n.Translate("Screenshot written to '%s'") + "\n").c_str(),