mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
refactor Translate()
it returns true but no consumers use it. its return type is void, then
This commit is contained in:
committed by
majcosta
parent
738225d2a2
commit
3d3e1bbfc6
@@ -19,7 +19,7 @@
|
||||
|
||||
namespace
|
||||
{
|
||||
bool Translate(vfs::String::char_t* str, int len, i18n::Lang lang);
|
||||
void Translate(vfs::String::char_t* str, int len, i18n::Lang lang);
|
||||
|
||||
void ExportMercBio();
|
||||
void ExportAIMHistory();
|
||||
@@ -472,31 +472,30 @@ wchar_t ToRussian(wchar_t siChar)
|
||||
return siChar;
|
||||
}
|
||||
|
||||
bool Translate(vfs::String::char_t* str, int len, i18n::Lang lang)
|
||||
void Translate(vfs::String::char_t* str, int len, i18n::Lang lang)
|
||||
{
|
||||
switch (lang) {
|
||||
case i18n::Lang::en:
|
||||
case i18n::Lang::de:
|
||||
return true;
|
||||
break; // nothing to do
|
||||
case i18n::Lang::ru:
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
str[i] = ToRussian(str[i]);
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
case i18n::Lang::pl:
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
str[i] = ToPolish(str[i]);
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
case i18n::Lang::nl:
|
||||
case i18n::Lang::fr:
|
||||
case i18n::Lang::it:
|
||||
case i18n::Lang::zh:
|
||||
return false;
|
||||
break; // no table for these yet
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void ExportMercBio()
|
||||
|
||||
Reference in New Issue
Block a user