GNOME Bugzilla – Bug 679214
In an RTL (right to left) enabled OS, all menus are shown adjusted to the right
Last modified: 2016-06-26 16:44:06 UTC
Created attachment 217753 [details] Shows the reversed system pull-down menu In an RTL (right to left) enabled OS, all menus are shown adjusted to the right, even if the selected interface language is English. For example, the pull-down system menu (File, Edit, ...) is reversed (i.e. the File menu is the right most one). This makes it practically impossible to work, as the menus and dialogs are not where you expect them to be. I've encountered this issue on a Windows 7, 64 bit, Hebrew enabled system. I've read in the forums that others have encountered this issue on similar setups.
Could you please try to start gimp from a terminal (DOS prompt) after setting the environment variable LC_ALL (or LANG): set LC_ALL=en "%ProgramFiles%\GIMP 2\bin\gimp-2.8.exe"
Hi Massimo, It worked like a charm. Thank you so much for your great help, Ron
This is expected behaviour as defined by gtk. An RTL locale causes the layout direction to be RTL. Of course gimp could hack around this gtk behaviour, but imo, it is not the task of gimp. I suggest changing this to WONT FIX, since there is a simple workaround (changing the LC_ALL environment variable).
This behavior is abnormal in an RTL os. In every other application, the menus are not RTL aligned once you change the interface language to English (or any other non-RTL language). Indeed the LC_ALL workaround fixes the problem, but this means the users would have to Google it in order to fix the problem. Furthermore, less experienced users would not be able to fix this on their own. Thanks, Ron
I agree that this is a problem, though I am not sure what the solution is. I.e. if you are in a RTL locale where the interface has only been partially translated to your locale, what should be the layout direction? But in a case where the locale is LTR, which might be the case "when you change the interface language to English" (how do you do that exactly?), the layout direction obviously should be LTR. In any case, my claim is that it needs to be solved in gtk and it is not the responsibility of gimp to workaround the the gtk bug. Thus I suggest that you search for a similar gtk bug and and if not found, then refile this problem there.
Regarding your question about changing the interface language to English, I do it through GIMP's preferences: Edit->Preferences->Interface->Language I'm not sure this is a gtk bug, because VLC (which uses gtk, if I'm not mistaken) doesn't show this abnormal behavior. Also, I'm afraid didn't understand what you mean by "the interface has only been partially translated to your locale". The interface isn't partially translated to my locale. Thanks, Ron
I think this is an incomplete implementation of the new language-switching behavior (related to the fact that it isn't possible to override the language with environment variables anymore).
Ok. In that case I take back what I said about it being a gtk bug. I wasn't aware of the "interface->language" switch and about a change in the language override environment in gtk.
Confirming this for GIMP 2.8.2 on Win 7, 32 bit after setting the system regionale to various RTL languages.
Could this be related to bug 690535 ? Please check GIMP 2.8.6 and report back.
I have checked GIMP 2.8.6 on a Windows 8.1 with RTL enable, it was setup in English. It seems that all screens and menus are aligned to the right. The LC_All=en seems not to work in windows 8
Created attachment 263791 [details] [review] widget direction set to system locale, not user-set lang We can also reproduce the opposite on a non-RTL system: if the system is LTR (ex: English), but we set through preferences GIMP to a RTL language (ex: Arabic), menus are still LTR. But starting with `$ LANGUAGE=ar gimp-2.9` will have the menus correctly RTL. The problem is that GTK+ does the check of whether the current lang is RTL or not in a post-parse initialization during command line parsing. In our code, this happens more precisely when running g_option_context_parse() in main.c. Unfortunately at this time, we haven't loaded the config yet, hence haven't updated any user-set preference language. So the bug is only the order of the check. Unfortunately this order is pretty hard to change (at least in a clean way), because we need to do the command line parsing pretty much at the very start for various initialization to happen. Therefore the fix is to check again the language when we initialize our GUI (after we change to user-set lang). Unfortunately there is no GTK+ separate call to do this, so I basically reproduced the logics of the GTK+ code (they use a trick by using a fake po translation). I'll also propose a GTK+ patch in a separate report. But in the meantime, the attached patch will fix it in our existing code.
I've opened bug 720096 for GTK+ where I extracted the relevant code into a public function gtk_get_locale_direction(). If GTK+ accepts this patch, our code will get nicer. In the meantime, the current proposition is the only possible fix.
commit 735f00b886283f0a8fcee5ac9b414543f19a6ef4 Author: Jehan <jehan@girinstud.io> Date: Mon Dec 9 19:31:48 2013 +1300 Bug 679214 - widget direction set to system locale, not user-set lang In particular a RTL-localized OS, where the user sets GIMP to a LTR lang would still have a RTL UI (menus, etc.). And vice versa.
It is a bug, and I think Gimp can override it and fix it. I always delete ar language from C:\Program Files\GIMP 2\share\locale And it work fine.
Zaher > This was indeed a bug and this has been fixed since 2.8.12. This bug report is closed. So if you install the last version of GIMP (2.8.16), this should be all good. Or are you saying you are still experiencing the bug in GIMP 2.8.16?
Ah, stupid me, it is 2.8.0 here, I tested it wit 2.8.16 and work fine, Finally after years. And sorry for my mistake.