Arabic language issues lazarus / 10-Designer ---------------------------------------------------------------------- Zaher · 2012-08-19 14:08 I opened this topic to maintain the Arabic language, i used the forum because most Arabic users like use it, and it can send notification messages (Mantis not do that) I will use Arabic Language for that, sorry The maintainer for Arabic language who post it in the bug tracker Khaled Shagrouni ---------------------------------------------------------------------- Zaher · 2012-08-19 14:12 عند تحرير ايقونة البرنامج، زر نسخ قبله إشارة % من أدوات - "بناء لازاروس بالملمح" مالمقصود الملمح؟ مالمقصود بكلمة توصيف؟ احيانا تستعمل صيغ الأمر مثل "إلغاء الأمر" و أحيانا صيغة االمصدر "غلق"؟ ---------------------------------------------------------------------- a.atalla · 2012-08-19 16:19 هل هذه خاصة بالترجمة فقط ؟؟ هناك عدة علل خاص بالواجهات في وضعية  BidiMode-bdRightToLeft  ابلغت عن بعضها منذ مدة وتم حله وبقي البعض لم يحل هل يمكن مناقشتها هنا ... أم اﻷفضل فتح قسم فرعي للعربية في منتديات  Other Languages ؟؟؟ ---------------------------------------------------------------------- shagrouni · 2012-08-20 23:18 مرحبا شكرا أخي زاهر لفتح الموضوع، والشكر لأخي أحمد عطا الله للإهتمام، في الواقع لم أعلم بفتح زاهر للموضوع إلا من خلال الربط الذي وضعه أحمد في دلفي للعرب فشكرا له. هذه محاولة مبدئية لترجمة نصوص بيئة التطوير وملحقاتها في لازروس. وهي محاولة ناقصة من حيث الكم والكيف، والكثير من الترجمات التي قمت بها - سواء لجمل أو لمصطلحات - غير راض عنها شخصيا، ولكن لا بدّ من بداية، وبعدها لابدّ من جولات ومراجعات مرة بعد أخرى. بالنسبة ل: الملمح فالمقصود بها profile، أما توصيف فقصدت بها configuration مجرّد اجتهاد. أما بخصوص الاختيار بين اعتماد صيغ الأمر أو المصدر فأنا اخترت الأخير (مجموعة عرب ايز يعتمدون صيغة الأمر)، وأراها من وجهة نظر شخصية وليست موضوعية أنها الأكثر طواعية، خاصة وأن الكلمة بالإنكليزية تحتمل الاثنين مثل exit  و play. ---------------------------------------------------------------------- Zaher · 2012-08-21 12:17 Quote from: a.atalla on August 19, 2012, 06:19:35 pmهل هذه خاصة بالترجمة فقط ؟؟ هناك عدة علل خاص بالواجهات في وضعية  BidiMode-bdRightToLeft  ابلغت عن بعضها منذ مدة وتم حله وبقي البعض لم يحل هل يمكن مناقشتها هنا ... أم اﻷفضل فتح قسم فرعي للعربية في منتديات  Other Languages ؟؟؟ ضع كل شيء في الموضوع، حتى لا تشتت و إذا وضعت علة أيضا قم بادراجها هنا لنعلم عنها السبب بفتح الموضوع هو الاعلام الفوري عبر الايميل إذا كنت مشتركا في الموضوع مما يسهل علمية التخاطب @أخ خالد لا بأس بالنسبة للصيغ و لكنك فتحت علينا شغل كثير ---------------------------------------------------------------------- Ocye · 2012-08-21 14:52 Sorry, if I hijack this topic but maybe my question is related. Do you right-to-left guys want the menu position and all other UI elements aligned to the right as well? Maybe it was a rumor but I remember that controls are better standard aligned. Please give me some advice how to support right-to-left perfectly. ---------------------------------------------------------------------- a.atalla · 2012-08-21 15:54 Quote from: Ocye on August 21, 2012, 04:52:11 pmSorry, if I hijack this topic but maybe my question is related. Do you right-to-left guys want the menu position and all other UI elements aligned to the right as well? Maybe it was a rumor but I remember that controls are better standard aligned. Please give me some advice how to support right-to- left perfectly. Thanks for your interest , The answer for your question is yes for example i send a bug report about the TreeView it is not aligned correct in Arabic http://bugs.freepascal.org/view.php?id=22643  about the menu is also should be to the right and lazarus shows it weel in the IDE ---------------------------------------------------------------------- shagrouni · 2012-08-21 17:36 Currently the top main menu in the IDE is not aligned properly, it should be reversed, the most right item should be ‘File’ not ‘Help’. ---------------------------------------------------------------------- a.atalla · 2012-08-21 18:05 it is aligned here (version 1.1-svn)  but the components in each pallet tab should aligned to the right to and the tool buttons (which contain the green arrow for RUN ) should move from the left to right ---------------------------------------------------------------------- shagrouni · 2012-08-21 18:31 Strange! here what I have (screen shot attached), and its 1.1 svn: The form caption is RtoL aligned. The top menu while its aligned from right to left; the order of the items is not correct. The page control which contains the tools pallet is LtoR. ---------------------------------------------------------------------- Ocye · 2012-08-22 12:30 Quote from: a.atalla on August 21, 2012, 05:54:12 pmThe answer for your question is yes...Okay, I'll add a switch to my application. Actually, I'm looking for Farsi translation, which might be a good test for this option. Tabs (TPageControl) and toolbar controls are still left aligned. Is this correct? ---------------------------------------------------------------------- shagrouni · 2012-08-22 16:28 QuoteTabs (TPageControl) and toolbar controls are still left aligned. Is this correct?I am Using Windows 7 and the Page Control is left aligned. ---------------------------------------------------------------------- a.atalla · 2012-08-22 17:17 Mine is GTK2  on Ubuntu  12.04 and the page view is showing correct in Bidimode  righttoleft ---------------------------------------------------------------------- Zaher · 2012-08-23 18:02 Quote from: shagrouni on August 21, 2012, 08:31:47 pmStrange! here what I have (screen shot attached), and its 1.1 svn: The form caption is RtoL aligned. The top menu while its aligned from right to left; the order of the items is not correct. The page control which contains the tools pallet is LtoR. No problem about PageControl, the problem in MainMenu, i will try to reproduce it in simple application and fix it (ان شاء الله). ---------------------------------------------------------------------- BigChimp · 2012-12-07 09:05 Hi guys, Just found a message by Martin Friebe on the Lazarus mailing list: http://www.mail- archive.com/lazarus@lists.lazarus.freepascal.org/msg34715.html QuoteA while ago, I started adding support for mixed LTR/RTL  text in SynEdit. The actual display of RTL text now works (that is, if you have some arabic chars in the text, they display RTL, and the caret moves accordingly / caret between RTL and LTR always means caret at LTR). uf8 LTR/RTL markers are not supported. This is absolute basics only. Unfortunately with RTL came other unicode features, that sofar no one had missed. Those are at the very least - combining codepoints - ligatures - maybe reordering of codepoints. - other? They are tasks of different extent. And I need to find out what is mandatory, and what optional. So I can then decide, what does fit into my schedule. The current state is: - combining: Only Arabic has been done (but they should be complete). So none Arabic RTL will not work. - ligatures: see below - reordering: not researched, hopefully optional. "work" means, that the text is stable (except ligatures, only with workaround), and does not expand/shrink, when selecting text, or moving the caret. Also that the caret will be at the correct pos. A newly inserted char will be where the caret was. Can be tested by hitting the "end" key, and see if the caret is at the end of visual text. If SynEdit thinks the text is shorter/longer than the actual painted display, then there is an issue. ligatures: The editor does not handle ligatures yet. So it calculates 2 screen cells, when only one is needed. However a stable "workaround" exists (currently depends on config) On windows and windows only (others will be done, if that turns out to be any good). In Options / Editor / Display / set "Extra CHAR spacing" to 1 This will slightly widen the script, ignore that, its temporary. Requires a proper monospaced font. (Deja vu mono) What it will do: It will tell windows, that the ligature is expected to cover 2 display cells. Display: Arabic text is a script, glyphs are connected by a continuous line. The ligature will be in one cell, the next cell will be empty, except for the connecting line. Editing: The caret can be at either cell. Each cell stands for one of the 2 chars in the ligature. So the 2nd char can be edited, if the caret is at the empty cell ------------------ I need feedback from people who actually speak (or at least read and write) Arabic. I need to know, if the above situation is "useable". If so, then: - it can be fixed to work without the extra char spacing - on gtk, carbon, qt (well at least I hope) - combining can be added for other languages. If not, well I don't know yet. Thanks, BigChimp ---------------------------------------------------------------------- Avishai · 2012-12-07 10:57 For Window ONLY!  This code will mirror most TWinControls including TForm and make them function RightToLeft.  It solves many problems, but not all of them.  You should leave BiDiMode:= bdLeftToRight.  You should call RtlCtrl for each TWinControl.  You need to include 'Windows' in the Uses statement. A few of the known issues: TMenu/TPopupMenu Images, TBitBtn, TSpeedButton Images, TSynEdit, TButtonPanel... Edit:  I forgot to say that you MUST disable Themes for this to work.  Go to 'Project\Project Options' and UNCHECK 'Use manifest...'  If you do not then TWinControls that are RightToLeft will be Black and not usable. Code: [Select] uses Windows; const   RightToLeftLayout = $400000;   NoInheritLayout = $00100000; {===== RtlCtrl =====} procedure RtlCtrl(ACtrl: TObject); { Make TWinControl RightToLeft - Windows ONLY! } begin {$IfDef Windows}   if ACtrl is TWinControl then     with TWinControl(ACtrl) do begin       SetWindowLong(Handle, GWL_EXSTYLE, GetWindowLong(Handle, GWL_EXSTYLE)         or RightToLeftLayout or NoInheritLayout);   end; {$EndIf} end; {===== LtrCtrl =====} procedure LtrCtrl(ACtrl: TObject); { Make TWinControl LeftToRight - Windows ONLY! } begin {$IfDef Windows}   if ACtrl is TWinControl then     with ACtrl as TWinControl do begin       SetWindowLong(Handle, GWL_EXSTYLE, GetWindowLong(Handle, GWL_EXSTYLE)         and RightToLeftLayout and NoInheritLayout);   end; {$EndIf} end; ---------------------------------------------------------------------- vicot · 2012-12-27 21:03 I would like to know a couple of things: 1) which GUI toolkit supported by Lazarus do you recommend for Arabic and BiDi? 2) does it support writing Arabic text and English text on the same line? ---------------------------------------------------------------------- Martin_fr · 2012-12-28 22:34 As for the source-editor/SynEdit. Under Windows (currently only windows) you can define WithSynExperimentalCharWidth and recompile the IDE/SynEdit. Then you should be able to type mixed RTL/LTR