Merge pull request #4 from GenZmeY/default_lang

Default lang + more localization (BoxPainterLib)
This commit is contained in:
GenZmeY 2023-06-28 00:04:47 +03:00 committed by GitHub
commit ac4f2cf7e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 39 additions and 3 deletions

BIN
Localization/CHN/YAS.CHN Normal file

Binary file not shown.

BIN
Localization/CHT/YAS.CHT Normal file

Binary file not shown.

BIN
Localization/CZE/YAS.CZE Normal file

Binary file not shown.

BIN
Localization/DAN/YAS.DAN Normal file

Binary file not shown.

BIN
Localization/DEU/YAS.DEU Normal file

Binary file not shown.

BIN
Localization/ESN/YAS.ESN Normal file

Binary file not shown.

BIN
Localization/FRA/YAS.FRA Normal file

Binary file not shown.

BIN
Localization/HUN/YAS.HUN Normal file

Binary file not shown.

Binary file not shown.

BIN
Localization/ITA/YAS.ITA Normal file

Binary file not shown.

BIN
Localization/JPN/YAS.JPN Normal file

Binary file not shown.

BIN
Localization/KOR/YAS.KOR Normal file

Binary file not shown.

BIN
Localization/POL/YAS.POL Normal file

Binary file not shown.

BIN
Localization/POR/YAS.POR Normal file

Binary file not shown.

BIN
Localization/PTB/YAS.PTB Normal file

Binary file not shown.

Binary file not shown.

BIN
Localization/TUR/YAS.TUR Normal file

Binary file not shown.

BIN
Localization/UKR/YAS.UKR Normal file

Binary file not shown.

View File

@ -0,0 +1,34 @@
class YAS_LocalMessage extends Object
abstract;
var const String PlayersDefault;
var private localized String Players;
var const String SpectatorsDefault;
var private localized String Spectators;
enum E_YAS_LocalMessageType
{
YAS_Players,
YAS_Spectators
};
public static function String GetLocalizedString(E_YAS_LocalMessageType LMT)
{
switch (LMT)
{
case YAS_Players:
return (default.Players != "" ? default.Players : default.PlayersDefault);
case YAS_Spectators:
return (default.Spectators != "" ? default.Spectators : default.SpectatorsDefault);
}
return "";
}
defaultproperties
{
PlayersDefault = "Players"
SpectatorsDefault = "Spectators"
}

View File

@ -1,6 +1,8 @@
class YAS_ScoreBoard extends KFGUI_Page class YAS_ScoreBoard extends KFGUI_Page
dependson(YAS_Types); dependson(YAS_Types);
const LocalMessage = class'YAS_LocalMessage';
const HeaderWidthRatio = 0.30f; const HeaderWidthRatio = 0.30f;
const PlayerListWidthRatio = 0.6f; const PlayerListWidthRatio = 0.6f;
const PlayerEntryHeightMod = 1.05f; const PlayerEntryHeightMod = 1.05f;
@ -50,8 +52,6 @@ var KFPlayerController OwnerPC;
var Color PingColor; var Color PingColor;
var float PingBars; var float PingBars;
var localized String Players, Spectators;
// Cache // Cache
var public Array<YAS_RepInfoPlayer> RepInfos; var public Array<YAS_RepInfoPlayer> RepInfos;
@ -430,7 +430,9 @@ function DrawMenu()
*/ */
Canvas.SetDrawColorStruct(Settings.Style.PlayerCountTextColor); Canvas.SetDrawColorStruct(Settings.Style.PlayerCountTextColor);
S = Players $ ":" @ NumPlayer @ "/" @ KFGRI.MaxHumanCount $ " " $ Spectators $ ": " $ NumSpec; ; S = LocalMessage.static.GetLocalizedString(YAS_Players) $ ":"
@ NumPlayer @ "/" @ KFGRI.MaxHumanCount $ " "
$ LocalMessage.static.GetLocalizedString(YAS_Spectators) $ ": " $ NumSpec; ;
Canvas.TextSize(S, XL, YL, FontScalar, FontScalar); Canvas.TextSize(S, XL, YL, FontScalar, FontScalar);
DrawTextShadowHLeftVCenter(S, BoxX + EdgeSize, YPos, BoxH, FontScalar); DrawTextShadowHLeftVCenter(S, BoxX + EdgeSize, YPos, BoxH, FontScalar);