AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=58)
-   -   Solved Problems languages (https://forums.alliedmods.net/showthread.php?t=331737)

slumdog18 04-05-2021 08:36

Problems languages
 
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

Marttt 04-05-2021 08:42

Re: Problems languages
 
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)

slumdog18 04-05-2021 08:49

Re: Problems languages
 
Quote:

Originally Posted by Marttt (Post 2743112)
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:"
}

}

Marttt 04-05-2021 11:10

Re: Problems languages
 
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); 


slumdog18 04-05-2021 12:35

Re: Problems languages
 
Quote:

Originally Posted by Marttt (Post 2743124)
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?

Marttt 04-05-2021 16:50

Re: Problems languages
 
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.

SmokieCS 04-08-2021 05:45

Re: Problems languages
 
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.

slumdog18 04-09-2021 18:15

Re: Problems languages
 
Quote:

Originally Posted by SmokieCS (Post 2743402)
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?

Marttt 04-09-2021 19:05

Re: Problems languages
 
Make sure to read the link I shared before.

Quote:

Originally Posted by Marttt (Post 2743150)
I recommend you reading the Translation SM wiki page.


slumdog18 04-09-2021 19:36

Re: Problems languages
 
Quote:

Originally Posted by Marttt (Post 2743607)
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


All times are GMT -4. The time now is 20:36.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.