After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 573159 - rtl problems rendering tables of contents in yelp
rtl problems rendering tables of contents in yelp
Product: yelp
Classification: Applications
Component: XSLT
Other All
: Normal blocker
: ---
Assigned To: Yelp maintainers
Yelp maintainers
Depends on: 563559
Blocks: Arabic 570165
Reported: 2009-02-25 17:55 UTC by muayyad alsadi
Modified: 2011-06-20 00:07 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24

yelp showing man page categories (75.09 KB, image/png)
2009-02-25 17:58 UTC, muayyad alsadi

Description muayyad alsadi 2009-02-25 17:55:52 UTC
Please describe the problem:
open yelp in a right to left language locale
even after fixing docbook xsl the toc that yelp generate is still in LTR

Steps to reproduce:
1. LC_ALL=ar_JO.UTF-8 yelp
2. click any thing that have sub tocs like man pages

Actual results:
the tocs generated by yelp appears mirrored

Expected results:
translated tocs should to appear from right to left

Does this happen every time?

Other information:
Comment 1 muayyad alsadi 2009-02-25 17:58:13 UTC
Created attachment 129502 [details]
yelp showing man page categories
Comment 2 Shaun McCance 2009-03-02 05:59:44 UTC
Committed some fixes in revision 3225.  There are doubtless more problems, some of which should be handled in gnome-doc-utils (bug 563559).  I noticed, for instance, that English text mixed in with Arabic can get wonky punctuation placement.  See, for instance, the paragraph with MIME and PNG in ghelp:user-guide#glossary-1.

I'd like to keep this open as a tracker bug.  But could somebody with experience in an RTL language look things over to see if we can reduce the severity from blocker?  That is, is it good enough to make a release, or are there issues that are absolutely critical for 2.26?
Comment 3 muayyad alsadi 2009-03-04 16:42:25 UTC
how can I test them ?
could you please pass me a link to the xsl files ?
Comment 4 Shaun McCance 2009-03-04 17:12:57 UTC

But the XSLT for the contents aren't going to be very helpful for you.  Yelp dynamically populates an XML "file" in-memory for this stylesheet to process.

It really should be tested in Yelp.  Is there any way you could build and test the latest unstable Yelp release?
Comment 5 muayyad alsadi 2009-03-04 18:33:45 UTC
np. I'll try that
Comment 6 muayyad alsadi 2009-03-04 21:23:07 UTC
I test it and it seems that it works fine
both the xsl and the tocs in yelp are quite good

I have inspected several extra files and they look perfect

I'll take another look to
to give my final opinion

regarding the ugly looking MIME in comment #2
it's translator's fault look

      يعرّف نوع امتداد بريد إنترنت متعدد الأغراض "Multipurpose Internet Mail Extension" (MIME) تهيئة ملف ما. يسح نوع MIME التطبيقات بقرائة الملف. مثلا، يمكن أن يستخدم تطبيق بريد نوع MIME <literal>image/png</literal> ليعرف أن ملف رسوم شبكة متنقلّة "Portable Networks Graphic" (PNG) مرفق مع البريد.
is the translation for it

A Multipurpose Internet Mail Extension (MIME) type identifies
the format of a file. The MIME type enables applications to read the file.
For example, an email application can use the <literal>image/png</literal>
MIME type to detect that a Portable Networks Graphic (PNG) file is attached
to an email.

the problem is that it's an untaged text, so it's translator fault as
the rendered text which does not look good
يعرّف نوع امتداد بريد إنترنت متعدد الأغراض "Multipurpose Internet Mail Extension" (MIME) تهيئة ملف ما.
can be translated as any of the following
يعرّف نوع امتداد بريد إنترنت متعدد الأغراض "Multipurpose Internet Mail Extension" (أو اختصارا MIME) تهيئة ملف ما.
يعرّف نوع امتداد بريد إنترنت متعدد الأغراض (MIME) تهيئة ملف ما.
يعرّف نوع امتداد بريد إنترنت متعدد الأغراض ‎"Multipurpose Internet Mail Extension" (MIME) ‎ تهيئة ملف ما.
تعرّف MIME (أي "نوع امتداد بريد إنترنت متعدد الأغراض Multipurpose Internet Mail Extension") تهيئة ملف ما.

and all those alternative translations will look good

Comment 7 muayyad alsadi 2009-03-04 21:45:36 UTC

background-position: </xsl:text><xsl:value-of select="(192 - $help_icon_size) div 2"/><xsl:text>px 0px;

seems to be wrong because it centers the background image vertically but it set it to left at 0px
it could be replaced with
center </xsl:text><xsl:value-of select="$left"/><xsl:text>

background-position: </xsl:text><xsl:value-of select="(192 - $help_icon_size) div 2"/><xsl:text>px </xsl:text><xsl:value-of select="$left"/><xsl:text>

or something like that
Comment 8 Shaun McCance 2009-03-07 00:35:05 UTC
I don't see the problem.  It's centering the image horizontally, and it ought to be invariant to RTL issues (bearing in mind that 192px is the width of the div with the background).

Is this causing an actual problem I'm not seeing?
Comment 9 muayyad alsadi 2009-03-07 12:41:18 UTC
you are right

I thought it's Apx Bpx is vertical then horizontal,
but it's horizontal then vertical

I was mistaken
Comment 10 Paul Cutler 2009-06-18 17:29:55 UTC
Confirmed by Shaun in comments above, leaving open per his comment
Comment 11 Shaun McCance 2009-06-18 17:50:01 UTC
Setting NEEDINFO.  I think all the RTL issues are resolved.  I'd really like somebody in an RTL locale to hammer it.
Comment 12 André Klapper 2009-08-31 17:17:49 UTC
Removing gnome-target as per last comment.
Comment 13 Khaled Hosny 2009-11-26 22:52:16 UTC
Using yelp 2.28.0, Arabic pages (e.g. translated gnome documentation) are displayed correctly (TOC on the left, mirrored navigation arrows etc.) except the first page (yelp's first page), the layout still left-to-right.
Comment 14 Tobias Mueller 2010-03-29 11:32:38 UTC
Reopening as the last comment indicates that this is still an issue.
Comment 15 Shaun McCance 2011-06-20 00:07:36 UTC
Pretty sure all the RTL issues are fixed. Please file a new bug if there are
more problems.