طلب تعليق/عرض استشهادات يسار-إلى-يمين في ويكي يمين-إلى-يسار

From Meta, a Wikimedia project coordination wiki
This page is a translated version of the page Request for comment/Displaying LTR citations on RTL wikis and the translation is 78% complete.
Outdated translations are marked like this.

The following request for comments is closed. based on final comment below, this seems to have been resolved. SJ81 (talk) 05:25, 3 December 2017 (UTC)[reply]


بمساعدةٍ من Eran، نحن قريبون جدًا من حلٍ سيسمح لوسوم <ref> قبول استخدام وسيط dir الذي سيسمح لنا تخصيص اتجاه كل استشهاد لوحده. طلبت هذه الميزة في 2008 لأننا في ويكيبيديا الفارسية (التي تستخدم لغةً من اليمين-إلى-اليسار أو اليسار-إلى-اليمين)، نستخدم استشهاداتٍ كثيرةٍ من لغاتٍ مثل الإنجليزية، أو الألمانية، أو الفرنسية وغيرها. التي جميعها لغاتٍ من اليسار-إلى-اليمين (LTR). هذه الميزة أيضًا مطلوبةٌ بشدّة في مواقع الويكي العبرية والعربية (التي من اليمين-إلى-اليسار كالفارسية) وشبيهاتها، جميع مواقع الويكي من اليسار-إلى-اليمين (كويكيبيديا الإنجليزية) يُمكنها الاستفادة من هذا أيضًا، متى ما أرادو استخدام استشهادٍ بمرجعٍ بلغةٍ من اليمين-إلى-اليسار كالعربية أو الفارسية.

لوضع اللمسات الأخيرة على هذا الحل، نحن نسعى للحصول على تعليقاتٍ من مجتمعات ويكيبيديا (خصوصًا، مواقع الويكي من اليمين-إلى-اليسار، ولكن أيضًا من المجتمع ككل) حول كيفية برمجة هذا الحل. فضلًا ألقِ نظرةً على لقطة الشاشة أدناه:

Options
Options

لقطة الشاشة هذه من ويكي اختبار تعمل بلغة من اليمين-إلى-اليسار (في هذه الحالة، الفارسية). أبقيت عمدًا أغلب النص باللغة الإنجليزية لتسهيل الفهم لأغلب المستخدمين.

الاستشهادان الأول والثالث هما من اليسار-إلى-اليمين (بعكس الاتجاه في الويكي)؛ أما الثاني فهو من اليمين-إلى-اليسار ويُعرض فقد للمقارنة.

الاستشهاد الأول يُظهر الخيار الأول الذي يقلب القائمة كلّها لتُعرض من اليسار-إلى-اليمين. بهذه الطريقة، يتم قلب ترقيم عناصر القائمة أيضًا، وهذا ما لا يروق للبعض، لكن الرقم يبقى "متبوعًا" بالاستشهاد، تمامًا مثل أي لغة من اليسار-إلى-اليمين.

الاستشهاد الثالث يُظهر الخيار الثاني الذي يقلب فقط ما بداخل عنصر القائمة. كما يُمكنك أن ترى، فإن النقطة في نهاية جملة "Some LTR text.". تُعرض بشكلٍ صحيحٍ في الجانب الأيمن في نهاية الجملة. مع ذلك، فإن وصلة الربط (السهم الأزرق) ورقم عنصر القائمة يظهران "بعد" الاستشهاد، وهذا ما يجده البعض غير مرغوبٍ فيه.

الهدف من طلب التعليق هذا هو سؤال المجتمع للإدلاء برأيه حول أيٍّ من الخيارين نختار. من أجل نتيجةٍ مثاليّة، نحن نرغب باختيار الخيار الذي لا يُفضّل فقط حسب التصويت. لكن أيضًا المدعوم بالأساليب المُستخدمة في المواد المنشورة في لغات اليمين-إلى-اليسار (الكتب الفارسية، أو المنشورات العربية، أو الصحف العبرية، وغيرها) لذا نطلب من المجتمع توفير أمثلةٍ لدعم وجهة نظرهم. Huji (talk) 21:02, 19 January 2017 (UTC)[reply]

Discussion

Out of the options suggested by Huji, I prefer number two: just setting the direction on the footnote's content, but not on the whole block element. This way, the alignment of the margin and of the footnote number is a little bit wrong, but it's not a big deal, and it does keep the consistency of numbering. Something very similar is practiced in some academic books in Hebrew, e.g. here, so we wouldn't be inventing something new. In a long list of footnotes having some numbers on the right and some on the left would be much worse.

If I'm allowed to fantasize, then my dream solution would be something like number one, but with automatic grouping of LTR and RTL footnotes. This way, in a long list of LTR and RTL footnotes the numbers will jump from one margin to the other only once, which is acceptable. I think that I saw something like this in some books, but I cannot find an example right now. This would already be possible now by creating separate <references /> groups, but that's a bit cumbersome, because it must be done manually, and the numbering would be separate and every number would have a group name added.

I would nevertheless love to have the ability to add a dir property to <references />. This would be useful for articles where all the references are in the same direction, which is different from the page's primary direction, for example an English Wikipedia article where all the footnotes are in Persian. --Amir E. Aharoni (talk) 13:49, 25 January 2017 (UTC)[reply]

@Amire80: Great comments. Note that the thing you wished for is currently achievable (almost), using the group attrib. See fa:ریزپرده as an example. But the citation numbers in text look funny (they all have the prefix for the group name).
And as for your latter request, even though <references /> doesn't take a dir param, you can simple wrap it in <div class="mw-content-rtl>..</div>
Hope that help Huji (talk) 05:03, 26 January 2017 (UTC)[reply]
Yeah, I know both things. I'd just love them to be nore automatic and robust. --Amir E. Aharoni (talk) 06:07, 26 January 2017 (UTC)[reply]
Hi. I strongly oppose option 2 because of the alignment problem. If the ltr references were ltr only, it could be painful but readable. But about 95% of ltr refs I saw in rtl wikis have some rtl inclusion, for example accessdate, and the result with rtl alignment, especially in multiline refs, is completely unreadable. It would be much better if there was an option 3 - ref numbers on the same right side as option 2, changeable alignment as option 1. But if isn't - option 1 is the answer. And of course, I thought a lot of time about automatic grouping, and it could be the ideal for me too. IKhitron (talk) 11:25, 26 January 2017 (UTC)[reply]
I prefer option no. 2. I think all the footnotes should be on the same side of the screen. It's difficult to compare it to a regular book page, since there they don't have room enough to span it to the other side of the page. Nevertheless, I think Amir's example is clear enough. Providing, of course, that all the technical problems, like automatic numbering, periods, adding text etc. are being solved. Tmima5 (talk) 09:45, 27 January 2017 (UTC)[reply]
I prefer option no. 1. Kotz (talk) 23:34, 28 January 2017 (UTC)[reply]
  • I saw in some old Hebrew books [1970s] examples for flipping the lists as option 1, but more modern books from recent years don't flip the numbers but only the content (option 2). Huji provided an example from Persian where the list numbers are flipped according to directionality (option 1)
  • As it seems that there is no clear consensus/convention here, I updated the patch to set a CSS class with directionality (mw-cite-dir-ltr/mw-cite-dir-ltr) which would allow users/sites to easily customize the view according to their preferences. By default the internal span is set with correct directionality (option 2) which is the minimum requirement for correct behavior in either case. For fa the list numbers may be flipped. eranroz (talk) 08:16, 18 February 2017 (UTC)[reply]