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

Support for breaking lines in messages #93

Open
crashzk opened this issue Oct 19, 2021 · 22 comments · May be fixed by #105
Open

Support for breaking lines in messages #93

crashzk opened this issue Oct 19, 2021 · 22 comments · May be fixed by #105

Comments

@crashzk
Copy link
Contributor

crashzk commented Oct 19, 2021

I'm using version [VIP] Core (3.1 DEV) by R1KO, I would like to know if it would be possible to add line breaks to messages that can be translated.

In this case it would be the messages from the file info.ini, located in the folder addons/sourcemod/data/vip/cfg/.

@R1KO
Copy link
Owner

R1KO commented Oct 19, 2021

I'm using version [VIP] Core (3.1 DEV) by R1KO, I would like to know if it would be possible to add line breaks to messages that can be translated.

In this case it would be the messages from the file info.ini, located in the folder addons/sourcemod/data/vip/cfg/.

yeah. use \n for this

@crashzk
Copy link
Contributor Author

crashzk commented Oct 19, 2021

I've tried, it did not work.

@R1KO
Copy link
Owner

R1KO commented Oct 19, 2021

I've tried, it did not work.

give me example

@crashzk
Copy link
Contributor Author

crashzk commented Oct 19, 2021

Translations pt:

"VIP_INFO"
{
	"connect_info_time"	// Сообщение для VIP-игрока при входе на сервер (когда вип на время)
	{
		//	{NAME}		- Ник игрока
		//	{GROUP}		- Группа игрока
		//	{TIMELEFT}	- Через сколько истекает VIP-статус
		//	{EXPIRES}	- Когда истекает VIP-статус

		"chat"		// Сообщение в чат
		{
			"ru"		"{DEFAULT}Здравствуйте, {GREEN}{NAME}{DEFAULT}! Вы являетесь {GREEN}VIP-игроком{DEFAULT}. Ваш VIP статус истекает {GREEN}{EXPIRES}"
			"en"		"{DEFAULT}Hello, {GREEN}{NAME}{DEFAULT}! You have {GREEN}VIP features {DEFAULT}for {GREEN}{EXPIRES}"
			"pt"		"{GREEN}{NAME} {DEFAULT}obrigado por adquirir {GREEN}{GROUP}{DEFAULT} em nossos servidores, saiba que sem você a {GREEN}ZK Servidores™ {DEFAULT}não poderia existir! {RED}❤\n\nLembre-se de digitar {GREEN}!vip {DEFAULT}para ver todos seus privilégios.\n"
		}
		"menu"		// Сообщение в меню
		{
			"time"		"4"	// Через сколько секунд меню будет закрыто автоматически (0 - пока игрок сам не закроет)
			"ru"
			{
				// Пукнты меню
				"item"	"Вы имеете VIP-статус"
				"item"	"SPACER"
				"item"	"Ник: {NAME}"
				"item"	"Группа: {GROUP}"
				"item"	"Истекает: {EXPIRES}"
				"item"	"Истекает через: {TIMELEFT}"
			}
			"en"
			{
				"item"	"You have a VIP-status"
				"item"	"SPACER"
				"item"	"Nick: {NAME}"
				"item"	"Group: {GROUP}"
				"item"	"Expires: {EXPIRES}"
				"item"	"Expires in: {TIMELEFT}"
			}
			"pt"
			{
				"item"	"Você tem privilégios no servidor"
				"item"	"SPACER"
				"item"	"Nick: {NAME}"
				"item"	"Privilégios: {GROUP}"
				"item"	"Expira: {EXPIRES}"
				"item"	"Expira em: {TIMELEFT}"
			}
		}
	}
	"connect_info_perm"	// Сообщение для VIP-игрока при входе на сервер (когда вип навсегда)
	{
		//	{NAME}	- Ник игрока
		//	{GROUP}	- Группа игрока

		"chat"		// Сообщение в чат
		{
			"ru"		"{DEFAULT}Здравствуйте, {GREEN}{NAME}{DEFAULT}! Вы являетесь {GREEN}VIP-игроком{DEFAULT}."
			"en"		"{DEFAULT}Hello, {GREEN}{NAME}{DEFAULT}! You have  {GREEN}VIP features{DEFAULT}."
			"pt"		"{GREEN}{NAME} {DEFAULT}obrigado por adquirir {GREEN}{GROUP}{DEFAULT} em nossos servidores, saiba que sem você a {GREEN}ZK Servidores™ {DEFAULT}não poderia existir! {RED}❤\n\nLembre-se de digitar {GREEN}!vip {DEFAULT}para ver todos seus privilégios.\n"
		}
		"menu"		// Сообщение в меню
		{
			"time"		"4"	// Через сколько секунд меню будет закрыто автоматически (0 - пока игрок сам не закроет)
			"ru"
			{
				// Пукнты меню
				"item"	"Вы имеете VIP-статус"
				"item"	"Ник: {NAME}"
				"item"	"Группа: {GROUP}"
			}
			"en"
			{
				"item"	"You have a VIP-status"
				"item"	"Nick: {NAME}"
				"item"	"Group: {GROUP}"
			}
			"pt"
			{
				"item"	"Você tem privilégios no servidor"
				"item"	"Nick: {NAME}"
				"item"	"Privilégios: {GROUP}"
			}
		}
	}
	"no_access_info"	// Сообщение об остутствии VIP-статуса
	{
		"menu"		// Сообщение в меню
		{
			"time"		"4"	// Через сколько секунд меню будет закрыто автоматически (0 - пока игрок сам не закроет)
			"ru"
			{
				// Пукнты меню
				"item"	"У вас нет доступа к этому меню"
				"item"	"Чтобы приобрести VIP-статус"
				"item"	"обратитесь к администратору"
			}
			"en"
			{
				"item"	"You do not have access to this menu"
				"item"	"To purchase VIP-status"
				"item"	"contact the administrator"
			}
			"pt"
			{
				"item"	"Você não tem acesso a este comando"
				"item"	"Para adquirir privilégios"
				"item"	"entre em contato conosco"
			}
		}
		"url"		// Ссылка, которую нужно открыть
		{
			"ru"		"http://mysite.ru/vip/no_access.php?lang=ru"
			"en"		"http://mysite.ru/vip/no_access.php?lang=en"
			"pt"		"http://mysite.ru/vip/no_access.php?lang=pt"
		}
	}
	"expired_info"	// Сообщение об истечении VIP-статуса
	{
		"menu"	// Сообщение в меню
		{
			"time"		"4"	// Через сколько секунд меню будет закрыто автоматически (0 - пока игрок сам не закроет)
			"ru"
			{
				// Пукнты меню
				"item"	"Срок вашего VIP-статуса истек"
				"item"	"Чтобы вновь приобрести VIP-статус"
				"item"	"Oбратитесь к администратору"
			}
			"en"
			{
				"item"	"Your VIP-status has expired"
				"item"	"To re-purchase VIP-status"
				"item"	"Contact the administrator"
			}
			"pt"
			{
				"item"	"Seus privilégios expirou"
				"item"	"Para adquirir novamente"
				"item"	"Entre em contato conosco"
			}
		}
	}
}

@crashzk
Copy link
Contributor Author

crashzk commented Oct 23, 2021

News? Anything I might have done wrong?

@R1KO
Copy link
Owner

R1KO commented Oct 23, 2021

i will test it tomorrow

@crashzk
Copy link
Contributor Author

crashzk commented Nov 11, 2021

Hi, were you able to test it?

@crashzk
Copy link
Contributor Author

crashzk commented Feb 23, 2022

News? Sorry to even ask about this again, it's really something I'd like to use in the plugin.

@crashzk
Copy link
Contributor Author

crashzk commented May 1, 2022

Just an update, even the latest branch version 3.1-dev still doesn't work wrapping lines in file info.ini

@R1KO R1KO linked a pull request May 2, 2022 that will close this issue
@R1KO
Copy link
Owner

R1KO commented May 2, 2022

@crashzk check this build please https://github.com/R1KO/VIP-Core/actions/runs/2260015614

@crashzk
Copy link
Contributor Author

crashzk commented May 3, 2022

@R1KO it worked and it didn't work... lol

In this case, I already have VIP active on my steam, but when I connect to server I don't receive any message informing that I'm VIP, here's a print.

20220503172116_1

But if I make any changes to the VIP using the command !vipadmin , I get the message that I have a VIP on the server.

20220503172145_1

Another thing would be the character limit, if you cut the message as you can see in the second print, would it be possible to increase this character limit?

@R1KO
Copy link
Owner

R1KO commented May 3, 2022

@R1KO it worked and it didn't work... lol

In this case, I already have VIP active on my steam, but when I connect to server I don't receive any message informing

that I'm VIP, here's a print.
i noticed it too. When I added a delay before the message - it always worked. I think this is due to the fact that the VIP player loads too quickly and the message is displayed when he is not yet fully on the server

Another thing would be the character limit, if you cut the message as you can see in the second print, would it be possible to increase this character limit?

yep

@crashzk
Copy link
Contributor Author

crashzk commented May 3, 2022

i noticed it too. When I added a delay before the message - it always worked. I think this is due to the fact that the VIP player loads too quickly and the message is displayed when he is not yet fully on the server

I see, it would be nice if you could add then again this delay in the message.

yep

Perfect, I would be grateful too so if you can increase this limit, in this case the message is complete in the file configuration but it was cut.

And again, thanks for the support, great plugin.

Other than these bugs, apparently everything is ok now.

@crashzk
Copy link
Contributor Author

crashzk commented Aug 14, 2022

@R1KO news about this fix?

@R1KO
Copy link
Owner

R1KO commented Aug 14, 2022

So far I haven't come up with a good solution.

@crashzk
Copy link
Contributor Author

crashzk commented Oct 8, 2022

Any news about it I'm here. Need help testing just let me know. 😁

@crashzk
Copy link
Contributor Author

crashzk commented Nov 24, 2022

@R1KO just an update, I've retested this version of the line wrap fix.

Due to some updates that were made to the [VIP] ADMIN & [VIP] Admin Privileges plugins the message is being sent correctly now.

Player having VIP he receives the message, and if I add VIP to a new player he receives it too. There was only the question of the character limit now, the complete message is not being sent in this case.

image

@R1KO
Copy link
Owner

R1KO commented Nov 24, 2022

@R1KO just an update, I've retested this version of the line wrap fix.

Due to some updates that were made to the [VIP] ADMIN & [VIP] Admin Privileges plugins the message is being sent correctly now.

Player having VIP he receives the message, and if I add VIP to a new player he receives it too. There was only the question of the character limit now, the complete message is not being sent in this case.

image

yep) i know how fix it but for what?

@crashzk
Copy link
Contributor Author

crashzk commented Nov 24, 2022

In my case it would be just to send the complete message.

Configured to send this message:

"{GREEN}{NAME} {DEFAULT}obrigado por adquirir {GREEN}{GROUP}{DEFAULT} em nossos servidores, saiba que sem você a {GREEN}ZK Servidores™ {DEFAULT}não poderia existir! {RED}❤\n\nLembre-se de digitar {GREEN}!vip {DEFAULT}para ver todos seus privilégios.\n"

As you can see in the screenshot above, he is cutting off the end of the sentence. Would it be possible to increase this character limit just a little bit more?

@R1KO
Copy link
Owner

R1KO commented Nov 28, 2022

In my case it would be just to send the complete message.

Configured to send this message:

"{GREEN}{NAME} {DEFAULT}obrigado por adquirir {GREEN}{GROUP}{DEFAULT} em nossos servidores, saiba que sem você a {GREEN}ZK Servidores™ {DEFAULT}não poderia existir! {RED}❤\n\nLembre-se de digitar {GREEN}!vip {DEFAULT}para ver todos seus privilégios.\n"

As you can see in the screenshot above, he is cutting off the end of the sentence. Would it be possible to increase this character limit just a little bit more?

don't get your hopes up) players won't read it all, I  tell from my own experience. More often than not, they won't even see this message. If you want to attract the player's attention - use the menu

@crashzk
Copy link
Contributor Author

crashzk commented Nov 29, 2022

I understand, in this case I use both menu and chat features. In any case, if it's not a big change and you can just tell me to apply it to my version, it helps too, but thanks for the feedback.

About the support for breaking lines, I believe this issues can be closed and merged in the PR: #105

Thanks again for the support.

@crashzk
Copy link
Contributor Author

crashzk commented Apr 19, 2023

@R1KO news on this implementation, can it be merged now? #105

I'm using the 3.1-dev branch and it doesn't have this change in it yet, would it be possible to include it in it, or something like that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants