Wikidata:How to create Wikidata Tours/Test/ja

This page is a translated version of the page Wikidata:How to create Wikidata Tours/Test and the translation is 13% complete.

Deploy to test.wikidata.org

Now that you have a wiki page, JavaScript file and tour item you are ready to create a functioning draft of the finished tour. This will allow you to fix issues, gain feedback and generally refine the tour before the final deployment to main wikidata.org. You will need to complete the following steps in order get the tour up and running on test.wikidata.org.

Copy tour files to test.wikidata.org

Create new files on test.wikidata.org, using copies of the tour files that have been created on wikidata.org.

Copy the contents of each file listed below, and use it to create a new page at the location specified (replace TOUR NAME with the name of the tour you are deploying).

1. Tour Wiki Page

https://test.wikidata.org/wiki/Tours:ツアー名にコピー

2. Tour JavaScript File

Copy the JavaScript file from your User namespace to https://test.wikidata.org/wiki/MediaWiki:Guidedtour-tour-wbTOUR NAME.

User namespace
(JavaScript step)
MediaWiki namespace test.wikidata.org
(Current step)
MediaWiki namespace www.wikidata.org
(Publish step)

3. Tour Wikidata item'

Create a new item on test.wikidata.org, or make a note of an existing tour item that can be used. You should never share Wikidata items between multiple tours on main wikidata.org, but it's fine to do this on test.wikidata.org.

JavaScriptファイル内のすべてのアイテムとプロパティを置き換えます

wikidata.orgとtest.wikidata.orgには同じプロパティとアイテムがないため、JavaScriptファイルで参照されているすべてのプロパティとアイテムを「一時的に」置き換える必要があります。

The only parts of the file you need change are:

  1. tourEntityId - Change to the test.wikidata item you wish to use
  2. newData - Change all references to properties and items in the initial data added to the item.

For each change, you should leave the original property or item in a comment at the end of the line. You will need to put these back to the original values once the tour is deployed to main wikidata.org.

For example, the snippet below shows one statement added as part of the newData object. The property on line 3 and the item on 7 have been replaced with a test.wikidata.org equivalents, with the original values to use on main wikidata.org left in the comment at the end of the line.

"mainsnak": {
    "snaktype": "value",
    "property": "P39", // "P31"
    "datavalue": {
        "value": {
            "entity-type": "item",
            "id": "Q497", // "Q24699794"
            },
            "type": "wikibase-entityid"
    },
    "datatype": "wikibase-item"
}
Important: When replacing properties you will need to make sure that they have the correct data type.

For example, when replacing coordinate location (P625) with a test.wikidata equivalent, you would need to make sure that the property has data type "Geographic coordinates" or the startup data will be rejected. In this case, you can find the exact equivalent property P125 on test.wikidata.org. If you can't find an exact match, any property of the correct data type will allow the tour to load for testing. Just go to https://test.wikidata.org/wiki/Special:ListProperties, select the data type you need and click the "find" button to generate a list of options.

When replacing items, there are no issues with datatype so any valid item will do. However, it's advisable to create or choose an item with the same label as the equivalent as wikidata item as this will help test the tour in a more realistic context.

Test and improve

You should now be able to load the tour for testing using a URL of the following format:

https://test.wikidata.org/w/index.php?title=TOUR ITEM&tour=TOUR NAME

Replace TOUR ITEM and TOUR NAME with the values specified in the tour JavaScript file. If the tour does not load at this point, check the Troubleshooting section for help identifying and fixing the problem.

ツアーを公開する前に、ツアーをテストするように人々に依頼することが重要です。そうすることで、エラーを見つけて、新しいユーザーにとって手順が明確であることを確認できます。 ツアーwikiページの作成者は、ツアーの動作を徹底的にチェックして、元の計画と一致していることを確認する必要があります。 注:JavaScriptファイルの内容を変更せずに、ツアーテキストとセクション見出しの名前を編集できます。