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", displayName, RoundToFloor(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"
}
...