Wiki labels

From Meta, a Wikimedia project coordination wiki
Jump to: navigation, search
This page is a translated version of the page Wiki labels and the translation is 45% complete.

Outdated translations are marked like this.
Other languages:
العربية • ‎Deutsch • ‎English • ‎español • ‎فارسی • ‎français • ‎עברית • ‎magyar • ‎italiano • ‎日本語 • ‎polski • ‎پښتو • ‎português • ‎română • ‎русский • ‎українська • ‎اردو • ‎中文

Documentation FAQ Source code Bug tracker

整合到en:WP:LabelsWiki labels之接口的截图
Wiki labels gadget. 整合到en:WP:LabelsWiki labels之接口的截图

Wiki labels是用于“Wiki labels”维基专题的人工计算系统。为了完成困难的分析(衡量新来者质量随时间的变化)、培养智能的维基工具(如监测破坏、条目质量评级),我们需要编码数据,并完成许多其他工作。该人工计算系统正是为了简单快捷的合作编码。该系统由Mediawiki小工具/服务器完成,采用JavaScript、CSS和Python/Flask/Postgres。


小工具[edit]

Wiki labels OAuth认证请求的截图
OAuth authorization. Wiki labels OAuth认证请求的截图

安装工具的编者会发现, wiki labels“主”界面会以 单页应用程序 形式,在en:Wikipedia:Labels(或按本地设定)载入。编者可在该页面查看活跃的活动、工作集表请求、label版本,以及其他“任务”。

系统通过 mw:Extension:OAuth 整合到编辑的 MediaWiki 账户。在wiki label系统执行的操作,会关联到用户的中央账户。

安装[edit]

若安装小工具,请将下列JavaScript代码段粘贴到你的global.js页面。示例见 User:Wiki labeler/global.js用户列表)。

// Wiki-Labels [[File:User:EpochFail/WikiLabels.js]] (workaround for [[phab:T35355]])
mw.loader.load('//meta.wikimedia.org/w/index.php?title=MediaWiki:Gadget-WikiLabels-loader.js&action=raw&ctype=text/javascript');

访问你的本地“Wiki labels”计划页(如Wikipedia:Labels)并清除缓存。

Interface translations[edit]

Wiki labels is registered at translatewiki.net. Please see https://translatewiki.net/wiki/Translating:Revision_scoring to contribute translations.

服务器[edit]

Behind the gadget, a server manages "campaigns", "tasks", "worksets" and "labels". This server provides a Restful interface for accessing this data. There are 4 basic modules: auth, users, campaigns and forms. The server also provides some user-facing services for designing new forms and access to a stand-alone gadget.

Form builder[edit]

labels.wmflabs.org/form_builder

A form builder interface is provided for the development and testing of forms to support new labeling tasks. Forms fields are configured using a YAML format that reflects OOjs UI. Forms can be submitted for review.

A screenshot of the form builder.
Form builder. A screenshot of the form builder.

Stand-alone gadget[edit]

labels.wmflabs.org/gadget

In order to ease development and testing, we also provide access to the gadget via a single page app. If for some reason the on-wiki version of the gadget is malfunctioning, users can work from this interface.

A screenshot of the stand-alone gadget.
Stand-alone gadget. A screenshot of the stand-alone gadget.


Machine-readable paths[edit]

/campaigns/ - Lists wikis with available campaigns.


/campaigns/<wiki>/ - Lists out campaigns available for a wiki
  • Add ?campaign=stats to the query string to include statistics about a campaign in the response.


/campaigns/<wiki>/<campaign_id>/ - Returns data about a campaign.
  • Add ?tasks to the query string to include the campaign's tasks in the response
  • Add ?worksets to the query string to include the worksets for the campaign in the response. Specify ?worksets=stats to include completion statistics with the workset listings.
  • Add ?assign to the query string to request a new workset assignment for the current user. This will only work if (1) the user is logged in, (2) there's tasks available to be assigned and (3) the user doesn't already have an open workset assignment.
/campaigns/<wiki>/<campaign_id>/<workset_id>/ - Returns data about a workset
  • Add ?tasks to the query string to list out the tasks for this workset.
  • Add ?worksets=stats to include completion statistics with the workset listing.
  • Add ?campaign to the query string to include relevant campaign data and ?campaign=stats to also include campaign statistics.
  • Add ?abandon to the query string to release the incomplete tasks from this workset. This will only work if (1) the user is logged in and (2) the workset in question is assigned to the user. Only incomplete tasks will be released from the workset.
/campaigns/<wiki>/<campaign_id>/<workset_id>/<task_id>/ - Returns data about a particular task.
  • Add ?campaign to the query string to include relevant campaign data and ?campaign=stats to also include campaign statistics.
  • Add ?worksets to the query string to include relevant worksets' data and ?worksets=stats to also include workset statistics.
  • Add ?label=<encoded json> to the URL. E.g. campaigns/enwiki/1/1/1?label={"damaging":true,"good-faith":false}. This will only work if the user is logged in.
/users/ - Provides access to data from the point of view of a user


/users/<user_id>/ - Returns information about a user's activities
  • Add ?campaigns to the query string to return all campaigns that the user has been assigned worksets for. Specify ?campaigns=stats to also include campaign statistics.
  • Add ?worksets to the query string to return all worksets assigned to the user. Specify ?worksets=stats to also include workset statistics.
  • Add ?tasks to the query string to return all tasks assigned to the user. Note that labels applied by other users will be hidden from this view.
/users/<user_id>/<campaign_id>/ - Returns information about a user's activities within a campaign
  • Add ?campaigns=stats to the query string to include campaign statistics.
  • Add ?worksets to the query string to return all worksets assigned to the user. Specify ?worksets=stats to also include workset statistics.
  • Add ?tasks to the query string to return all tasks assigned to the user. Note that labels applied by other users will be hidden from this view.
/auth/ - Provides support for authentication of users.


/auth/initiate/ - Starts an OAuth handshake with MediaWiki.

It is recommended that this path is requested from a pop-up window.

/auth/callback/ - Used by MediaWiki to complete an OAuth handshake.

When a pop-up window is redirected here, it will be automatically closed.

/auth/whoami/ - Prints information about logged-in user

...

/auth/logout/ - Deletes session and forgets about user

...

/forms/ - Provides access to form configuration and internationalization

These forms can be loaded by the labels gadget.


/forms/<form_name> - Returns the form configuration

...



See also[edit]

References[edit]