Raised This Month: $120 Target: $400
 30% 

Solved Problems languages


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
slumdog18
Junior Member
Join Date: Feb 2021
Old 04-05-2021 , 09:36   Problems languages
Reply With Quote #1

I have a problem in the language settings


Quote:
[SM] {1} quer mudar de mapa (Rock the Vote). ({2} voto(s), {3} necessário(s))
does not appear to me the name of the player

nor the next map another option

Exemple:

Quote:
[SM] Próximo mapa: {1}
appears as it is here

Last edited by slumdog18; 04-12-2021 at 23:22.
slumdog18 is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 04-05-2021 , 09:42   Re: Problems languages
Reply With Quote #2

the translation file must have something like this:

"#format" "{1:N}"

usually set in the main translation file (from root (translation) folder, not the translation/pt folder)
__________________

Last edited by Marttt; 04-05-2021 at 09:42.
Marttt is offline
slumdog18
Junior Member
Join Date: Feb 2021
Old 04-05-2021 , 09:49   Re: Problems languages
Reply With Quote #3

Quote:
Originally Posted by Marttt View Post
the translation file must have something like this:

"#format" "{1:N}"

usually set in the main translation file (from root (translation) folder, not the translation/pt folder)
is already in the folder
cstrike/addons/sourcemod/translations

but it's still the same

Quote:
"Phrases"
{
"Rock The Vote"
{
"pt_p" "Rock The Vote:"
}

"RTV Not Allowed"
{
"pt_p" "O Rock the Vote ainda não é permitido."
}

"RTV Started"
{
"pt_p" "O Rock the Vote já começou."
}

"RTV Ended"
{
"pt_p" "O RTV já terminou, não podes começá-lo novamente nem sugerir mapas."
}

"Already Voted"
{
"pt_p" "Já votaste para o Rock the Vote. ({1} votos, {2} necessários)"
}

"Minimal Players Not Met"
{
"pt_p" "O número mÃ*nimo de jogadores não foi alcançado."
}

"Map Already In Vote"
{
"pt_p" "O mapa '{1}' já está na lista do Rock the Vote."
}

"Map Inserted"
{
"pt_p" "Mapa '{1}' adicionado ao Rock the Vote."
}

"RTV Requested"
{
"pt_p" "{1} quer mudar de mapa (Rock the Vote). ({2} voto(s), {3} necessário(s))"
}

"RTV Vote Ready"
{
"pt_p" "O Rock the Vote começou!"
}

"Don't Change"
{
"pt_p" "Manter o mapa atual"
}

"Already Nominated"
{
"pt_p" "Já sugeriste um mapa."
}

"Max Nominations"
{
"pt_p" "O número máximo de sugestões já foi alcançado."
}

"Selected Map"
{
"pt_p" "{1} escolheu {2}"
}

"No Votes"
{
"pt_p" "Nenhum voto recebido pelo Rock the Vote, será mantido o mapa atual."
}

"Current Map Stays"
{
"pt_p" "O mapa atual continua! O Rock the Vote assim decidiu!"
}

"Changing Maps"
{
"pt_p" "A mudar o mapa para {1}! O Rock the Vote assim decidiu!"
}

"Map Already Nominated"
{
"pt_p" "O mapa que escolheste já foi sugerido."
}

"Map Nominated"
{
"pt_p" "{1} sugeriu {2} para o Rock the Vote."
}

"Nominate Title"
{
"pt_p" "Sugerir mapa:"
}

}

Last edited by slumdog18; 04-05-2021 at 09:49.
slumdog18 is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 04-05-2021 , 12:10   Re: Problems languages
Reply With Quote #4

yes what I mean is:

if you have "{1}" (for example) in your translation file probably you must have a "#format" "{1:N}" clause too

Sample:

PHP Code:
    "Sample Format"
    
{
        
"#format"        "{1:N}"
        "en"            "{orange}{1} {lightgreen}is my name"
        "es"            "{orange}{1} {lightgreen}es mi nombre"
        "pt"            "{orange}{1} {lightgreen}é meu nome"
        "pt_p"            "{orange}{1} {lightgreen}é meu nome"
    

And in your backend code probably you will have something like this:

PHP Code:
CPrintToChat(client"%t""Sample Format"client); 
__________________

Last edited by Marttt; 04-05-2021 at 12:12.
Marttt is offline
slumdog18
Junior Member
Join Date: Feb 2021
Old 04-05-2021 , 13:35   Re: Problems languages
Reply With Quote #5

Quote:
Originally Posted by Marttt View Post
yes what I mean is:

if you have "{1}" (for example) in your translation file probably you must have a "#format" "{1:N}" clause too

Sample:

PHP Code:
    "Sample Format"
    
{
        
"#format"        "{1:N}"
        "en"            "{orange}{1} {lightgreen}is my name"
        "es"            "{orange}{1} {lightgreen}es mi nombre"
        "pt"            "{orange}{1} {lightgreen}é meu nome"
        "pt_p"            "{orange}{1} {lightgreen}é meu nome"
    

And in your backend code probably you will have something like this:

PHP Code:
CPrintToChat(client"%t""Sample Format"client); 
ok, so what is the file called that i have to make this change, and what probe is it in?
slumdog18 is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 04-05-2021 , 17:50   Re: Problems languages
Reply With Quote #6

This is how the plugin is supposed to call the translation file.

What you are asking is on sourcecode which I don't have access, you need dig in the .sp file and search for "RTV Requested", then check if the parameters are being passed to the translation key.

But looking at your translation file is already wrong cause there is no "#format" in the translation keys.

I recommend you reading the Translation SM wiki page.
__________________
Marttt is offline
SmokieCS
AlliedModders Donor
Join Date: Nov 2019
Location: Denmark
Old 04-08-2021 , 06:45   Re: Problems languages
Reply With Quote #7

You need to implement formats to your translations, otherwise it will not recognize the 1's and 2's etc.

I have created the change down under:

Code:
"Phrases"
{
"Rock The Vote"
{
"pt_p" "Rock The Vote:"
}

"RTV Not Allowed"
{
"pt_p" "O Rock the Vote ainda não é permitido."
}

"RTV Started"
{
"pt_p" "O Rock the Vote já começou."
}

"RTV Ended"
{
"pt_p" "O RTV já terminou, não podes começá-lo novamente nem sugerir mapas."
}

"Already Voted"
{
"#format" "{1:s},{2:s}"
"pt_p" "Já votaste para o Rock the Vote. ({1} votos, {2} necessários)"
}

"Minimal Players Not Met"
{
"pt_p" "O número mÃ*nimo de jogadores não foi alcançado."
}

"Map Already In Vote"
{
"#format" "{1:s}"
"pt_p" "O mapa '{1}' já está na lista do Rock the Vote."
}

"Map Inserted"
{
"#format" "{1:s}"
"pt_p" "Mapa '{1}' adicionado ao Rock the Vote."
}

"RTV Requested"
{
"#format" "{1:s},{2:s},{3:s}"
"pt_p" "{1} quer mudar de mapa (Rock the Vote). ({2} voto(s), {3} necessário(s))"
}

"RTV Vote Ready"
{
"pt_p" "O Rock the Vote começou!"
}

"Don't Change"
{
"pt_p" "Manter o mapa atual"
}

"Already Nominated"
{
"pt_p" "Já sugeriste um mapa."
}

"Max Nominations"
{
"pt_p" "O número máximo de sugestões já foi alcançado."
}

"Selected Map"
{
"#format" "{1:s},{2:s}"
"pt_p" "{1} escolheu {2}"
}

"No Votes"
{
"pt_p" "Nenhum voto recebido pelo Rock the Vote, será mantido o mapa atual."
}

"Current Map Stays"
{
"pt_p" "O mapa atual continua! O Rock the Vote assim decidiu!"
}

"Changing Maps"
{
"#format" "{1:s}"
"pt_p" "A mudar o mapa para {1}! O Rock the Vote assim decidiu!"
}

"Map Already Nominated"
{
"pt_p" "O mapa que escolheste já foi sugerido."
}

"Map Nominated"
{
"#format" "{1:s},{2:s}"
"pt_p" "{1} sugeriu {2} para o Rock the Vote."
}

"Nominate Title"
{
"pt_p" "Sugerir mapa:"
}

}
Then you need to script into your backend/SP file. But if you do not know how to do it, let me know.
__________________
Server Manager & Chairman of the Board - https://esportharte.dk/
Freelance Server Support
Former Co-Owner - https://tfrag.dk/

Last edited by SmokieCS; 04-08-2021 at 06:47.
SmokieCS is offline
slumdog18
Junior Member
Join Date: Feb 2021
Old 04-09-2021 , 19:15   Re: Problems languages
Reply With Quote #8

Quote:
Originally Posted by SmokieCS View Post
You need to implement formats to your translations, otherwise it will not recognize the 1's and 2's etc.

I have created the change down under:

Code:
"Phrases"
{
"Rock The Vote"
{
"pt_p" "Rock The Vote:"
}

"RTV Not Allowed"
{
"pt_p" "O Rock the Vote ainda não é permitido."
}

"RTV Started"
{
"pt_p" "O Rock the Vote já começou."
}

"RTV Ended"
{
"pt_p" "O RTV já terminou, não podes começá-lo novamente nem sugerir mapas."
}

"Already Voted"
{
"#format" "{1:s},{2:s}"
"pt_p" "Já votaste para o Rock the Vote. ({1} votos, {2} necessários)"
}

"Minimal Players Not Met"
{
"pt_p" "O número mÃ*nimo de jogadores não foi alcançado."
}

"Map Already In Vote"
{
"#format" "{1:s}"
"pt_p" "O mapa '{1}' já está na lista do Rock the Vote."
}

"Map Inserted"
{
"#format" "{1:s}"
"pt_p" "Mapa '{1}' adicionado ao Rock the Vote."
}

"RTV Requested"
{
"#format" "{1:s},{2:s},{3:s}"
"pt_p" "{1} quer mudar de mapa (Rock the Vote). ({2} voto(s), {3} necessário(s))"
}

"RTV Vote Ready"
{
"pt_p" "O Rock the Vote começou!"
}

"Don't Change"
{
"pt_p" "Manter o mapa atual"
}

"Already Nominated"
{
"pt_p" "Já sugeriste um mapa."
}

"Max Nominations"
{
"pt_p" "O número máximo de sugestões já foi alcançado."
}

"Selected Map"
{
"#format" "{1:s},{2:s}"
"pt_p" "{1} escolheu {2}"
}

"No Votes"
{
"pt_p" "Nenhum voto recebido pelo Rock the Vote, será mantido o mapa atual."
}

"Current Map Stays"
{
"pt_p" "O mapa atual continua! O Rock the Vote assim decidiu!"
}

"Changing Maps"
{
"#format" "{1:s}"
"pt_p" "A mudar o mapa para {1}! O Rock the Vote assim decidiu!"
}

"Map Already Nominated"
{
"pt_p" "O mapa que escolheste já foi sugerido."
}

"Map Nominated"
{
"#format" "{1:s},{2:s}"
"pt_p" "{1} sugeriu {2} para o Rock the Vote."
}

"Nominate Title"
{
"pt_p" "Sugerir mapa:"
}

}
Then you need to script into your backend/SP file. But if you do not know how to do it, let me know.
How do you do the last part I didn't realize?
slumdog18 is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 04-09-2021 , 20:05   Re: Problems languages
Reply With Quote #9

Make sure to read the link I shared before.

Quote:
Originally Posted by Marttt View Post
I recommend you reading the Translation SM wiki page.
__________________
Marttt is offline
slumdog18
Junior Member
Join Date: Feb 2021
Old 04-09-2021 , 20:36   Re: Problems languages
Reply With Quote #10

Quote:
Originally Posted by Marttt View Post
Make sure to read the link I shared before.
I already put as the "SmokieCS" said, but missing the numbers, I'm not realizing that part of the plugin
slumdog18 is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:41.


Powered by vBulletin®
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Theme made by Freecode