From kfm-devel Fri Dec 28 21:33:29 2001 From: Meni Livne Date: Fri, 28 Dec 2001 21:33:29 +0000 To: kfm-devel Subject: Re: Arabic Messages in KDE3 X-MARC-Message: https://marc.info/?l=kfm-devel&m=100957536029858 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--------------A5A2C46046D2798A8B944249" This is a multi-part message in MIME format. --------------A5A2C46046D2798A8B944249 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit On Fri, 28 Dec 2001 21:28:59, Isam Bayazidi wrote: > Simon Hausmann wrote: > > If it's just about changing the dir attribute then we could make it > > look like

...

and substitute it with 'rtl' or 'ltr' > > depending on the reverseLayout() property. (would be a bit messy, but > > the whole approach is anyway ;) > > even better, if the can be done that would be more > approprate, as the images will get mirrored as well .. Since having Konqueror's about page displayed right with RTL languages isn't just a matter of adding dir=rtl somewhere in the HTML file, as it requires changes to the stylesheet and mirroring of some of the images, here's my solution that requires minimum changes to the code. I'm attaching the patches to the files in kdebase/konqueror/about. This also requires adding some files there, which, in order for this message to be of reasonable size, you can get from http://www.kde.org/il/konq_about_rtl.tar.gz This includes the mirrored images which without them the page would simply look like a mess. If nobody objects, I will commit this. --------------A5A2C46046D2798A8B944249 Content-Type: text/plain; charset=us-ascii; name="konq_aboutpage.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="konq_aboutpage.patch" Index: konq_aboutpage.cc =================================================================== RCS file: /home/kde/kdebase/konqueror/about/konq_aboutpage.cc,v retrieving revision 1.41 diff -u -r1.41 konq_aboutpage.cc --- konq_aboutpage.cc 2001/12/21 09:34:19 1.41 +++ konq_aboutpage.cc 2001/12/28 13:25:53 @@ -84,7 +84,7 @@ if ( s_intro_html ) return *s_intro_html; - QString res = loadFile( locate( "data", "konqueror/about/intro.html" )); + QString res = loadFile( locate( "data", kapp->reverseLayout() ? "konqueror/about/intro_rtl.html" : "konqueror/about/intro.html" )); if ( res.isEmpty() ) return res; @@ -128,7 +128,7 @@ if ( s_specs_html ) return *s_specs_html; - QString res = loadFile( locate( "data", "konqueror/about/specs.html" )); + QString res = loadFile( locate( "data", kapp->reverseLayout() ? "konqueror/about/specs_rtl.html" : "konqueror/about/specs.html" )); if ( res.isEmpty() ) return res; @@ -184,7 +184,7 @@ .arg( i18n("Manual")) .arg( i18n("Popup")) .arg( i18n("(Short-) Automatic")) - .arg( i18n("Back to the Introduction").arg("intro.html") ) + .arg( i18n("Back to the Introduction").arg(kapp->reverseLayout() ? "intro_rtl.html" : "intro.html") ) ; @@ -198,7 +198,7 @@ if ( s_tips_html ) return *s_tips_html; - QString res = loadFile( locate( "data", "konqueror/about/tips.html" )); + QString res = loadFile( locate( "data", kapp->reverseLayout() ? "konqueror/about/tips_rtl.html" : "konqueror/about/tips.html" )); if ( res.isEmpty() ) return res; @@ -314,19 +314,19 @@ return; } - if ( url == QString::fromLatin1("intro.html") ) + if ( url == QString::fromLatin1("intro.html") || url == QString::fromLatin1("intro_rtl.html") ) { emit browserExtension()->openURLNotify(); serve( KonqAboutPageFactory::intro() ); return; } - else if ( url == QString::fromLatin1("specs.html") ) + else if ( url == QString::fromLatin1("specs.html") || url == QString::fromLatin1("specs_rtl.html") ) { emit browserExtension()->openURLNotify(); serve( KonqAboutPageFactory::specs() ); return; } - else if ( url == QString::fromLatin1("tips.html") ) + else if ( url == QString::fromLatin1("tips.html") || url == QString::fromLatin1("tips_rtl.html") ) { emit browserExtension()->openURLNotify(); serve( KonqAboutPageFactory::tips() ); --------------A5A2C46046D2798A8B944249 Content-Type: text/plain; charset=us-ascii; name="konq_about_makefile.am.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="konq_about_makefile.am.patch" Index: Makefile.am =================================================================== RCS file: /home/kde/kdebase/konqueror/about/Makefile.am,v retrieving revision 1.14 diff -u -r1.14 Makefile.am --- Makefile.am 2001/03/08 14:07:41 1.14 +++ Makefile.am 2001/12/28 13:23:57 @@ -15,4 +15,6 @@ bgtable.png gohome.png window_fullscreen.png history.png \ view_left_right.png openterm.png lightning.png\ intro.html konq.css konqueror.png lines.png pointers.gif shadow1.png \ - specs.html tips.html lines2.png kdelogo2.png more.png + specs.html tips.html lines2.png kdelogo2.png more.png \ + konq_rtl.css intro_rtl.html specs_rtl.html tips_rtl.html \ + background_rtl.png bgtable_rtl.png konqueror_rtl.png --------------A5A2C46046D2798A8B944249--