Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translations still not working #64

Closed
GreatBlank opened this issue Nov 22, 2023 · 5 comments
Closed

Translations still not working #64

GreatBlank opened this issue Nov 22, 2023 · 5 comments
Labels
duplicate This issue or pull request already exists request :: general New feature or request

Comments

@GreatBlank
Copy link

The plugin only uses EN-US language even if you change in-game language.

@MAGNAT2645
Copy link
Contributor

That's because RTD uses LANG_SERVER for phrases as target to retrieve language.
Also some strings still aren't translated at all, just hardcoded.

@MAGNAT2645
Copy link
Contributor

Functions like RTDPrint, RTDPrintAll, RTDPrintAllExcept should include SetGlobalTransTarget so all %T can be changed to %t.

void RTDPrintAll(const char[] sFormat, any ...)
{
	char sMsg[255];
	for (int i = 1; i <= MaxClients; ++i)
	{
		if (!IsClientInGame(i) || IsFakeClient(i))
		{
			continue;
		}
		SetGlobalTransTarget(i);
		VFormat(sMsg, 255, sFormat, 2);
		PrintToChat(i, CHAT_PREFIX ... " %s", sMsg );
	}
}

@Phil25
Copy link
Owner

Phil25 commented Nov 22, 2023

Hey, sorry I didn't take a look at it for 2.4.0. This kinda relates to #44 so lemme just reference it here.

The reason it's LANG_SERVER is because I saw this being the convention way back in the day when implementing it. I'm gonna have to research the topic of SM translations and see how they're handled basically from scratch, which is one of the reasons I didn't bother with it yet. That alone is not gonna take a long time but I wanna some time for a break because the last update took a lot of time and effort. But suffice to say, this topic is on my radar.

Also some strings still aren't translated at all, just hardcoded.

@MAGNAT2645 can you let me know which ones? All the player facing strings should be translated afaik.

@MAGNAT2645
Copy link
Contributor

MAGNAT2645 commented Nov 23, 2023

I can do PR but not right now and idk how much changes need to be done. I didnt look at every piece of code yet, just some lines.
There are hardcoded strings like this:

RTDPrint(initiator, "%N is already using RTD.", client);

(Cant copy line url in GitHub Mobile)
Also some ReplyToCommand messages should be translated as well.

@Phil25 Phil25 added the request :: general New feature or request label Nov 24, 2023
@Phil25 Phil25 added this to the 2.4.1 milestone Nov 25, 2023
@Phil25 Phil25 modified the milestones: 2.4.1, 2.4.2 Dec 17, 2023
@Phil25 Phil25 removed this from the 2.5.0 milestone Dec 27, 2023
@Phil25 Phil25 added the duplicate This issue or pull request already exists label Dec 27, 2023
@Phil25
Copy link
Owner

Phil25 commented Dec 27, 2023

Closing this as duplicate of #44, I'll be mentioning that issue with the fix.

@Phil25 Phil25 closed this as completed Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists request :: general New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants