Closed SafaAlfulaij closed 9 years ago
You should place qt_ar.qm
in /usr/share/qupzilla/locale
(maybe different on your distribution)
I think that this thing should be done automatically.
You may use:
app.setLayoutDirection(QLocale('localeCode').textDirection());
I don't see qt_ar.qm
anywhere in the QupZilla package filelist...
We don't need to do this, because layout direction is set by Qt after loading qt_*.qm
.
I don't see
qt_ar.qm
anywhere in the QupZilla package filelist...
It's not part of QupZilla source code, but it's there in Windows installer, I'm not sure about Linux packages. Also always you can find it in Qt SDK or by googling.
I've copied it and nothing changed. I suggest a game developers to use that line and it worked for them. Are you sure that Qt do that automatically?
I've copied it and nothing changed.
Are you sure it was loaded successfully? For example does Insert Unicode Character
within context-menu of location bar is translated to Arabic?
Note: The Qt version ofqt_ar.qm
and QupZilla (Help->About Qt) should be the same.
Are you sure that Qt do that automatically?
Yes
Are you sure it was loaded successfully? For example does Insert Unicode Character within context-menu of location bar is translated to Arabic?
This menu item is not available for Linux yet, It's a Qt5 problem.
Qt uses libxcb to communicate with X and thus the xcb platform plugin is responsible for part of the abstractions. one of those is indicating whether RTL extensions should be used. you're already using the xcb platform plugin. you just cannot enable the useRtlExtensionsyada flag on anything but Windows currently
I tried the Qt4 version and it got flipped. Maybe it's a problem with Qt5?
Oh... you are right it's a Qt5 issue.
BTW, the following workaround works correctly:
diff --git a/src/main/main.cpp b/src/main/main.cpp
index 070d42e..9939dbf 100644
--- a/src/main/main.cpp
+++ b/src/main/main.cpp
@@ -187,6 +187,7 @@ int main(int argc, char* argv[])
if (app.isClosing())
return 0;
+ app.setLayoutDirection(QApplication::tr("QT_LAYOUT_DIRECTION") == QLatin1String("RTL") ? Qt::RightToLeft : Qt::LeftToRight);
app.setProxyStyle(new ProxyStyle);
return app.exec();
@srazi Here's the screenshot:
Qt-5.4. Without the patch Qz looks like the OP's screenshot.
@pejakm Thanks for the test. I opened an upstream bug report: https://bugreports.qt-project.org/browse/QTBUG-43447
UPDATE: They moved the string to QCoreApplication.
BTW, Why don't you set the "document-start" and "document-end" translatable?
Also, Why don't QupZilla loads this file? ftp://ftp.qt-project.org/qt/l10n/index.html It says that I have to download/open it
BTW, Why don't you set the "document-start" and "document-end" translatable?
If you mean document-start
and document-end
in GreasMonkey
plugin then they are not translatable they are supported values of @run-at
.
Also, Why don't QupZilla loads this file? ftp://ftp.qt-project.org/qt/l10n/index.html
Please open another issue for this one.
If you mean document-start and document-end in GreasMonkey plugin then they are not translatable they are supported values of @run-at.
I mean in the settings dialog, Here: https://github.com/QupZilla/qupzilla/blob/478b5ddb84499148055ffb27f7f7666614f3356b/src/plugins/GreaseMonkey/settings/gm_settingsscriptinfo.cpp#L51 The values are got from an another cpp file.
That file is part of GreasMonkey
plugin, and as I said those are values and not translatable strings.
As in the screenshot, The UI doesn't reverse. I tried the -reverse option and it worked great.