Bug 467323 - adding BiDi support into VDR (with patch)
Summary: adding BiDi support into VDR (with patch)
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: vdr
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-10-16 20:40 UTC by Muayyad Alsadi
Modified: 2008-10-25 08:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-10-25 08:31:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
add BiDi langugaes support to vdr (36.40 KB, patch)
2008-10-16 20:40 UTC, Muayyad Alsadi
no flags Details | Diff
modified vdr bidi patch (30.40 KB, patch)
2008-10-19 21:56 UTC, alrawab
no flags Details | Diff

Description Muayyad Alsadi 2008-10-16 20:40:50 UTC
Created attachment 320608 [details]
add BiDi langugaes support to vdr

Description of problem:
Arabic language and derived scripts and sister Semitic languages needs BiDi support appear correctly as they are written from right not left

Version-Release number of selected component (if applicable):
1.6

How reproducible:
alway

Additional info:
I was told that the provided patch was upstream and will appear in next release

Comment 1 alrawab 2008-10-16 21:26:50 UTC
(In reply to comment #0)
> Created an attachment (id=320608) [details]
> add BiDi langugaes support to vdr
> 
> Description of problem:
> Arabic language and derived scripts and sister Semitic languages needs BiDi
> support appear correctly as they are written from right not left
> 
> Version-Release number of selected component (if applicable):
> 1.6
> 
> How reproducible:
> alway
> 
> Additional info:
> I was told that the provided patch was upstream and will appear in next release

>(In reply to comment #0)
> Created an attachment (id=320608) [details]
> add BiDi langugaes support to vdr
> 
> Description of problem:
> Arabic language and derived scripts and sister Semitic languages needs BiDi
> support appear correctly as they are written from right not left
> 
> Version-Release number of selected component (if applicable):
> 1.6
> 
> How reproducible:
> alway
> 
> Additional info:
> I was told that the provided patch was upstream and will appear in next release
>any one had been test this patch
>alrawab

Comment 2 Ville Skyttä 2008-10-17 18:34:06 UTC
Questions copied from bug 467433: How does compiling with BIDI affect non-Arabic/Semitic language support in VDR? Do they still work as they used to?

What about plugins, does this patch affect them in any way?

Comment 3 Muayyad Alsadi 2008-10-18 14:32:40 UTC
it's the same patch, created by alrawab in bug #467433 as he made it for 1.6 but it will be upstreamed for 1.7

This patch is not supposed to affect them in any way, except adding fribid dependency and adding a .po file, BiDi stands for Bidirectional ie. to support both ways it's not supposed to affect other languages, but please test it with other locales just to make sure.

Comment 4 Ville Skyttä 2008-10-19 16:15:15 UTC
I skimmed through the patch, and it seems to me that it needs some work:

1) It contains a lot of unnecessary whitespace/comment only changes.

2) It adds some apparently unused defines (LINE_LEN, max).

3) It makes an apparently entirely unrelated change to cChannels::Load()'s AllowComment default value.

4) It changes all default OSD fonts (normal, small, fixed width) to Arial:Bold if compiled with BIDI.  Why?

5) Would be better to use pkgconfig instead of hardcoding fribidi includes and libs.

6) It adds some weird looking includes to various files that are not touched otherwise (eg. tools.c).

7) Adding "ar" to the front of LanguageCodeList probably isn't a good idea, better would be to add it as the last item (before NULL).

Comment 5 Muayyad Alsadi 2008-10-19 17:31:57 UTC
> I skimmed through the patch, and it seems to me that it needs some work:
thanks, the patch developer should answer you

but I'll try to help,
regarding 
> 4) It changes all default OSD fonts (normal, small, fixed width) to Arial:Bold if compiled with BIDI.  Why?

+#ifdef BIDI
+const char *DefaultFontOsd = "Arial:Bold";
+const char *DefaultFontSml = "Arial:Bold";
+const char *DefaultFontFix = "Arial:Bold";
+#else
 const char *DefaultFontOsd = "Sans Serif:Bold";
 const char *DefaultFontSml = "Sans Serif";
 const char *DefaultFontFix = "Courier:Bold";
-
+#endif


maybe on his system, no good-looking Arabic font is aliased to provide the standard Sans,Sans Serif and monospace
in Fedora we have good configuration if DeJaVu fonts are installed
so this portion of the patch can be ignored but we need to replace
 const char *DefaultFontFix = "Courier:Bold";
with the standard monospace font

> 7) Adding "ar" to the front of LanguageCodeList probably isn't a good idea,
better would be to add it as the last item (before NULL).

 const char *LanguageCodeList[] = {
+  "ar", 
   "eng,dos",
   "deu,ger",
   "slv,slo",
guessing an encoding by trying a sequence of well-defined encodings like UTF-8, UTF-16, ...etc will be broken if sequence contains an encoding like ISO-8859-X or windows codepage 125X
maybe one of those CodeLists contains one of such encodings
if so, then such encodings should be removed from all languages CodeList and adding Arabic at the end, if that is not the case, and they can't be removed, then this should not be forced at compile time and allow users to add encoding at run time

Comment 6 alrawab 2008-10-19 21:56:25 UTC
Created attachment 320827 [details]
modified vdr bidi patch

 
this is a new modified patch againest vdr-1.6.0
1-remove all unnecessary comments and changes
2-edit i18.c and move Arabic to the end so its not affect other languages as well
plugins translations 
3-remove the part concerning default font 
4-lib fribidi don't affect other languages (I test Russian , Italian and English).
Br,
Sis
alrawab

Comment 7 Ville Skyttä 2008-10-22 18:50:20 UTC
Thanks, that looks much cleaner.  I have some other queued VDR changes but I'll have a look at testing this soon.

The only thing I noticed about the patch is that it still hardcodes these:

    INCLUDES += -I/usr/include/fribidi
    LIBS += -lfribidi

This is most likely no problem in Fedora, but I bet Klaus would appreciate something like this better:

    INCLUDES += $(shell pkg-config fribidi --cflags)
    LIBS += $(shell pkg-config fribidi --libs)

No need to submit a new patch for this, I'll make the change if/when applying the patch.

Comment 8 alrawab 2008-10-23 23:38:52 UTC
sorry this patch cause freeze for vdr and refused from the program author
because to enable fribidi you must change a lot of the original code those concerning epg , recording and other plugins .
sorry this patch is not valid and add bidi support just announces
alrawab

Comment 9 Ville Skyttä 2008-10-24 06:16:59 UTC
Ok, thanks for the report, but:

> sorry this patch is not valid and add bidi support just announces

I'm afraid I don't understand what you mean by "and add bidi support just announces", could you rephrase?

Comment 10 alrawab 2008-10-24 10:42:39 UTC
hey
I'm sorry dude i meant nonsense .
To be realistic to do bidi in vdr we must do :
1-Reverse the direction of all menus
2-this will be dramatically affect the code (Reinvent the wheel).
3- fribidi is a for light jobs such translation of subtitles (such in mplayer and xbmc) but not for whole code.
4-sorry for disturbing you and i hope one of Arabic programmers do program like vdr support theire native language .
Br,
Sis
Dr alrawab

Comment 11 Ville Skyttä 2008-10-25 08:31:10 UTC
Ok, thanks for the info, closing as WONTFIX then.


Note You need to log in before you can comment on or make changes to this bug.