Fix broken translating in some plugins and natives (bug 5612, r=psychonic).
This commit is contained in:
		
							parent
							
								
									86bdfa2205
								
							
						
					
					
						commit
						0be3f0afed
					
				| @ -1097,6 +1097,8 @@ static cell_t FakeClientCommand(IPluginContext *pContext, const cell_t *params) | |||||||
| 		return pContext->ThrowNativeError("Client %d is not connected", params[1]); | 		return pContext->ThrowNativeError("Client %d is not connected", params[1]); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	g_SourceMod.SetGlobalTarget(params[1]); | ||||||
|  | 
 | ||||||
| 	char buffer[256]; | 	char buffer[256]; | ||||||
| 	g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2); | 	g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2); | ||||||
| 
 | 
 | ||||||
| @ -1124,6 +1126,8 @@ static cell_t FakeClientCommandEx(IPluginContext *pContext, const cell_t *params | |||||||
| 		return pContext->ThrowNativeError("Client %d is not connected", params[1]); | 		return pContext->ThrowNativeError("Client %d is not connected", params[1]); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	g_SourceMod.SetGlobalTarget(params[1]); | ||||||
|  | 
 | ||||||
| 	char buffer[256]; | 	char buffer[256]; | ||||||
| 	g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2); | 	g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2); | ||||||
| 
 | 
 | ||||||
| @ -1172,8 +1176,6 @@ static cell_t ReplyToCommand(IPluginContext *pContext, const cell_t *params) | |||||||
| 		return pContext->ThrowNativeError("Client %d is not connected", params[1]); | 		return pContext->ThrowNativeError("Client %d is not connected", params[1]); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	g_SourceMod.SetGlobalTarget(params[1]); |  | ||||||
| 
 |  | ||||||
| 	unsigned int replyto = g_ChatTriggers.GetReplyTo(); | 	unsigned int replyto = g_ChatTriggers.GetReplyTo(); | ||||||
| 	if (replyto == SM_REPLY_CONSOLE) | 	if (replyto == SM_REPLY_CONSOLE) | ||||||
| 	{ | 	{ | ||||||
|  | |||||||
| @ -394,6 +394,7 @@ static cell_t ShowSyncHudText(IPluginContext *pContext, const cell_t *params) | |||||||
| 		return pContext->ThrowNativeError("Client %d is not in-game", client); | 		return pContext->ThrowNativeError("Client %d is not in-game", client); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	g_SourceMod.SetGlobalTarget(client); | ||||||
| 	g_SourceMod.FormatString(message_buffer, sizeof(message_buffer), pContext, params, 3); | 	g_SourceMod.FormatString(message_buffer, sizeof(message_buffer), pContext, params, 3); | ||||||
| 	if (pContext->GetLastNativeError() != SP_ERROR_NONE) | 	if (pContext->GetLastNativeError() != SP_ERROR_NONE) | ||||||
| 	{ | 	{ | ||||||
| @ -466,6 +467,7 @@ static cell_t ShowHudText(IPluginContext *pContext, const cell_t *params) | |||||||
| 		return pContext->ThrowNativeError("Client %d is not in-game", client); | 		return pContext->ThrowNativeError("Client %d is not in-game", client); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	g_SourceMod.SetGlobalTarget(client); | ||||||
| 	g_SourceMod.FormatString(message_buffer, sizeof(message_buffer), pContext, params, 3); | 	g_SourceMod.FormatString(message_buffer, sizeof(message_buffer), pContext, params, 3); | ||||||
| 	if (pContext->GetLastNativeError() != SP_ERROR_NONE) | 	if (pContext->GetLastNativeError() != SP_ERROR_NONE) | ||||||
| 	{ | 	{ | ||||||
|  | |||||||
| @ -844,8 +844,6 @@ static cell_t SetMenuTitle(IPluginContext *pContext, const cell_t *params) | |||||||
| 		return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err); | 		return pContext->ThrowNativeError("Menu handle %x is invalid (error %d)", hndl, err); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	g_SourceMod.SetGlobalTarget(SOURCEMOD_SERVER_LANGUAGE); |  | ||||||
| 
 |  | ||||||
| 	char buffer[1024]; | 	char buffer[1024]; | ||||||
| 	g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2); | 	g_SourceMod.FormatString(buffer, sizeof(buffer), pContext, params, 2); | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -82,7 +82,7 @@ public Action:HelpCmd(client, args) | |||||||
| 	new Flags; | 	new Flags; | ||||||
| 	new Handle:CmdIter = GetCommandIterator(); | 	new Handle:CmdIter = GetCommandIterator(); | ||||||
| 
 | 
 | ||||||
| 	FormatEx(NoDesc, sizeof(NoDesc), "%t", "No description available"); | 	FormatEx(NoDesc, sizeof(NoDesc), "%T", "No description available", client); | ||||||
| 
 | 
 | ||||||
| 	if (DoSearch) | 	if (DoSearch) | ||||||
| 	{ | 	{ | ||||||
|  | |||||||
| @ -175,9 +175,9 @@ public Action:Command_Who(client, args) | |||||||
| 	{ | 	{ | ||||||
| 		/* Display header */ | 		/* Display header */ | ||||||
| 		decl String:t_access[16], String:t_name[16], String:t_username[16]; | 		decl String:t_access[16], String:t_name[16], String:t_username[16]; | ||||||
| 		Format(t_access, sizeof(t_access), "%t", "Admin access", client); | 		Format(t_access, sizeof(t_access), "%T", "Admin access", client); | ||||||
| 		Format(t_name, sizeof(t_name), "%t", "Name", client); | 		Format(t_name, sizeof(t_name), "%T", "Name", client); | ||||||
| 		Format(t_username, sizeof(t_username), "%t", "Username", client); | 		Format(t_username, sizeof(t_username), "%T", "Username", client); | ||||||
| 
 | 
 | ||||||
| 		if (is_admin) | 		if (is_admin) | ||||||
| 		{ | 		{ | ||||||
|  | |||||||
| @ -260,7 +260,7 @@ public Action:Command_Nominate(client, args) | |||||||
| 
 | 
 | ||||||
| AttemptNominate(client) | AttemptNominate(client) | ||||||
| { | { | ||||||
| 	SetMenuTitle(g_MapMenu, "%t", "Nominate Title", client); | 	SetMenuTitle(g_MapMenu, "%T", "Nominate Title", client); | ||||||
| 	DisplayMenu(g_MapMenu, client, MENU_TIME_FOREVER); | 	DisplayMenu(g_MapMenu, client, MENU_TIME_FOREVER); | ||||||
| 	 | 	 | ||||||
| 	return; | 	return; | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user