Translate some message boxes when opening websites.

Fix a typo. Refs #2501.

This was SVN commit r15062.
This commit is contained in:
leper 2014-04-28 22:30:40 +00:00
parent 683170ea19
commit c77826e9aa
4 changed files with 14 additions and 22 deletions

View File

@ -68,6 +68,13 @@ function messageBox (mbWidth, mbHeight, mbMessage, mbTitle, mbMode, mbButtonCapt
// ====================================================================
function openURL(url)
{
Engine.OpenURL(url);
messageBox(600, 200, sprintf(translate("Opening %(url)s\n in default web browser. Please wait..."), { url: url }), translate("Opening page"), 2);
}
function updateFPS()
{
Engine.GetGUIObjectByName("fpsCounter").caption = sprintf(translate("FPS: %(fps)s"), { fps: Engine.GetFPS() });

View File

@ -19,9 +19,7 @@
<object type="button" style="StoneButton" size="100%-308 100%-52 100%-168 100%-24">
<translatableAttribute id="caption">Online Manual</translatableAttribute>
<action on="Press"><![CDATA[
var url = "http://trac.wildfiregames.com/wiki/0adManual";
Engine.OpenURL(url);
messageBox(450, 200, "Opening "+url+"\n in default web browser. Please wait...", "Opening page", 2);
openURL("http://trac.wildfiregames.com/wiki/0adManual");
]]></action>
</object>
<object type="button" style="StoneButton" tooltip_style="snToolTip" size="100%-164 100%-52 100%-24 100%-24">

View File

@ -2,6 +2,7 @@
<objects>
<script file="gui/common/music.js"/>
<script file="gui/common/functions_global_object.js"/>
<script file="gui/common/functions_utility_error.js"/>
<script file="gui/pregame/mainmenu.js"/>
@ -511,9 +512,7 @@
<translatableAttribute id="caption">Website</translatableAttribute>
<translatableAttribute id="tooltip">Click to open play0ad.com in your web browser.</translatableAttribute>
<action on="Press"><![CDATA[
var url = "http://play0ad.com/";
Engine.OpenURL(url);
messageBox(450, 200, "Opening "+url+"\n in default web browser. Please wait...", "Opening page", 2);
openURL("http://play0ad.com/");
]]></action>
</object>
@ -525,9 +524,7 @@
<translatableAttribute id="caption">Chat</translatableAttribute>
<translatableAttribute id="tooltip">Click to open the 0 A.D. IRC chat in your browser. (#0ad on webchat.quakenet.org)</translatableAttribute>
<action on="Press"><![CDATA[
var url = "http://webchat.quakenet.org/?channels=0ad";
Engine.OpenURL(url);
messageBox(450, 200, "Opening "+url+"\n in default web browser. Please wait...", "Opening page", 2);
openURL("http://webchat.quakenet.org/?channels=0ad");
]]></action>
</object>
<object type="button"
@ -536,11 +533,9 @@
size="8 100%-108 100%-8 100% -80"
>
<translatableAttribute id="caption">Help with the translation!</translatableAttribute>
<translatableAttribute id="tooltip">Click to open the 0 A.D translate page in your brownser.</translatableAttribute>
<translatableAttribute id="tooltip">Click to open the 0 A.D translate page in your browser.</translatableAttribute>
<action on="Press"><![CDATA[
var url = "http://trac.wildfiregames.com/wiki/Localization";
Engine.OpenURL(url);
messageBox(450, 200, "Opening "+url+"\n in default web browser. Please wait...", "Opening page", 2);
openURL("http://trac.wildfiregames.com/wiki/Localization");
]]></action>
</object>
@ -552,9 +547,7 @@
<translatableAttribute id="caption">Report a Bug</translatableAttribute>
<translatableAttribute id="tooltip">Click to visit 0 A.D. Trac to report a bug, crash, or error.</translatableAttribute>
<action on="Press"><![CDATA[
var url = "http://trac.wildfiregames.com/wiki/ReportingErrors/";
Engine.OpenURL(url);
messageBox(450, 200, "Opening "+url+"\n in default web browser. Please wait...", "Opening page", 2);
openURL("http://trac.wildfiregames.com/wiki/ReportingErrors/");
]]></action>
</object>

View File

@ -3,9 +3,3 @@ function init(data)
Engine.GetGUIObjectByName("mainText").caption = Engine.TranslateLines(Engine.ReadFile("gui/splashscreen/" + data.page + ".txt"));
Engine.GetGUIObjectByName("displaySplashScreen").checked = (Engine.ConfigDB_GetValue("user", "splashscreenversion") < Engine.GetFileMTime("gui/splashscreen/splashscreen.txt"));
}
function openURL(url)
{
Engine.OpenURL(url);
messageBox(600, 200, sprintf(translate("Opening %(url)s\n in default web browser. Please wait..."), { url: url }), translate("Opening page"), 2);
}