diff options
| author | JosJuice <josjuice@gmail.com> | 2020-06-02 22:22:48 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2020-06-02 22:24:49 +0200 |
| commit | f1ec4fb70a692b60b9744cae63d3da2dba0c63eb (patch) | |
| tree | 4835990e1085eba310eec6c7a3bc01515287a91a /Source | |
| parent | 74ae02f9794d939a941be04b9b48b6667886fa76 (diff) | |
DolphinQt: Enable RTL layout
Fixes https://bugs.dolphin-emu.org/issues/11508
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/DolphinQt/Translation.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt/Translation.cpp b/Source/Core/DolphinQt/Translation.cpp index 467e7f8acf..cb81a71f38 100644 --- a/Source/Core/DolphinQt/Translation.cpp +++ b/Source/Core/DolphinQt/Translation.cpp @@ -302,6 +302,17 @@ static bool TryInstallTranslator(const QString& exact_language_code) void Translation::Initialize() { +// Let the translation select the GUI directionality. This is intentionally excluded +// from compilation, since all that matters is that xgettext sees it. We could use +// QT_TRANSLATE_NOOP3 instead of tr, but that doesn't compile correctly when put +// on a line of its own, so we would need to exclude it from compilation anyway. +#if 0 + QGuiApplication::tr( + "QT_LAYOUT_DIRECTION", + "Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in " + "right-to-left languages (such as Hebrew and Arabic) to get proper widget layout."); +#endif + // Hook up Dolphin internal translation Common::RegisterStringTranslator( [](const char* text) { return QObject::tr(text).toStdString(); }); |
