Skip to content

Commit

Permalink
Added lang support
Browse files Browse the repository at this point in the history
  • Loading branch information
schwarper committed Jun 11, 2024
1 parent ac0d77c commit 0d9b6d3
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 15 deletions.
4 changes: 4 additions & 0 deletions Store/lang/ch.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@
"Speed expired": "{white}你的加速时间已过.",

"menu.bottom.text": " <font color='cyan'>[ WASD - 移动 ]</font> <br><font color='purple'>[ <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/tab.gif' class=''> - 退出 ]",
"menu.selection.left": "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/left.gif' class=''> <font color='orange'>",
"menu.selection.right": "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/right.gif' class=''> <font color='white'>",
"menu.selection.prefix": "<font color='green'>",
"menu.selection.optionsbelow": "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''> <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''> <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''>",

"menu_store<title>": "Store [你的积分: {0}]",

Expand Down
6 changes: 5 additions & 1 deletion Store/lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
"Godmode expired": "{white}Your godmode time is expired.",
"Speed expired": "{white}Your speed time is expired.",

"menu_store<text>": " <font color='cyan'>[ WASD - To Move ]</font> <br><font color='purple'>[ <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/tab.gif' class=''> - To Exit ]",
"menu.buttom.text": " <font color='cyan'>[ WASD - To Move ]</font> <br><font color='purple'>[ <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/tab.gif' class=''> - To Exit ]",
"menu.selection.left": "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/left.gif' class=''> <font color='orange'>",
"menu.selection.right": "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/right.gif' class=''> <font color='white'>",
"menu.selection.prefix": "<font color='green'>",
"menu.selection.optionsbelow": "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''> <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''> <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''>",

"menu_store<title>": "Store [Your credits: {0}]",

Expand Down
6 changes: 5 additions & 1 deletion Store/lang/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
"Godmode expired": "{white}Seu tempo de godmode expirou.",
"Speed expired": "{white}Seu tempo de velocidade expirou.",

"menu_store<text>": " <font color='cyan'>[ WASD - Para mover ]</font> <br><font color='purple'>[ <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/tab.gif' class=''> - Sair ]",
"menu.buttom.text": " <font color='cyan'>[ WASD - Para mover ]</font> <br><font color='purple'>[ <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/tab.gif' class=''> - Sair ]",
"menu.selection.left": "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/left.gif' class=''> <font color='orange'>",
"menu.selection.right": "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/right.gif' class=''> <font color='white'>",
"menu.selection.prefix": "<font color='green'>",
"menu.selection.optionsbelow": "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''> <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''> <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''>",

"menu_store<title>": "Loja [Seus créditos: {0}]",

Expand Down
6 changes: 5 additions & 1 deletion Store/lang/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
"Godmode expired": "{white}Время вашего бессмертия истекло.",
"Speed expired": "{white}Время вашей скорости истекло.",

"menu_store<text>": " <font color='cyan'>[ WASD - Чтобы переехать ]</font> <br><font color='purple'>[ <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/tab.gif' class=''> - Выйти с сайта ]",
"menu.buttom.text": " <font color='cyan'>[ WASD - Чтобы переехать ]</font> <br><font color='purple'>[ <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/tab.gif' class=''> - Выйти с сайта ]",
"menu.selection.left": "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/left.gif' class=''> <font color='orange'>",
"menu.selection.right": "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/right.gif' class=''> <font color='white'>",
"menu.selection.prefix": "<font color='green'>",
"menu.selection.optionsbelow": "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''> <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''> <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''>",

"menu_store<title>": "Магазин [Ваши кредиты: {0}]",

Expand Down
6 changes: 5 additions & 1 deletion Store/lang/sl.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
"Godmode expired": "{white}Vaš čas boga načina je potekel.",
"Speed expired": "{white}Vaš hitrostni čas je potekel.",

"menu_store<text>": " <font color='cyan'>[ WASD - Premikanje ]</font> <br><font color='purple'>[ <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/tab.gif' class=''> - Izstopite iz ]",
"menu.buttom.text": " <font color='cyan'>[ WASD - Premikanje ]</font> <br><font color='purple'>[ <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/tab.gif' class=''> - Izstopite iz ]",
"menu.selection.left": "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/left.gif' class=''> <font color='orange'>",
"menu.selection.right": "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/right.gif' class=''> <font color='white'>",
"menu.selection.prefix": "<font color='green'>",
"menu.selection.optionsbelow": "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''> <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''> <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''>",

"menu_store<title>": "Trgovina [Vaši krediti: {0}]",

Expand Down
6 changes: 5 additions & 1 deletion Store/lang/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
"Godmode expired": "{white}Godmode süreniz bitti.",
"Speed expired": "{white}Hızlı koşma süreniz bitti.",

"menu_store<text>": " <font color='cyan'>[ WASD - Hareket ]</font> <br><font color='purple'>[ <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/tab.gif' class=''> - Çıkış ]",
"menu.buttom.text": " <font color='cyan'>[ WASD - Hareket ]</font> <br><font color='purple'>[ <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/tab.gif' class=''> - Çıkış ]",
"menu.selection.left": "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/left.gif' class=''> <font color='orange'>",
"menu.selection.right": "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/right.gif' class=''> <font color='white'>",
"menu.selection.prefix": "<font color='green'>",
"menu.selection.optionsbelow": "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''> <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''> <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''>",

"menu_store<title>": "Market [Krediniz: {0}]",

Expand Down
6 changes: 5 additions & 1 deletion Store/lang/ua.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
"Godmode expired": "{white}Час вашого богомоду закінчився.",
"Speed expired": "{white}Час вашої швидкості закінчився.",

"menu_store<text>": " <font color='cyan'>[ WASD - Перемістити ]</font> <br><font color='purple'>[ <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/tab.gif' class=''> - Виходьте ]",
"menu.bottom.text": " <font color='cyan'>[ WASD - Перемістити ]</font> <br><font color='purple'>[ <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/tab.gif' class=''> - Виходьте ]",
"menu.selection.left": "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/left.gif' class=''> <font color='orange'>",
"menu.selection.right": "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/right.gif' class=''> <font color='white'>",
"menu.selection.prefix": "<font color='green'>",
"menu.selection.optionsbelow": "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''> <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''> <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''>",

"menu_store<title>": "Магазин [Ваші кредити: {0}]",

Expand Down
13 changes: 4 additions & 9 deletions Store/src/menu/WASDMenu/Classes/WasdMenuPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ namespace Store;

public class WasdMenuPlayer
{
public const string MenuSelectionLeft = "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/left.gif' class=''>";
public const string MenuSelectionRight = "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/right.gif' class=''>";
public const string Prefix = "<font color='green'>";
public const string OptionsBelow = "<img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''> <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''> <img src='https://raw.githubusercontent.com/oqyh/cs2-Kill-Sound-GoldKingZ/main/Resources/arrow.gif' class=''>";

public CCSPlayerController player = null!;
public WasdMenu? MainMenu = null;
public LinkedListNode<IWasdMenuOption>? CurrentChoice = null;
Expand Down Expand Up @@ -128,13 +123,13 @@ private void UpdateCenterHtml()
LinkedListNode<IWasdMenuOption>? option = MenuStart!;
if (option.Value.Parent?.Title != "")
{
builder.AppendLine($"{Prefix}{option.Value.Parent?.Title}</u><font color='white'><br>");
builder.AppendLine($"{Instance.Localizer["menu.prefix"]}{option.Value.Parent?.Title}</u><font color='white'><br>");
}

while (i < VisibleOptions && option != null)
{
if (option == CurrentChoice)
builder.AppendLine($"{MenuSelectionLeft} {option.Value.OptionDisplay} {MenuSelectionRight} <br>");
builder.AppendLine($"{Instance.Localizer["menu.selection.left"]} {option.Value.OptionDisplay} {Instance.Localizer["menu.selection.right"]} <br>");
else
builder.AppendLine($"{option.Value.OptionDisplay} <br>");
option = option.Next;
Expand All @@ -144,11 +139,11 @@ private void UpdateCenterHtml()
if (option != null)
{
builder.AppendLine(
$"{OptionsBelow}");
$"{Instance.Localizer["menu.selection.optionsbelow"]}");
}

builder.AppendLine("<br>" +
$"{Instance.Localizer["menu_store<text>"]}<br>");
$"{Instance.Localizer["menu.bottom.text"]}<br>");
builder.AppendLine("</div>");
CenterHtml = builder.ToString();
}
Expand Down

0 comments on commit 0d9b6d3

Please sign in to comment.