Jump to content

Contributors/Projects/Columns for references/ru

From mediawiki.org
This page is a translated version of the page Contributors/Projects/Columns for references and the translation is 28% complete.

По просьбе редакторов Википедии в MediaWiki добавляется новая функция. Длинные списки ссылок (созданные с помощью тегов ‎<ref>; их также называют цитатами или сносками в некоторых вики) автоматически отображаются в столбцах. The number of columns will be determined by the width of each reader's screen. This will improve Специальные возможности and make it easier for most people to read the references, especially on narrow or very wide screens. Short lists of references will not be affected.

Используйте обычный тег ‎<references /> на любой странице со большим количеством ссылок, чтобы увидеть эту функцию в любой вики, где эта функция была включена. Если вы не хотите, чтобы столбцы использовались на странице, используйте вместо этого этот код викиразметки: <references responsive="0" />

Расписание

The server-side software will change on the normal deployment train during the week of 14 March 2017. However, the effect will not normally be visible (except on MediaWiki.org where it is responsive by default[1]) until it is manually enabled for your particular wiki. WMF-hosted wikis that want this feature working locally can request a config change to enable it.

After the software is deployed, but before it is enabled on your wiki, you can manually invoke the feature on individual pages by using this wikitext code: <references responsive /> instead of the plain ‎<references /> tag or a local template.

Группы:

  • Wikiquotes: Monday, 24 July 2017

Взаимодействие с локальными шаблонами

Some Wikipedias have been using local templates such as {{reflist}} to create columns or add other formatting. These templates should be updated (or their use deprecated as redundant) before this change is manually enabled at your local wiki.

Как обновить локальный шаблон

Если вы хотите улучшить доступность

Consider defining the default behavior for the template as being the default behavior for the ‎<references /> tag and deprecating or removing parameters that define a fixed number of columns, regardless of screen size.

Если вы не хотите, чтобы текущее поведение шаблона изменилось

<references responsive /> will automatically wrap the list in <div class="mw-references-wrap">. With the feature enabled by default, any list with more than 10 references will also get the class mw-references-columns. In this mode, the references list is automatically split over multiple columns based on the available space on the screen. E.g. on narrow screens 1 or 2 columns, on wider screens 2 or 3. Given that this happens automatically, it is no longer necessary for editors to manually enable/disable the columns mode of a template.

Remember also that other customisations for the references list are best applied directly to the ol.references CSS selector in your wikis' MediaWiki:Common.css. Many wikis customise the font-size this way, for example. (No need to manually code it through a template). In case a DIV wrapper is needed for certain styles, the .mw-references-wrap CSS selector will apply to all references lists produced by <references responsive /> regardless of whether the columns were dynamically activated.

For compatibility with fixed-column layout, you can have the reflist and refhead templates make sure responsive mode is turned off with responsive=0 when a fixed number of columns is specified. You may also want edit relevant layout rules in your wiki's MediaWiki:Common.css to only match ol.references elements without a wrapping .mw-references-wrap parent in order to avoid repeated definitions of multi-column layout. This can be done in the CSS using e.g. a direct descendant > operator.

Запрос этой функциональности

To request that this feature be enabled at your local wiki, please file a Фабрикатор task by filling in this pre-formatted Phabricator task.

Alternatively, leave a message on the talk page. Please include a link to any local discussions or relevant templates in your requests.

Примечания