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:
parent
a5e3944234
commit
f804a7d4e2
25
compiling.txt
Normal file
25
compiling.txt
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
This plugin has a command for dumping detailed version info (zr_version) based
|
||||||
|
on info from a automatically generated file (hgversion.h.inc).
|
||||||
|
|
||||||
|
There's a script that generate this file and must be executed every time before
|
||||||
|
compiling. Currently there's only a linux version of that script:
|
||||||
|
|
||||||
|
updateversion.sh
|
||||||
|
|
||||||
|
Mercurial must be installed for this script to work. Use the makefile to
|
||||||
|
compile since that one will do most of the work. Make sure you clean any
|
||||||
|
existing builds before compiling:
|
||||||
|
|
||||||
|
make clean
|
||||||
|
make
|
||||||
|
|
||||||
|
If you're compiling on windows, there's an option to disable this feature. In
|
||||||
|
zombiereloaded.sp there's a line like this:
|
||||||
|
|
||||||
|
#define ADD_VERSION_INFO 1
|
||||||
|
|
||||||
|
To disable it, comment that line like this:
|
||||||
|
|
||||||
|
//#define ADD_VERSION_INFO 1
|
||||||
|
|
||||||
|
Then you should be able to compile without hgversion.h.inc.
|
@ -906,8 +906,8 @@ stock bool:ConfigSettingToBool(const String:option[])
|
|||||||
*/
|
*/
|
||||||
stock ConfigBoolToSetting(bool:bOption, String:option[], maxlen, bool:yesno = true, target = LANG_SERVER)
|
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_yes[16], String:t_on[32];
|
||||||
decl String:t_no[16], String:t_off[16];
|
decl String:t_no[16], String:t_off[32];
|
||||||
|
|
||||||
SetGlobalTransTarget(target);
|
SetGlobalTransTarget(target);
|
||||||
|
|
||||||
|
@ -370,7 +370,7 @@ bool:HitgroupsMenuHitgroups(client)
|
|||||||
// Set client as translation target.
|
// Set client as translation target.
|
||||||
SetGlobalTransTarget(client);
|
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:enableall[MENU_LINE_REG_LENGTH];
|
||||||
decl String:headshotsonly[MENU_LINE_REG_LENGTH];
|
decl String:headshotsonly[MENU_LINE_REG_LENGTH];
|
||||||
|
|
||||||
@ -385,7 +385,7 @@ bool:HitgroupsMenuHitgroups(client)
|
|||||||
AddMenuItem(menu_hitgroups, "Headshots Only", headshotsonly);
|
AddMenuItem(menu_hitgroups, "Headshots Only", headshotsonly);
|
||||||
|
|
||||||
decl String:hitgroupoption[MENU_LINE_REG_LENGTH];
|
decl String:hitgroupoption[MENU_LINE_REG_LENGTH];
|
||||||
decl String:hitgroupcandamage[8];
|
decl String:hitgroupcandamage[MENU_LINE_SMALL_LENGTH];
|
||||||
decl String:hitgroupid[4];
|
decl String:hitgroupid[4];
|
||||||
|
|
||||||
// x = Hitgroup index.
|
// x = Hitgroup index.
|
||||||
|
@ -232,7 +232,7 @@ stock MenuClientList(client, MenuHandler:handler, bool:team = false, bool:alive
|
|||||||
SetGlobalTransTarget(client);
|
SetGlobalTransTarget(client);
|
||||||
|
|
||||||
// Translate phrase.
|
// Translate phrase.
|
||||||
decl String:translation[MENU_LINE_REG_LENGTH];
|
decl String:translation[MENU_LINE_TITLE_LENGTH];
|
||||||
VFormat(translation, sizeof(translation), "%t", 6);
|
VFormat(translation, sizeof(translation), "%t", 6);
|
||||||
|
|
||||||
// Set menu title to the translated phrase.
|
// 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 there are no clients, add an "(Empty)" line.
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
|
// Set translation language again, because SetMenuTitle above reset
|
||||||
|
// this for some reason.
|
||||||
|
SetGlobalTransTarget(client);
|
||||||
|
|
||||||
decl String:empty[64];
|
decl String:empty[64];
|
||||||
Format(empty, sizeof(empty), "%t", "Menu empty");
|
Format(empty, sizeof(empty), "%t", "Menu empty");
|
||||||
|
|
||||||
|
@ -209,6 +209,9 @@ WeaponsMenuTypeWeapons(client)
|
|||||||
decl String:typename[WEAPONS_MAX_LENGTH];
|
decl String:typename[WEAPONS_MAX_LENGTH];
|
||||||
RestrictWeaponTypeGetName(g_iWeaponsCurType[client], typename, sizeof(typename));
|
RestrictWeaponTypeGetName(g_iWeaponsCurType[client], typename, sizeof(typename));
|
||||||
|
|
||||||
|
// Set translation language.
|
||||||
|
SetGlobalTransTarget(client);
|
||||||
|
|
||||||
decl String:title[MENU_LINE_TITLE_LENGTH];
|
decl String:title[MENU_LINE_TITLE_LENGTH];
|
||||||
decl String:restrictall[MENU_LINE_REG_LENGTH];
|
decl String:restrictall[MENU_LINE_REG_LENGTH];
|
||||||
decl String:unrestrictall[MENU_LINE_REG_LENGTH];
|
decl String:unrestrictall[MENU_LINE_REG_LENGTH];
|
||||||
|
@ -431,7 +431,7 @@ bool:ZMarketMenuLoadout(client)
|
|||||||
decl String:nvgsbool[8];
|
decl String:nvgsbool[8];
|
||||||
ConfigBoolToSetting(bool:nvgsweapon[0], nvgsbool, sizeof(nvgsbool), true, client);
|
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:primary[MENU_LINE_REG_LENGTH];
|
||||||
decl String:secondary[MENU_LINE_REG_LENGTH];
|
decl String:secondary[MENU_LINE_REG_LENGTH];
|
||||||
decl String:melee[MENU_LINE_REG_LENGTH];
|
decl String:melee[MENU_LINE_REG_LENGTH];
|
||||||
@ -510,6 +510,7 @@ ZMarketMenuTypes(client)
|
|||||||
new Handle:menu_zmarket_types = CreateMenu(ZMarketMenuTypesHandle);
|
new Handle:menu_zmarket_types = CreateMenu(ZMarketMenuTypesHandle);
|
||||||
|
|
||||||
// Set translation target as client.
|
// Set translation target as client.
|
||||||
|
SetGlobalTransTarget(client);
|
||||||
|
|
||||||
decl String:title[MENU_LINE_TITLE_LENGTH];
|
decl String:title[MENU_LINE_TITLE_LENGTH];
|
||||||
Format(title, sizeof(title), "%t\n ", "Weapons menu zmarket types title");
|
Format(title, sizeof(title), "%t\n ", "Weapons menu zmarket types title");
|
||||||
|
Loading…
Reference in New Issue
Block a user