Page 1 of 2
[B3][Display] Scores Table has weird boxes next to box label
Posted: 09 Feb 2013, 22:49
by fng_thatoneguy
See screenshot
There are little white boxes (Unicode character?) to the left each of the boxes in the score table (Royal mode)...
They also appear next to the player stats at the bottom of the score table and the Points Limit specified for the server.
Re: [B3][Display] Scores Table has weird boxes next to box l
Posted: 09 Feb 2013, 22:57
by steeffeen
Yeah, it's not only my script
http://dl.dropbox.com/u/58886549/Screen ... Shot18.jpg
these squares are shown when loclized strings are passed to the user interface, but not in every case (dunno when exactly)
Re: [B3][Display] Scores Table has weird boxes next to box l
Posted: 09 Feb 2013, 23:06
by Darkminus
I got this problem while coding my script on Beta 2.
This is because they use TextLib::Compose to show things on the screen. I dunno the reason.
I got rid of that by using concatenation (Var1^Var2)
Maybe is it different in that case...
Hope I could help you guys!
Re: [B3][Display] Scores Table has weird boxes next to box l
Posted: 10 Feb 2013, 11:23
by Akbalder
I have this problem when I use the _("a string") function.
Should we modify our scripts or will it be fixed soon?
Re: [B3][Display] Scores Table has weird boxes next to box l
Posted: 10 Feb 2013, 16:16
by steeffeen
Akbalder wrote:I have this problem when I use the _("a string") function.
Should we modify our scripts or will it be fixed soon?
Exactly! _("Hello") is a string that will be translated and it seems the encoding screws things up...
i started changing my scripts but then i stopped, because nadeo should definitely fix this, otherwise we wouldn't be able to make localized scripts... i'm pretty sure they will do something about it as it's even broken in their own scripts
Re: [B3][Display] Scores Table has weird boxes next to box l
Posted: 11 Feb 2013, 17:28
by Eole
This bug appears when you concatenate multiple strings with translation at the same time. To avoid that you can use the Compose function of the TextLib library.
Code: Select all
declare MyTranslatedString = TextLib::Compose("%1 %2", _("First part of my string"), _("Second part of my string"))
We also added a new textprefix parameters that you can use in your <label />.
Code: Select all
<label textprefix="$s$f0f" text="My text" />
With this you won't have to do things like this anymore to style your text (it breaks the translation mechanism):
Code: Select all
declare MyString = "$s$f0f"^_("Translate me: ")^Player.Name;
declare Manialink = """<label text="{{{MyString}}}" />""";
Better:
Code: Select all
declare MyString = TextLib::Compose(_("Translate me: %1"), Player.Name);
declare Manialink = """<label textprefix="$s$f0f" text="{{{MyString}}}" />""";
Re: [B3][Display] Scores Table has weird boxes next to box l
Posted: 11 Feb 2013, 17:32
by steeffeen
Eole wrote:This bug appears when you concatenate multiple strings with translation at the same time. To avoid that you can use the Compose function of the TextLib library.
Code: Select all
declare MyTranslatedString = TextLib::Compose("%1 %2", _("First part of my string"), _("Second part of my string"))
We also added a new textprefix parameters that you can use in your <label />.
Code: Select all
<label textprefix="$s$f0f" text="My text" />
With this you won't have to do things like this anymore to style your text (it breaks the translation mechanism):
Code: Select all
declare MyString = "$s$f0f"^_("Translate me: ")^Player.Name;
declare Manialink = """<label text="{{{MyString}}}" />""";
Better:
Code: Select all
declare MyString = TextLib::Compose(_("Translate me: %1"), Player.Name);
declare Manialink = """<label textprefix="$s$f0f" text="{{{MyString}}}" />""";
Thanks for sharing the knowledge!

I hope the nadeo script will be updated soon?

Re: [B3][Display] Scores Table has weird boxes next to box l
Posted: 11 Feb 2013, 17:39
by Eole
They have been updated for the release. But we probably missed some translations. If you can report in which mode you saw it, it will help us to correct it faster.

Re: [B3][Display] Scores Table has weird boxes next to box l
Posted: 11 Feb 2013, 19:42
by fng_thatoneguy
fng_thatoneguy wrote:See screenshot
There are little white boxes (Unicode character?) to the left each of the boxes in the score table
(Royal mode)...
They also appear next to the player stats at the bottom of the score table and the Points Limit specified for the server.
Royal mode
Re: [B3][Display] Scores Table has weird boxes next to box l
Posted: 11 Feb 2013, 19:52
by Emilieng
Thanks for the screenshot.
It seems to be taken from an old version of Royal script.
This will be corrected as soon as this server is up to date.