Raised This Month: $12 Target: $400
 3% 

Solved [CSGO] Broken translation!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
butare
Senior Member
Join Date: Nov 2016
Old 12-14-2017 , 23:00   [CSGO] Broken translation!
Reply With Quote #1

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:


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:


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

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"
}
... 

Last edited by butare; 12-16-2017 at 15:19. Reason: Solved! I think...
butare is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 12-16-2017 , 08:35   Re: [CSGO] Broken translation!
Reply With Quote #2

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
__________________
Peace-Maker is offline
butare
Senior Member
Join Date: Nov 2016
Old 12-16-2017 , 15:19   Re: [CSGO] Broken translation!
Reply With Quote #3

Quote:
Originally Posted by Peace-Maker View Post
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
butare 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 08:30.


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