![]() | This proposal is part of "A Dozen Visions for Wikitext". Shortcuts: Versioning - Grunge - Markdown - HTML-only wikis - Extension tag fragments - Syntax uniformity - Colon replacement - Backticks - Syntax for Discussions - #media - #lang - #balance - Long arguments - Variable-length/structured arguments - Annotations - Visual Templates - Page Description Language - Native Script Editing - One Wiki |
Let's consider how we annotate content for translation on a multilingual wiki. This example is taken from mw:Help:Extension:Translate/Page_translation_example. We start with some article content:
Fréttinga is a small municipality in MungoLand, located on the BaMungo island.
It hosts a population of about 400 people. It has some agriculture and fishing.
Tourists like to visit it in the summer time.
== Services ==
It doesn't have many services. There is a shop, and a car ferry visits the island
from the mainland once a day.
The first step is to mark the annotated regions, which we do with explicit markup in the wikitext.
The translation UI then shows the translation regions:
The translator can then translate each of them:
Of course, this is Wikipedia, so the original article will quickly get changed.
The translator can update the translation units, as well as indicate whether the change was just a copy-edit (in which case the translation doesn’t need update) or needs further attention. This notifies translators, who can then update the translations.
But let’s look again at our wikitext. Even though we’re not encoding /all/ of the knowledge here in the wikitext – we’re storing the actual translations of these texts somewhere else – there’s still a lot of strange stuff cluttering up our article, which is often off-putting to editors.
This example isn’t unusual. There are a lot of examples on our projects with information which is cumbersome to include inline in the wikitext:
-{...}-
{{citation needed}}
In addition there's other information the community would like to include with an article but are currently blocked on because the extra inline information would be too disruptive to “ordinary” editors:
There's a large list of use cases collected from the community at the Annotations session of the Wikimedia Developer Summit in 2017.
We are proposing a general annotation service to allow us to record all the information which doesn’t belong in wikitext. Here are the important properties of annotated content on our projects:
Annotations should be transparent: the presence of annotated content should never prevent editors from being able to easily update the base content. There are many authors, many annotations, and many annotators.
What does editing annotated content look like? At the top of this section we showed one example with the Translate extension, which used a separate editor for the annotated content (translations). But we can also look at the InlineComments extension for an idea of a more generic interface. Viewing and refining the annotation regions is done with a special mode in Visual Editor:
Annotations are anchored to a specific revision, and they can be specified as a range in either the wikitext source or in the HTML DOM; Parsoid allows mapping back and forth between these.
Just as we’re using VisualEditor to mark regions, I expect it will probably be useful to make a generic-but-extensible mechanism to edit annotation content alongside the source text. This is a simple example from InlineComments:
Not every annotation type will use this simple form in the sidebar – the Translate extension uses a custom editor as we saw earlier – but providing a generic functionality of this sort will probably make it easier to develop new annotation types and provide some common user interface elements to make editing new annotation types easier to learn.
Next section: Visual Templates