帮助:扩展:ProofreadPage/列出页面小部件
ProofreadPage has a user-friendly widget for editing pagelists , that is used within the Index editing form. It is not available by default, but can be enabled by wiki administrators with a small change to on-wiki configuration.
要使用小部件,首先打开索引页面并编辑。 Under the 'Pages' field there is a 'Preview pagelist' button along with a checkbox with which to enable the visual mode (explained below).
点击预览按钮,页面列表表格会在下方加载。 要进入小部件(任意模式),点击其中一个页码。 这会打开全尺寸对话框窗口。 注意,您不应该点击返回按钮来关闭此对话框,而应使用“X”(关闭)或“插入更改”按钮。
要在可视化和源代码模式间切换,关闭对话框并更改复选框(下次编辑索引页面时将记住您当前选择的模式)。
对话框窗口有5个部分:
- Top bar: close/cancel button; Index page title; and submit button.
- Top of left pane: details of the currently-selected page.
- Bottom of the left pane: The current page's scan image.
- Top of the right pane: the data entry form (either a wikitext text field, or a set of fields when in the visual mode).
- Bottom of the right pane: The pagelist preview, showing the currently-configured numbering that will be inserted back into the Index form when the dialog is closed.
可视化模式
- Click on the first page to open the pagelist dialog to that page.
- You can start on any page you like, but it is recommended to start at the beginning and progress through in order.
- Examine the image and check whether the numbering displayed in the top left info bar is the same as what’s on the original printed page.
- You might need to scroll down to see the page number.
- Some pages may not have a printed number, but still exist in the work’s pagination. Navigate to previous and following pages to check what the number should be.
- If it is, go to the next page.
- If it is not, change the number and its type in the form, and click ‘Update pagelist’.
- The pagelist will now show the new numbering for the whole work.
- If you select a non-numbering type such as ‘Cover’, the whole work will display as Cover; this is fine, and will be corrected in the next step.
- Go to the next page, and repeat from step 2 above.
- Often, you will be able to skip ahead if you know the numbering is going to be correct for a section of pages. For example, if you set the first page of an introduction to ‘roman’ and 1, then you might click on the tenth page after the current one, to see if it’s still part of the introduction.
源代码模式
The wikitext mode of the Pagelist widget is the same as editing the pagelist field in the Index editing form. See the Pagelist tag documentation for full details of the syntax.
配置(适用于wiki管理员)
To enable the pagelist widget, two changes are required to on-wiki configuration.
Firstly, "data": "pagelist"
should be added to the relevant field of MediaWiki:Proofreadpage_index_data_config
.
For example:
"Pages": {
"type": "string/line",
"size": 15,
"default": "\u003Cpagelist /\u003E",
"label": "Pages",
"header": false,
"help": "",
"data": "pagelist"
},
And secondly, the list of page labels should be defined in MediaWiki:Proofreadpage_pagelist_dropdown_values.json
.
Both the label
and data
parts of each option should be in the wiki's content language (except for Number
, roman
, and highroman
). For example:
[
{
"label": "highroman",
"data": "highroman"
},
{
"label": "roman",
"data": "roman"
},
{
"label": "number",
"data": "Number"
},
{
"label": "Cover",
"data": "Cover"
},
{
"label": "– (empty)",
"data": "-"
},
{
"label": "Table of Contents",
"data": "ToC"
},
{
"label": "Image",
"data": "img"
},
{
"label": "Add your parameter here",
"data": "Add your parameter here"
},
{
"label": "Add your parameter here",
"data": "Add your parameter here"
}
]
You may also want to translate the messages related to the widget over at translatewiki.net if they already haven't been translated to the language of the wiki.
Debugging (technical users and/or developers)
The Pagelist Widget visual mode contains a debugging module that pretty prints the internally stored markup each and every time a user clicks "Update Pagelist". This can help in debugging complex bugs that require multiple interactions as well as provide some insight into how the visual mode constructs the pagelist based on the data the user provides.
The debugging module can be enabled by running mw.storage.set( 'proofreadpage-pagelist-widget-visual-mode-debug', true );
in the browser javascript developer console.