1
0
forked from 0ad/0ad

Renamed translate() to I18n::translate(), to minimise conflicts

This was SVN commit r2334.
This commit is contained in:
Ykkrosh 2005-05-22 22:58:27 +00:00
parent 641806cc22
commit 21149d9fd0
3 changed files with 5 additions and 5 deletions

View File

@ -209,7 +209,7 @@ bool __ParseString<CGUIString>(const CStr& Value, CGUIString &Output)
// Translate the Value and retrieve the localised string in // Translate the Value and retrieve the localised string in
// Unicode. // Unicode.
Output.SetValue(translate((CStrW)Value)); Output.SetValue(I18n::translate((CStrW)Value));
return true; return true;
} }
@ -227,7 +227,7 @@ bool __ParseString<CStrW>(const CStr& Value, CStrW &Output)
// Translate the Value and retrieve the localised string in // Translate the Value and retrieve the localised string in
// Unicode. // Unicode.
Output = translate((CStrW)Value); Output = I18n::translate((CStrW)Value);
return true; return true;
} }

View File

@ -1050,7 +1050,7 @@ static int ProgressiveLoad()
#ifndef NO_GUI #ifndef NO_GUI
// display progress / description in loading screen // display progress / description in loading screen
CStrW i18n_description = translate(description); CStrW i18n_description = I18n::translate(description);
JSString* js_desc = StringConvert::wstring_to_jsstring(g_ScriptingHost.getContext(), i18n_description); JSString* js_desc = StringConvert::wstring_to_jsstring(g_ScriptingHost.getContext(), i18n_description);
g_ScriptingHost.SetGlobal("g_Progress", INT_TO_JSVAL(progress_percent)); g_ScriptingHost.SetGlobal("g_Progress", INT_TO_JSVAL(progress_percent));
g_ScriptingHost.SetGlobal("g_LoadDescription", STRING_TO_JSVAL(js_desc)); g_ScriptingHost.SetGlobal("g_LoadDescription", STRING_TO_JSVAL(js_desc));

View File

@ -2,10 +2,10 @@
extern I18n::CLocale_interface* g_CurrentLocale; extern I18n::CLocale_interface* g_CurrentLocale;
#define translate(s) g_CurrentLocale->Translate(s)
namespace I18n namespace I18n
{ {
inline StringBuffer translate(const wchar_t* s) { return g_CurrentLocale->Translate(s); }
bool LoadLanguage(const char* name); bool LoadLanguage(const char* name);
const char* CurrentLanguageName(); const char* CurrentLanguageName();
void Shutdown(); void Shutdown();