[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: Arabic Messages in KDE3
From:       Meni Livne <livne () kde ! org>
Date:       2001-12-28 21:33:29
[Download RAW message or body]

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 <p dir="%1">...</p> 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 <HTML dir="%1"> 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.

["konq_aboutpage.patch" (text/plain)]

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("<A HREF=\"%1\">Back</A> to the \
Introduction").arg("intro.html") ) +          .arg( i18n("<A HREF=\"%1\">Back</A> 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() );


["konq_about_makefile.am.patch" (text/plain)]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic