diff --git a/plugins/basecomm/gag.sp b/plugins/basecomm/gag.sp index 4ddf264a..316f8625 100644 --- a/plugins/basecomm/gag.sp +++ b/plugins/basecomm/gag.sp @@ -54,34 +54,41 @@ DisplayGagTypesMenu(client) if (!g_Muted[target]) { - AddMenuItem(menu, "0", "Mute Player"); + AddTranslatedMenuItem(menu, "0", "Mute Player", client); } else { - AddMenuItem(menu, "1", "UnMute Player"); + AddTranslatedMenuItem(menu, "1", "UnMute Player", client); } if (!g_Gagged[target]) { - AddMenuItem(menu, "2", "Gag Player"); + AddTranslatedMenuItem(menu, "2", "Gag Player", client); } else { - AddMenuItem(menu, "3", "UnGag Player"); + AddTranslatedMenuItem(menu, "3", "UnGag Player", client); } if (!g_Muted[target] || !g_Gagged[target]) { - AddMenuItem(menu, "4", "Silence Player"); + AddTranslatedMenuItem(menu, "4", "Silence Player", client); } else { - AddMenuItem(menu, "5", "UnSilence Player"); + AddTranslatedMenuItem(menu, "5", "UnSilence Player", client); } DisplayMenu(menu, client, MENU_TIME_FOREVER); } +AddTranslatedMenuItem(Handle:menu, const String:opt[], const String:phrase[], client) +{ + decl String:buffer[128]; + Format(buffer, sizeof(buffer), "%T", phrase, client); + AddMenuItem(menu, opt, buffer); +} + DisplayGagPlayerMenu(client) { new Handle:menu = CreateMenu(MenuHandler_GagPlayer); diff --git a/plugins/basecommands.sp b/plugins/basecommands.sp index 1b574d76..ab1976f9 100644 --- a/plugins/basecommands.sp +++ b/plugins/basecommands.sp @@ -81,8 +81,8 @@ public OnPluginStart() OnAdminMenuReady(topmenu); } - g_MapList = CreateMenu(MenuHandler_ChangeMap); - SetMenuTitle(g_MapList, "Please select a map"); + g_MapList = CreateMenu(MenuHandler_ChangeMap, MenuAction_Display); + SetMenuTitle(g_MapList, "%T", "Please select a map", LANG_SERVER); SetMenuExitBackButton(g_MapList, true); decl String:mapListPath[PLATFORM_MAX_PATH]; diff --git a/plugins/basecommands/execcfg.sp b/plugins/basecommands/execcfg.sp index 8feb56d3..a698decc 100644 --- a/plugins/basecommands/execcfg.sp +++ b/plugins/basecommands/execcfg.sp @@ -82,6 +82,12 @@ public MenuHandler_ExecCFG(Handle:menu, MenuAction:action, param1, param2) PerformExec(param1, path); } + else if (action == MenuAction_Display) + { + decl String:title[128]; + Format(title, sizeof(title), "%T", "Choose Config", param1); + SetPanelTitle(Handle:param2, title); + } } public Action:Command_ExecCfg(client, args) @@ -115,8 +121,8 @@ ParseConfigs() CloseHandle(g_ConfigMenu); } - g_ConfigMenu = CreateMenu(MenuHandler_ExecCFG); - SetMenuTitle(g_ConfigMenu, "Choose Config"); + g_ConfigMenu = CreateMenu(MenuHandler_ExecCFG, MenuAction_Display); + SetMenuTitle(g_ConfigMenu, "%T", "Choose Config", LANG_SERVER); SetMenuExitBackButton(g_ConfigMenu, true); decl String:configPath[256]; diff --git a/plugins/basecommands/map.sp b/plugins/basecommands/map.sp index 9415d0d8..48b788d9 100644 --- a/plugins/basecommands/map.sp +++ b/plugins/basecommands/map.sp @@ -53,7 +53,12 @@ public MenuHandler_ChangeMap(Handle:menu, MenuAction:action, param1, param2) new Handle:dp; CreateDataTimer(3.0, Timer_ChangeMap, dp); WritePackString(dp, map); - + } + else if (action == MenuAction_Display) + { + decl String:title[128]; + Format(title, sizeof(title), "%T", "Please select a map", param1); + SetPanelTitle(Handle:param2, title); } } diff --git a/plugins/basevotes.sp b/plugins/basevotes.sp index 42157a90..020237c2 100644 --- a/plugins/basevotes.sp +++ b/plugins/basevotes.sp @@ -118,8 +118,8 @@ public OnPluginStart() g_SelectedMaps = CreateArray(33); - g_MapList = CreateMenu(MenuHandler_Map, MenuAction_DrawItem); - SetMenuTitle(g_MapList, "Please select a map"); + g_MapList = CreateMenu(MenuHandler_Map, MenuAction_DrawItem|MenuAction_Display); + SetMenuTitle(g_MapList, "%T", "Please select a map", LANG_SERVER); SetMenuExitBackButton(g_MapList, true); decl String:mapListPath[PLATFORM_MAX_PATH]; diff --git a/plugins/basevotes/votemap.sp b/plugins/basevotes/votemap.sp index cd26fb0f..96e129f1 100644 --- a/plugins/basevotes/votemap.sp +++ b/plugins/basevotes/votemap.sp @@ -84,7 +84,9 @@ ConfirmVote(client) SetMenuTitle(menu, title); SetMenuExitBackButton(menu, true); - AddMenuItem(menu, "Confirm", "Start the Vote"); + decl String:itemtext[256]; + Format(itemtext, sizeof(itemtext), "%T", "Start the Vote", client); + AddMenuItem(menu, "Confirm", itemtext); DisplayMenu(menu, client, MENU_TIME_FOREVER); } @@ -168,6 +170,12 @@ public MenuHandler_Map(Handle:menu, MenuAction:action, param1, param2) ConfirmVote(param1); } } + else if (action == MenuAction_Display) + { + decl String:title[128]; + Format(title, sizeof(title), "%T", "Please select a map", param1); + SetPanelTitle(Handle:param2, title); + } return 0; } diff --git a/plugins/funcommands.sp b/plugins/funcommands.sp index 983e4e0c..d8fda4b9 100644 --- a/plugins/funcommands.sp +++ b/plugins/funcommands.sp @@ -335,3 +335,10 @@ public OnAdminMenuReady(Handle:topmenu) } } +AddTranslatedMenuItem(Handle:menu, const String:opt[], const String:phrase[], client) +{ + decl String:buffer[128]; + Format(buffer, sizeof(buffer), "%T", phrase, client); + AddMenuItem(menu, opt, buffer); +} + diff --git a/plugins/funcommands/blind.sp b/plugins/funcommands/blind.sp index 939a3758..4e4f3e13 100644 --- a/plugins/funcommands/blind.sp +++ b/plugins/funcommands/blind.sp @@ -122,9 +122,9 @@ DisplayAmountMenu(client) SetMenuTitle(menu, title); SetMenuExitBackButton(menu, true); - AddMenuItem(menu, "255", "Fully blind"); - AddMenuItem(menu, "240", "Half blind"); - AddMenuItem(menu, "0", "No blind"); + AddTranslatedMenuItem(menu, "255", "Fully blind", client); + AddTranslatedMenuItem(menu, "240", "Half blind", client); + AddTranslatedMenuItem(menu, "0", "No blind", client); DisplayMenu(menu, client, MENU_TIME_FOREVER); } diff --git a/plugins/funcommands/gravity.sp b/plugins/funcommands/gravity.sp index 2fc1fe18..6962eaef 100644 --- a/plugins/funcommands/gravity.sp +++ b/plugins/funcommands/gravity.sp @@ -83,11 +83,11 @@ DisplayGravityAmountMenu(client) SetMenuTitle(menu, title); SetMenuExitBackButton(menu, true); - AddMenuItem(menu, "4.0", "Gravity Very High"); - AddMenuItem(menu, "2.0", "Gravity High"); - AddMenuItem(menu, "1.0", "Gravity Normal"); - AddMenuItem(menu, "0.5", "Gravity Low"); - AddMenuItem(menu, "0.1", "Gravity Very Low"); + AddTranslatedMenuItem(menu, "4.0", "Gravity Very High", client); + AddTranslatedMenuItem(menu, "2.0", "Gravity High", client); + AddTranslatedMenuItem(menu, "1.0", "Gravity Normal", client); + AddTranslatedMenuItem(menu, "0.5", "Gravity Low", client); + AddTranslatedMenuItem(menu, "0.1", "Gravity Very Low", client); DisplayMenu(menu, client, MENU_TIME_FOREVER); } diff --git a/translations/basecomm.phrases.txt b/translations/basecomm.phrases.txt index 21df36b2..002c4d12 100644 --- a/translations/basecomm.phrases.txt +++ b/translations/basecomm.phrases.txt @@ -45,4 +45,34 @@ "#format" "{1:t}" "en" "Unsilenced {1}." } + + "Mute Player" + { + "en" "Mute Player" + } + + "UnMute Player" + { + "en" "UnMute Player" + } + + "Gag Player" + { + "en" "Gag Player" + } + + "UnGag Player" + { + "en" "UnGag Player" + } + + "Silence Player" + { + "en" "Silence Player" + } + + "UnSilence Player" + { + "en" "UnSilence Player" + } } diff --git a/translations/basevotes.phrases.txt b/translations/basevotes.phrases.txt index 230c100e..01ca48f3 100644 --- a/translations/basevotes.phrases.txt +++ b/translations/basevotes.phrases.txt @@ -88,4 +88,14 @@ { "en" "Confirm Vote" } + + "Please select a map" + { + "en" "Please select a map" + } + + "Start the Vote" + { + "en" "Start the Vote" + } } diff --git a/translations/plugin.basecommands.txt b/translations/plugin.basecommands.txt index c8e792b3..18b2b60d 100644 --- a/translations/plugin.basecommands.txt +++ b/translations/plugin.basecommands.txt @@ -141,4 +141,14 @@ "#format" "{1:s}" "en" "Cvar {1} is now protected." } + + "Please select a map" + { + "en" "Please select a map" + } + + "Choose Config" + { + "en" "Choose Config" + } }