درخواست نظر/نمایش یادکردهای چپ‌به‌راست در ویکی‌های راست‌به‌چپ

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 بپذیرند که به کمک آن جهت متن هر یادکرد را بتوان مشخص کرد. من این ویژگی را در سال ۲۰۰۸ درخواست کرده بودم چرا که در ویکی‌پدیای فارسی (که زبانی راست‌به‌چپ یا RTL است) ما بسیار از یادکردهایی استفاده می‌کنید که به زبان انگلیسی، آلمانی، فرانسوی و غیره هستند (که همگی زبان‌هایی چپ‌به‌راست یا LTR هستند). این ویژگی همچنین در ویکی‌های عبری و عربی (که زبانشان مانند فارسی راست‌به‌چپ است) بسیار خواهان دارد؛ به طور مشابه، ویکی‌هایی که زبانشان چپ‌به‌راست است (نظیر ویکی‌پدیای انگلیسی) نیز می‌توانند از این ویژگی بهره ببرند، و آن وقتی است که بخواهند منابعی به زبان‌های راست‌به‌چپ نظیر عربی یا فارسی را یادکرد کنند.

برای نهایی کردن این راه حل، ما می‌خواهیم از اجتماع ویکی‌مدیا (به خصوص ویکی‌های راست‌به‌چپ، اما در اصل از تمام اجتماع) بازخورد بگیریم که کدام روش را برای برنامه‌نویسی به کار ببندیم. لطفاً به تصویر زیر نگاه کنید:

Options
Options

این تصویر از یک ویکی آزمایشی در زبانی راست‌به‌چپ (در اینجا، فارسی) گرفته شده‌است. من عمداً بیشتر متن را به انگلیسی نوشته‌ام تا برای بیشتر کاربران قابل فهم باشد.

یادکردهای اول و سوم، چپ‌به‌راست هستند (در جهت عکس متن ویکی)؛ یادکرد دومی راست‌به‌چپ است و فقط برای مقایسه آورده شده‌است.

یادکرد اول گزینهٔ نخست را نمایش می‌دهد که عبارت است از برعکس کردن کل این مورد از فهرست یادکردها و نمایش کل آن به صورت چپ‌به‌راست. در این حالت، شماره‌گذاری فهرست نیز موقتاً برعکس می‌شود، و برخی این را دوست ندارند، اما خوبی این روش آن است که شمارهٔ یادکرد «پیش از» متن یادکرد می‌آید، درست همانگونه که در تمام زبان‌های چپ‌به‌راست می‌بینیم.

یادکرد سومی گزینهٔ دوم را نمایش می‌دهد که عبارت است از وارونه کردن متن یادکرد بدون تغییر جهت شماره‌های فهرست. در اینجا دقت کنید که در عبارت «Some LTR text.‎» نقطهٔ آخر جمله «به درستی» بعد از آن جمله (یعنی در منتهی‌الیه سمت راست) نمایش داده شده‌است. اما پیوند یادکرد (فلش آبی رنگ) و شمارهٔ فهرست «پس از» متن یادکرد نمایش می‌یابند و این برای برخی مورد پسند نیست.

هدف این نظرخواهی آن است که از اجتماع ویکی‌نویسان بخواهیم نظر خود را راجع به این که کدام گزینه را انتخاب کنیم بنویسند. در حالت ایده‌آل، گزینه‌ای انتخاب خواهد شد که صرفاً بیشتر موافقان را ندارد بلکه با روش‌های رایج نمایش پانویس و منابع در متون چاپی زبان‌های راست به چپ (مثلاً کتاب‌های فارسی، مقالات عربی، روزنامه‌های عبری و غیره) نیز مطابقت دارد؛ از این رو از کاربران خواهش می‌کنیم که به همراه نظرشان، مثال‌هایی از این متون نیز ارائه کنند. حجت (بحث) 21:02, ۱۹ ژانویه ۲۰۱۷، ۲۱:۰۲ (UTC)

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]