Hi to all, I'm new here so sorry if this is not exactly the good place to ask.
in STK we are having a problem with RightToLeft languages , how they show up.
So Auria as found a fix for that and has submitted a patch, but there is still no news if it has been accepted or not.
https://sourceforge.net/tracker/?func=d ... tid=540678
would it be possible to get an answer as to confirm that it will be included in the next version ?
thank you
jorge
[fixed]RTL hebrew language bug report and fix
Ok.
Before my patch :
Uploaded with ImageShack.us
After my patch :
Uploaded with ImageShack.us
You can view the PO file at :
http://supertuxkart.svn.sourceforge.net ... iew=markup
The strings visible in this screenshot are :
The test font "Rahel" may be found at
http://supertuxkart.svn.sourceforge.net ... ata/fonts/
Before my patch :
Uploaded with ImageShack.us
After my patch :
Uploaded with ImageShack.us
You can view the PO file at :
http://supertuxkart.svn.sourceforge.net ... iew=markup
The strings visible in this screenshot are :
If you wish to test my patch without using STK, you will need to use fribidi in addition to gettext to get proper unicode BIDi support and revert the charactersmsgid "Avoid bananas!"
msgid "Collect blue boxes : they will give you weapons or other powerups"
msgid "Collecting nitro allows you to get speed boosts whenever you wish by pressing the appropriate key. You can see your current level of nitro in the bar at the right of the game screen."
msgid "If you see a button with a lock like this one, you need to complete a challenge to unlock it."
The test font "Rahel" may be found at
http://supertuxkart.svn.sourceforge.net ... ata/fonts/
Sorry for the double post, I found a much simpler way to test. Indeed we can simply fake "RTL English".
I patched the GUI sample :
And don't worry, I'm not pressuring you mjminfo, our Hebrew translator, is just very eager to play STK in Hebrew, that's why he opened a thread here
I patched the GUI sample :
Code: Select all
Index: examples/05.UserInterface/main.cpp
===================================================================
--- examples/05.UserInterface/main.cpp (revision 3549)
+++ examples/05.UserInterface/main.cpp (working copy)
@@ -200,12 +200,30 @@
the button in the event receiver.
*/
+ const wchar_t* text = L".enigne eht gnilipmocer/gniyfidom fo deen eht tuohtiw ,emitnur ta thcilrrI ot slairetam wen dda ot elbissop si ti ,hguone ton era slairetam"
+ "ni tliub eht fi ,revewoH .slairetam kcab llaf sedivorp enigne eht ,od ot elba ton si erawdrah eht serutaef sdeen hcihw lairetam a gnisu nehw dna"
+ "smelborp tuohtiw enecs a ni slairetam fo sepyt eseht xim ot elbissop si tI .gnireffo si erawdrah d3 syadot (elpmaxe rof slairetam dethgil lexip rep"
+ "xallarap/deppam lamron) enilepip elbammargorp eht no gniyler era emos dna (elpmaxe rof yrtemoeg deppam thgil) enilepip noitcnuf dexif eht no"
+ "desab era slairetam emoS .enigne eht ni elbaliava slairetam ni tliub nommoc fo stol era ereht ,ylkciuq stnemnorivne citsilaer etaerc ot elba eb oT"
+
+ ".eerf yletelpmoc s'tI :lla fo tseb dnA .no os dna ,aul ,nohtyp ,cisab ,ybur"
+ ",lrep ,avaj rof sgnidnib egaugnal ,srotide ,slairotut ,sreyal dlrow ,sretropxe ,sreredner latrop ,sreredner niarret evitanretla ekil ,bew eht revo lla"
+ "thcilrrI rof stnemecnahne dnif nac uoY .enigne eht esu taht tnempoleved ni stcejorp fo stol era ereht dna ,ytinummoc evitca eguh a tog ev'eW"
+ ".senigne d3 laicremmoc ni"
+ "dnuof eb nac hcihw serutaef tra-eht-fo-etats eht fo lla sah dna ,reredner erawtfos nwo sti dna LGnepO ,D3D gnisu ,mroftalp-ssorc yletelpmoc si tI"
+ ".segaugnal TEN. rof elbaliava osla dna ++C ni elbasu dna nettirw enigne D3 emitlaer ecnamrofrep hgih ecruos nepo na si enignE thcilrrI ehT"
+ "enignE thcilrrI eht ot emocleW";
+
env->addButton(rect<s32>(10,240,110,240 + 32), 0, GUI_ID_QUIT_BUTTON,
L"Quit", L"Exits Program");
env->addButton(rect<s32>(10,280,110,280 + 32), 0, GUI_ID_NEW_WINDOW_BUTTON,
L"New Window", L"Launches a new Window");
env->addButton(rect<s32>(10,320,110,320 + 32), 0, GUI_ID_FILE_OPEN_BUTTON,
L"File Open", L"Opens a file");
+
+ IGUIStaticText* txt = env->addStaticText(text, rect<s32>(120,200,600,475), false /* border */,
+ true /* word wrap */, NULL /* parent */);
+ txt->setRightToLeft(true); // This is new from my patch
/*
Now, we add a static text and a scrollbar, which modifies the
*sigh* I guess it's bad style to complain after I didn't work on it for 2 weeks (still fighting with another problem), but I would prefer using an enum not a bool for the layout direction (someone might want top-to-bottom direction next), would anyone complain if I change that again (when I find time on weekend)?
(Also I suppose we need a more general text-formatting and maybe layout class some day, because right now it means this will work for IGUIStaticText, but not for any other place where texts are used, although most of them don't support multiple-lines yet, so I guess it doesn't matter yet too much)
(Also I suppose we need a more general text-formatting and maybe layout class some day, because right now it means this will work for IGUIStaticText, but not for any other place where texts are used, although most of them don't support multiple-lines yet, so I guess it doesn't matter yet too much)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Well, I guess we cannot support any other direction with the current approach. But having an enum makes the default case also more visible (while it's 'the opposite of right-to-left' now).
Extracting the layout routines would be very nice. But I think most of the GUI classes don't have such kind of re-use anywhere. Which makes me refuse to work on those things usually
Extracting the layout routines would be very nice. But I think most of the GUI classes don't have such kind of re-use anywhere. Which makes me refuse to work on those things usually