VIP-Core icon indicating copy to clipboard operation
VIP-Core copied to clipboard

Support for breaking lines in messages

Open crashzk opened this issue 3 years ago • 22 comments

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

crashzk avatar Oct 19 '21 02:10 crashzk

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

R1KO avatar Oct 19 '21 10:10 R1KO

I've tried, it did not work.

crashzk avatar Oct 19 '21 11:10 crashzk

I've tried, it did not work.

give me example

R1KO avatar Oct 19 '21 11:10 R1KO

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 avatar Oct 19 '21 12:10 crashzk

News? Anything I might have done wrong?

crashzk avatar Oct 23 '21 16:10 crashzk

i will test it tomorrow

R1KO avatar Oct 23 '21 18:10 R1KO

Hi, were you able to test it?

crashzk avatar Nov 11 '21 22:11 crashzk

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

crashzk avatar Feb 23 '22 01:02 crashzk

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

crashzk avatar May 01 '22 20:05 crashzk

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

R1KO avatar May 02 '22 19:05 R1KO

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

crashzk avatar May 03 '22 20:05 crashzk

@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

R1KO avatar May 03 '22 20:05 R1KO

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 avatar May 03 '22 21:05 crashzk

@R1KO news about this fix?

crashzk avatar Aug 14 '22 13:08 crashzk

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

R1KO avatar Aug 14 '22 13:08 R1KO

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

crashzk avatar Oct 08 '22 22:10 crashzk

@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

crashzk avatar Nov 24 '22 13:11 crashzk

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

R1KO avatar Nov 24 '22 14:11 R1KO

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?

crashzk avatar Nov 24 '22 17:11 crashzk

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

R1KO avatar Nov 28 '22 16:11 R1KO

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: https://github.com/R1KO/VIP-Core/pull/105

Thanks again for the support.

crashzk avatar Nov 29 '22 19:11 crashzk

@R1KO news on this implementation, can it be merged now? https://github.com/R1KO/VIP-Core/pull/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?

crashzk avatar Apr 19 '23 21:04 crashzk