AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Solved [CSGO] Broken translation! (https://forums.alliedmods.net/showthread.php?t=303614)

butare 12-14-2017 23:00

[CSGO] Broken translation!
 
So I'm working on addon for mapchooser and run into the problem with translations, so here's line where it gets strange:
PHP Code:

...
PrintToChatAll("[SM] %t""Nextmap Voting Finished"displayName, (RoundToFloor(float(item_info[0][VOTEINFO_ITEM_VOTES])/float(num_votes)*100)), num_votes"Map Tier"sTier);
... 

Everything here except "Map Tier", sTier were already in mapchooser. And here's my translate file:
PHP Code:

...
"Nextmap Voting Finished"
{
    
"#format"        "{1:s},{2:i},{3:i},{4:t}"
    "en"            "Map voting has finished. The next map will be {1} ({4}). (Received {2}%% of {3} votes)"
}
...
"Map Tier"
{
    
"#format"    "{1:s}"
    "en"        "{1} Tier"
}
... 

And that what I get ingame:
https://i.imgur.com/2wCvQ9T.png

But, if I replace some entries, it will work fine. Like that:
PHP Code:

PrintToChatAll("[SM] %t""Nextmap Voting Finished"displayName"Map Tier"sTier, (RoundToFloor(float(item_info[0][VOTEINFO_ITEM_VOTES])/float(num_votes)*100)), num_votes); 

And translate file:
PHP Code:

...
"Nextmap Voting Finished"
{
    
"#format"        "{1:s},{2:t},{3:i},{4:i}"
    "en"            "Map voting has finished. The next map will be {1} ({2}). (Received {3}%% of {4} votes)"
}
...
"Map Tier"
{
    
"#format"    "{1:s}"
    "en"        "{1} Tier"
}
... 

It will look like this:
https://i.imgur.com/fSYm8lP.png

What's the problem? Is it a bug or am I blind:cry:?

Also here it works perfectly:
PHP Code:

...
PrintToChatAll("[SM] %t""Nextmap Voting Finished"displayNameRoundToFloor(float(item_info[0][VOTEINFO_ITEM_VOTES])/float(num_votes)*100), num_votes"No Tier");
... 

And translate file:
PHP Code:

...
"Nextmap Voting Finished"
{
    
"#format"        "{1:s},{2:i},{3:i},{4:t}"
    "en"            "Map voting has finished. The next map will be {1} ({4}). (Received {2}%% of {3} votes)"
}
...
"No Tier"
{
    
"en"        "No Tier"
}
... 


Peace-Maker 12-16-2017 08:35

Re: [CSGO] Broken translation!
 
Nesting phrases where the subphrase has parameters isn't supported right now.

https://bugs.alliedmods.net/show_bug.cgi?id=6146
https://bugs.alliedmods.net/show_bug.cgi?id=4803

butare 12-16-2017 15:19

Re: [CSGO] Broken translation!
 
Quote:

Originally Posted by Peace-Maker (Post 2566560)
Nesting phrases where the subphrase has parameters isn't supported right now.

https://bugs.alliedmods.net/show_bug.cgi?id=6146
https://bugs.alliedmods.net/show_bug.cgi?id=4803

Okay then... Thx for answering


All times are GMT -4. The time now is 23:07.

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