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:
richard 2009-08-23 17:03:14 +02:00
parent a5e3944234
commit f804a7d4e2
6 changed files with 39 additions and 6 deletions

25
compiling.txt Normal file
View 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.

View File

@ -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);

View File

@ -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.

View File

@ -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");

View File

@ -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];

View File

@ -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");