Commons:Переименование файлов/Глобальное перемещение файлов

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search
This page is a translated version of a page Commons:File renaming/Global replace and the translation is 55% complete. Changes to the translation template, respectively the source language can be submitted through Commons:File renaming/Global replace and have to be approved by a translation administrator.

Shortcuts: GR • COM:GR

Скорее всего вы оказались здесь, перейдя по ссылке из описания правки. Обратите внимание: Эта правка не была сделана ботом. Она была совершена скриптом, который по умолчанию включён для всех участников Викисклада. Если перемещение было сделано переименовывающим файлы или администратором (проверить) в соответствии с нашими правилами, не блокируйте этого участника в своём проекте, поскольку это не помешает переименованию самого файла; блокировка лишь запретит участнику обновлять файловые ссылки. Нежелательные перемещения файлов пользователями, кроме ботов, могут быть запрещены фильтром AbuseFilter. Если кто-то использует инструмент неправильно или заменяет использование файл другим, конечно же, вы можете заблокировать этого участника. Неоднозначные переименования также могут оспариваться на Викискладе.

Обычная ссылка «Переименовать» из набора действий в этом проекте гаджетом заменяется ссылкой «Переименовать и заменить». После того, как файл переименовывается на Викискладе, его использования заменяются на во всех проектах Wikimedia с помощью гаджета JavaScript в браузере пользователя: на всех страницах, для которых сообщается об использовании файла, в исходном коде ищется имя файла, и File:Old name.ext меняется на File:New name.ext. Правки проводятся от учётной записи пользователя, переименовавшего медиафайл. С 2013 года этот расширенный функционал включён по умолчанию для всех переименовывающих файлы и администраторов. Если замена не осуществима, например, из-за слишком большого количества использований файла, ошибок редактирования или медленного соединения, то использования файла будут как и прежде заменены с помощью CommonsDelinker.

Why we implemented the JavaScript replacement under individual user accounts

We believe that every file mover and administrator is solely responsible for their own actions; and if they rename a file, they must also justify all edits that are caused by renaming a media file. Additionally, we occasionally encountered technical issues with our replacement bot, CommonsDelinker and not updating file usage is dangerous as, as soon as files are moved twice, there are chances of double redirects which are not resolved by MediaWiki and file usage could break, if not curated like this.

Also file renaming should bear some improvements to file names that we would like to share with our users.


Opting out an entire Wiki
If you are an Abuse Filter editor of a Wikimedia Wiki, or you are administrator (a user belonging to the sysop user group), you most likely have necessary permission for creating an Abuse Filter to prevent Commons Global Replace edits submitted by individual user accounts. You might have various reasons for doing so, for example to prevent edits that are not automatically patrolled. In case these edits are prevented, Commons Global Replace system will instruct CommonsDelinker (a global bot) which will then carry out the edit. It would be kind, though, if you would notify Wikimedia Commons about such opt-outs (and the reasons), as this will help us to understand our Media file's users better and we can design our software more efficiently and intelligently.

How to create a new filter

Convenience way

Navigate to Special:AbuseFilter/import on your wiki, insert the following text and press Импортировать данные:

{"row":{"af_id":"148","af_pattern":"(action === 'edit')\r\n\u0026 !('autopatrol' in user_rights)\r\n\u0026 (summary rlike '^\\(\\[\\[c\\:GR\\|GR\\]\\]\\)')","af_user":"16603","af_user_text":"Rillke","af_timestamp":"20150201145938","af_enabled":"1","af_comments":"Prevent non-autopatrolled users from replacing files on this wiki.\r\nReference: https://commons.wikimedia.org/wiki/Commons:File_renaming/Global_replace/Abuse_Filter","af_public_comments":"Disallow Commons Global Replace","af_hidden":"0","af_hit_count":"2","af_throttled":"0","af_deleted":"0","af_actions":"disallow","af_global":"0","af_group":"default"},"actions":{"disallow":{"action":"disallow","parameters":[""]}}}
Ex manus

Navigate to Special:AbuseFilter/new on your wiki. Fill-in the following values:

  • Описание:
(общедоступное) Disallow Commons Global Replace
  • Conditions:
    (action === 'edit')
    & !('autopatrol' in user_rights)
    & (summary rlike '^\(\[\[c\:GR\|GR\]\]\)')
    
  • Примечания:
    Prevent non-autopatrolled users from replacing files on this wiki.
    Reference: https://commons.wikimedia.org/wiki/Commons:File_renaming/Global_replace/Abuse_Filter
    
  • ☑ Включить этот фильтр
  • ☑ Запретить участнику выполнить запрашиваемое действие
Поиск и устранение неисправностей

You are a file mover or administrator and nothing is replaced with your user account? Then, it is likely that your browser or a browser add-on are the cause. A common issue is that cookies from third party sites are disabled (Firefox, Chrome, Internet Explorer).

While this is good for blocking advertising and enhances privacy, it prevents you from getting logged-in on all Wikimedia projects, which in turn is required for Global replace to work correctly. You may work around this by adding exceptions. However, note that the added exceptions may not be persistent in anonymous/private browsing mode and when website preferences are deleted, the list of exceptions is usually deleted as well. Some browsers are configured to delete website preferences as soon as they're closed.

Список доменов, с которых следует разрешить использование файлов cookie:

https://en.wikipedia.org
https://login.wikimedia.org
https://meta.wikimedia.org
https://en.wiktionary.org
https://en.wikibooks.org
https://en.wikiquote.org
https://en.wikisource.org
https://en.wikinews.org
https://en.wikiversity.org
https://www.mediawiki.org
https://www.wikidata.org
https://species.wikimedia.org
https://incubator.wikimedia.org
https://en.wikivoyage.org

Opting out as a Commons file mover or administrator

window.aqdCORSOptOut = true;
Gadget
Click on “Global replace” in the dropdown menu

If you have filemover right and you want to use the functionality manually, you can use this script with some extra options:

importScript('User:Perhelion/justReplace.js');

You may not use it for possible controversial replacements.

See also: Help:QuickDelete.