Fixes in translations. Added note about compiling. See details.
Fixed weapon type restriction menu not translating the first time. Fixed zmarket weapon type selection menu title not translated. Fixed too short title string space in zmarket loadout, ztele force, zspawn force and hit group menus. Fixed "empty" phrase not translated. Fixed on/off translation string space too short in hit group menu.
This commit is contained in:
@ -906,8 +906,8 @@ stock bool:ConfigSettingToBool(const String:option[])
|
||||
*/
|
||||
stock ConfigBoolToSetting(bool:bOption, String:option[], maxlen, bool:yesno = true, target = LANG_SERVER)
|
||||
{
|
||||
decl String:t_yes[16], String:t_on[16];
|
||||
decl String:t_no[16], String:t_off[16];
|
||||
decl String:t_yes[16], String:t_on[32];
|
||||
decl String:t_no[16], String:t_off[32];
|
||||
|
||||
SetGlobalTransTarget(target);
|
||||
|
||||
|
@ -370,7 +370,7 @@ bool:HitgroupsMenuHitgroups(client)
|
||||
// Set client as translation target.
|
||||
SetGlobalTransTarget(client);
|
||||
|
||||
decl String:title[MENU_LINE_TITLE_LENGTH];
|
||||
decl String:title[MENU_LINE_HUGE_LENGTH];
|
||||
decl String:enableall[MENU_LINE_REG_LENGTH];
|
||||
decl String:headshotsonly[MENU_LINE_REG_LENGTH];
|
||||
|
||||
@ -385,7 +385,7 @@ bool:HitgroupsMenuHitgroups(client)
|
||||
AddMenuItem(menu_hitgroups, "Headshots Only", headshotsonly);
|
||||
|
||||
decl String:hitgroupoption[MENU_LINE_REG_LENGTH];
|
||||
decl String:hitgroupcandamage[8];
|
||||
decl String:hitgroupcandamage[MENU_LINE_SMALL_LENGTH];
|
||||
decl String:hitgroupid[4];
|
||||
|
||||
// x = Hitgroup index.
|
||||
|
@ -232,7 +232,7 @@ stock MenuClientList(client, MenuHandler:handler, bool:team = false, bool:alive
|
||||
SetGlobalTransTarget(client);
|
||||
|
||||
// Translate phrase.
|
||||
decl String:translation[MENU_LINE_REG_LENGTH];
|
||||
decl String:translation[MENU_LINE_TITLE_LENGTH];
|
||||
VFormat(translation, sizeof(translation), "%t", 6);
|
||||
|
||||
// Set menu title to the translated phrase.
|
||||
@ -284,6 +284,10 @@ stock MenuClientList(client, MenuHandler:handler, bool:team = false, bool:alive
|
||||
// If there are no clients, add an "(Empty)" line.
|
||||
if (count == 0)
|
||||
{
|
||||
// Set translation language again, because SetMenuTitle above reset
|
||||
// this for some reason.
|
||||
SetGlobalTransTarget(client);
|
||||
|
||||
decl String:empty[64];
|
||||
Format(empty, sizeof(empty), "%t", "Menu empty");
|
||||
|
||||
|
@ -209,6 +209,9 @@ WeaponsMenuTypeWeapons(client)
|
||||
decl String:typename[WEAPONS_MAX_LENGTH];
|
||||
RestrictWeaponTypeGetName(g_iWeaponsCurType[client], typename, sizeof(typename));
|
||||
|
||||
// Set translation language.
|
||||
SetGlobalTransTarget(client);
|
||||
|
||||
decl String:title[MENU_LINE_TITLE_LENGTH];
|
||||
decl String:restrictall[MENU_LINE_REG_LENGTH];
|
||||
decl String:unrestrictall[MENU_LINE_REG_LENGTH];
|
||||
|
@ -431,7 +431,7 @@ bool:ZMarketMenuLoadout(client)
|
||||
decl String:nvgsbool[8];
|
||||
ConfigBoolToSetting(bool:nvgsweapon[0], nvgsbool, sizeof(nvgsbool), true, client);
|
||||
|
||||
decl String:title[MENU_LINE_TITLE_LENGTH];
|
||||
decl String:title[MENU_LINE_HUGE_LENGTH];
|
||||
decl String:primary[MENU_LINE_REG_LENGTH];
|
||||
decl String:secondary[MENU_LINE_REG_LENGTH];
|
||||
decl String:melee[MENU_LINE_REG_LENGTH];
|
||||
@ -510,6 +510,7 @@ ZMarketMenuTypes(client)
|
||||
new Handle:menu_zmarket_types = CreateMenu(ZMarketMenuTypesHandle);
|
||||
|
||||
// Set translation target as client.
|
||||
SetGlobalTransTarget(client);
|
||||
|
||||
decl String:title[MENU_LINE_TITLE_LENGTH];
|
||||
Format(title, sizeof(title), "%t\n ", "Weapons menu zmarket types title");
|
||||
|
Reference in New Issue
Block a user