From d258c58937a7389e8c9471cf61c68d2eadae9020 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Tue, 15 Jun 2010 21:14:11 +0000 Subject: Remove ugly RTL writing direction hack. Instead of hard coding the languages to be rendered as RTL make it dependent on a translation string. Translate the string LTR to RTL to switch to RTL layout. This is equivalent to the handling done in the i18n example for Qt Jambi and while not the best solution at least cleaner than hardcoded languages. Update hebrew translation for this which is currently the only RTL translation. lupdate all other translations. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26865 a1c6a512-1295-4272-9138-f99709370657 --- rbutil/rbutilqt/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'rbutil/rbutilqt/main.cpp') diff --git a/rbutil/rbutilqt/main.cpp b/rbutil/rbutilqt/main.cpp index 1fb83b328d..02c1e51d32 100644 --- a/rbutil/rbutilqt/main.cpp +++ b/rbutil/rbutilqt/main.cpp @@ -65,7 +65,10 @@ int main( int argc, char ** argv ) { delete user; app.installTranslator(&translator); app.installTranslator(&qttrans); - if(applang.startsWith("he")) + //: This string is used to indicate the writing direction. Translate it + //: to "RTL" (without quotes) for RTL languages. Anything else will get + //: treated as LTR language. + if(QObject::tr("LTR") == "RTL") app.setLayoutDirection(Qt::RightToLeft); RbUtilQt window(0); -- cgit v1.2.3