Jump to content
MediaWiki

Content translation/Developers/Collections

From mediawiki.org

Content translation, as part of the suggestions filtering options, allow users to select a particular collection of articles to translate. These collections are defined by the community. For example, users within Content Translation can translate the contents listed in the Wiki99/Food page.

How to create a Collection

[edit ]
Screenshot of an example wikitext to create a collection on Meta-wiki.
  1. Create a page on Meta wiki
  2. Add a list of wikilinks to the Wikipedia articles to be include din the collection, using internal links like [[en:Human]].
    πŸ’‘ It does not matter how these wikilinks are presented. The important part is that they are in the page.
  3. Include a tag to mark the page as a collection: <page-collection> </page-collection>.
    πŸ’‘ The tag can be used as shown, with empty content inside the opening and closing tag. This will flag the page and all the wikilinks in the page will be considered.
  4. Save the page and wait for the system to process the collection (may take some time).

How to translate contents from a collection

[edit ]
  1. Access Content Translation
  2. Go to the suggestions tab and filter the suggestions selecting the "more" option.
  3. Select "Collections" and find your collection by browsing or searching.
  4. Once the collection has been selected, the suggestions provided to translate will be based on it.

How to access collections programmatically

[edit ]

The list of collections can be accessed using the recommendation API: https://api.wikimedia.org/service/lw/recommendation/api/v1/translation/page-collections

The pages form each collection can be listed using th eMediaWiki API (notice the "Wiki99/Food" collection name in the url): https://meta.wikimedia.org/wiki/Special:ApiSandbox#action=query&format=json&prop=iwlinks&titles=Wiki99%2Ffood&formatversion=2&iwprop=url&iwprefix=d&iwlimit=max

Bug report / Feature request

[edit ]

For bug reports or feature requests, you can reach the Recommendation API on Wikimedia Phabricator:

phabricator:tag/recommendation-api/

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /