Implement RTL support
Bug #1307356 reported by
GunChleoc
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
widelands |
Won't Fix
|
Undecided
|
GunChleoc |
Bug Description
Support RTL scripts (Arabic, Devanagari, Farsi, Hebrew etc.)
We need to:
1. Reverse the order of GUI elements
2. Switch right-align and left-align for all text elements
3. Find font sets (c.f. https:/
4. Some changes in the font renderers will be needed (c.f. https:/
Related branches
lp:~widelands-dev/widelands/rtl-reverse-gui
- SirVer: Approve
-
Diff: 1721 lines (+404/-648)10 files modifiedcampaigns/atl01.wmf/scripting/texts.lua (+36/-63)
campaigns/emp01.wmf/scripting/texts.lua (+12/-10)
campaigns/emp02.wmf/scripting/texts.lua (+21/-17)
campaigns/t01.wmf/scripting/texts.lua (+20/-20)
campaigns/t02.wmf/scripting/mission_thread_texts.lua (+27/-33)
campaigns/t03.wmf/scripting/texts.lua (+39/-42)
campaigns/tutorial01.wmf/scripting/texts.lua (+205/-453)
maps/Plateau.wmf/scripting/texts.lua (+3/-7)
scripting/format_scenario.lua (+37/-0)
src/ui_fsmenu/mapselect.cc (+4/-3)
lp:~widelands-dev/widelands/table_align
- SirVer: Approve
-
Diff: 139 lines (+39/-10)3 files modifiedsrc/graphic/text/bidi.cc (+5/-3)
src/graphic/text/bidi.h (+2/-1)
src/ui_basic/table.cc (+32/-6)
lp:~widelands-dev/widelands/listselect
- TiborB: Approve
- kaputtnik (community): Approve (testing)
-
Diff: 2601 lines (+649/-507)50 files modifieddata/i18n/fonts.lua (+8/-0)
src/editor/ui_menus/editor_main_menu_load_or_save_map.cc (+2/-2)
src/editor/ui_menus/editor_main_menu_map_options.cc (+26/-21)
src/editor/ui_menus/editor_main_menu_map_options.h (+1/-1)
src/editor/ui_menus/editor_main_menu_new_map.cc (+1/-1)
src/editor/ui_menus/editor_main_menu_random_map.cc (+3/-2)
src/editor/ui_menus/editor_main_menu_save_map_make_directory.cc (+2/-2)
src/graphic/align.cc (+1/-1)
src/graphic/font.cc (+1/-1)
src/graphic/font_handler1.cc (+10/-8)
src/graphic/font_handler1.h (+1/-1)
src/graphic/richtext.cc (+1/-1)
src/graphic/text/bidi.cc (+100/-73)
src/graphic/text/bidi.h (+6/-1)
src/graphic/text/font_set.cc (+108/-60)
src/graphic/text/font_set.h (+49/-9)
src/graphic/text/rt_render.cc (+172/-157)
src/graphic/text/rt_render.h (+2/-26)
src/graphic/text/sdl_ttf_font.cc (+7/-12)
src/graphic/text/sdl_ttf_font.h (+27/-1)
src/graphic/text/test/CMakeLists.txt (+1/-0)
src/graphic/text/test/render.cc (+4/-1)
src/graphic/text_layout.cc (+3/-3)
src/graphic/text_parser.cc (+3/-3)
src/graphic/wordwrap.cc (+1/-1)
src/ui_basic/button.cc (+2/-1)
src/ui_basic/checkbox.cc (+1/-1)
src/ui_basic/editbox.cc (+5/-4)
src/ui_basic/listselect.cc (+59/-52)
src/ui_basic/listselect.h (+6/-21)
src/ui_basic/messagebox.cc (+2/-2)
src/ui_basic/multilinetextarea.cc (+6/-2)
src/ui_basic/panel.cc (+1/-0)
src/ui_basic/progresswindow.cc (+2/-1)
src/ui_basic/slider.cc (+2/-2)
src/ui_basic/spinbox.cc (+2/-1)
src/ui_basic/table.cc (+5/-3)
src/ui_basic/textarea.cc (+2/-1)
src/ui_fsmenu/campaign_select.h (+0/-1)
src/ui_fsmenu/internet_lobby.cc (+0/-1)
src/ui_fsmenu/launch_mpg.h (+0/-1)
src/ui_fsmenu/launch_spg.h (+0/-1)
src/ui_fsmenu/load_map_or_game.cc (+0/-1)
src/ui_fsmenu/load_map_or_game.h (+0/-1)
src/ui_fsmenu/options.cc (+9/-15)
src/wui/actionconfirm.cc (+2/-2)
src/wui/building_statistics_menu.cc (+1/-1)
src/wui/game_objectives_menu.cc (+0/-1)
src/wui/login_box.cc (+2/-2)
src/wui/productionsitewindow.cc (+0/-1)
Changed in widelands: | |
assignee: | GunChleoc (gunchleoc) → Shevonar (shevonar) |
Changed in widelands: | |
status: | In Progress → Confirmed |
Changed in widelands: | |
status: | Incomplete → Confirmed |
Changed in widelands: | |
milestone: | none → build20-rc1 |
Changed in widelands: | |
assignee: | Shevonar (shevonar) → GunChleoc (gunchleoc) |
status: | Confirmed → In Progress |
Changed in widelands: | |
status: | In Progress → Triaged |
Changed in widelands: | |
milestone: | build20-rc1 → build21-rc1 |
To post a comment you must log in.
I have started working on 1. in this branch: https:/ /code.launchpad .net/~widelands -dev/widelands/ rtl-reverse- gui
Could somebody please have a look if I'm on the right track and that I'm not missing an obvious way to do this more easily?
Also, I don't like this:
std::string ltr = _("LTR");
if (ltr.compare("LTR") != 0)
I'd prefer a global boolean switch that is read from the .po only once in i18n. I tried and failed, and every time I touch the file pretty much the whole project has to be compiled again, which is taking quite long. Maybe somebody who has a faster machine and knows more C++ than I do could take a look at this?