User:APaskulin (WMF)/Translation notes

This page contains rough notes about working with translation markup on MediaWiki.

Sentences and paragraphs
It is preferable to have one sentence per translation unit. The easiest way to do this is to have each sentence be its own paragraph. In this example, T:53 and T:54 are separated by a new line, creating them as separate translation units within one set of translate tags.

Example 3: Missing and invalid titles
Titles that don't exist or are invalid will have a or  attribute set in the response.

In output formats that support numeric array keys, missing and invalid titles will have negative page IDs.

GET request
If your task is to add a new paragraph that contains two sentences, the best option is to add translate tags:

Example 3: Missing and invalid titles
Titles that don't exist or are invalid will have a or  attribute set in the response.

In output formats that support numeric array keys, missing and invalid titles will have negative page IDs.

In some cases, a title can be viewed by a user but cannot be accessed by the API, such as pages that mirror content from another wiki. These titles will have a attribute set in the response.

Variables
Variables names should be unique within a translation unit. They don't have to be unique within the entire page. See the variables in the previous example.