User:Quiddity (WMF)/Translation notes

From Meta, a Wikimedia project coordination wiki

Rough notes, that I want to triple-check, expand, and perhaps integrate into existing docs…

TL;DR / Reminders[edit]

  • Use the wikitext editor, not the Visual Editor, to markup the initial page.
  • Include empty-lines between each header and paragraph block. That's how the software keeps the blocks separated.
  • Don't ever manually add the little <!--T:4--> "translation unit markers". The software needs to add those. They are implicitly connected to the chunks of text that are sent into the translation interface.
  • If you move a block of text, move the "unit marker" along with it.
    • They appear before paragraphs, or after headings.
    • If you delete them, but retain the text, then volunteers would need to either re-translate that text (into every language), or spend time re-associating the correct unit markers that had been used.
  • Try to minimize big-changes, once a page has been marked for translation. I.e. Avoid frequent changes to the wording of a single paragraph many times over the course of a few weeks. If a volunteer is trying to keep a page up-to-date, they'll have to rewrite it every time!
  • Avoid clustering many distinct pieces, or wiki-markup, by splitting with separate blocks (via linebreaks) or distinct <translate> wrappers for:
  • Good example pages:

(Notes needed. Some good details within Tech/News/Manual#Writing guidelines)

  • <tvars>
    • … (TBC)
  • Links
    • … (TBC)
  • <bdi>
    • … (TBC)

Process details, the simple version[edit]

You can also check the documentation on MediaWiki. Steps below are for Meta but work on Commons or MediaWiki.

  1. A translation administrator or editor adds <translate></translate> tags to a page and a <languages /> tag at the top.
    • In some cases, we need separate <translate></translate> tags for some of the Headers, paragraphs, bullet-list-points (excluding the "*" or "#"), and table-cells. (I.e. We try to avoid making the translators have to include a ton of wikimarkup, e.g. for a Table. See this example diff.)
    • We also need to add wrappers for most links (except where they ought to be localizable, such as a link to a Wikipedia article), and occasionally some keywords.
  2. Pages with <translate></translate> tags will appear in m:Special:PageTranslation.
  3. A translation administrator "marks" the page for translation by click a "mark for translation" link that is only visible (at the top of the page) to them. If you have forgotten a </translate> tag or something, you will receive a warning.
  4. Fuzzybot is triggered, which automatically finds the text that needs to be translated and adds <!--T:#--> tags throughout the page, which indicate what sections need to be translated.
  5. The page will now be available for translating - Any translations will appear in the at the top.
  6. If a page is marked for translation, any user can translate the page.

Not ready yet? – If a page is not yet ready/stable for translation, you can tag it with a (Meta-wiki) {{Draft}} or (MediaWiki) {{DoNotTranslate}} template at the top of the page.

How it technically works[edit]

Here is a good example-set showing how it technically works.

Open the following links to compare how the same content is edited/stored/shown in different ways. We're just looking at this single line near the top of #1:

<translate><!--T:1--> Wikifunctions's first goal is to support the [[Special:MyLanguage/Wikimedia projects|Wikimedia projects]], but it will support goals beyond that, just as with [[Special:MyLanguage/Wikidata|Wikidata]]. This is a description of Wikifunctions beyond [[Special:MyLanguage/Wikipedia|Wikipedia]].</translate>

Which is rendered in English as:

Wikifunctions's first goal is to support the Wikimedia projects, but it will support goals beyond that, just as with Wikidata. This is a description of Wikifunctions beyond Wikipedia.

or in Japanese as:

Wikifunctionsの最初の目標は ウィキメディアのプロジェクト群のサポートですが、 ウィキデータと同様にその先の目標もサポートします。これは ウィキペディアの先にあるWikifunctionsの説明です。

  1. Editors edit the base-language page (usually English, but can be any language):
  2. After a translation-admin adds the necessary code, and marks it as "ready for translation", it becomes available to translators like this:
  3. Each of those text chunks is simply saved separately, and then combined for the rendered page. E.g.
  4. You can see all the languages which have already translated that string: