Internationalized some messages

• You can now translate “The production queue is full”.
• Internationalized the “Pause” and “Resume” buttons. Only the initial
label was internationalized, it would switch to English as soon as you
pause the game for the first time.
• Internationalized the “Screenshot written to” message in the engine.

This was SVN commit r14968.
This commit is contained in:
Gallaecio
2014-04-22 06:35:51 +00:00
parent 5a8bc1158a
commit 9dd4e71f1d
3 changed files with 9 additions and 6 deletions
@@ -1,5 +1,5 @@
const PAUSE = "Pause";
const RESUME = "Resume";
const PAUSE = translate("Pause");
const RESUME = translate("Resume");
/*
* MENU POSITION CONSTANTS
@@ -342,7 +342,7 @@ ProductionQueue.prototype.AddBatch = function(templateName, type, count, metadat
}
else
{
var notification = {"player": cmpPlayer.GetPlayerID(), "message": "The production queue is full."};
var notification = {"player": cmpPlayer.GetPlayerID(), "message": markForTranslation("The production queue is full."), "translateMessage": true };
var cmpGUIInterface = Engine.QueryInterface(SYSTEM_ENTITY, IID_GuiInterface);
cmpGUIInterface.PushNotification(notification);
}
+6 -3
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2009 Wildfire Games.
/* Copyright (C) 2014 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -35,6 +35,9 @@
#include "lib/sysdep/smbios.h"
#include "lib/tex/tex.h"
#include "i18n/L10n.h"
#include "lib/utf8.h"
#include "ps/GameSetup/Config.h"
#include "ps/GameSetup/GameSetup.h"
#include "ps/Game.h"
@@ -238,7 +241,7 @@ void WriteScreenshot(const VfsPath& extension)
{
OsPath realPath;
g_VFS->GetRealPath(filename, realPath);
LOGMESSAGERENDER(L"Screenshot written to '%ls'", realPath.string().c_str());
LOGMESSAGERENDER(wstring_from_utf8(L10n::Instance().Translate("Screenshot written to '%ls'")).c_str(), realPath.string().c_str());
}
else
LOGERROR(L"Error writing screenshot to '%ls'", filename.string().c_str());
@@ -371,7 +374,7 @@ void WriteBigScreenshot(const VfsPath& extension, int tiles)
{
OsPath realPath;
g_VFS->GetRealPath(filename, realPath);
LOGMESSAGERENDER(L"Screenshot written to '%ls'", realPath.string().c_str());
LOGMESSAGERENDER(wstring_from_utf8(L10n::Instance().Translate("Screenshot written to '%ls'")).c_str(), realPath.string().c_str());
}
else
LOGERROR(L"Error writing screenshot to '%ls'", filename.string().c_str());