User:APatro (WMF)/Message Bundle

Message bundles contain strings in key-value JSON format that, representing a message group that can be translated. Each key represents a translation unit and the value is the translation unit source that can be translated.

Unlike translatable pages, message bundles do not have translation pages.

Enabling message bundle integration
By default the message bundle integration is disabled, to enable it update your  to add,

Creating a message bundle
To create a message bundle,
 * 1) Start creating a wiki page.
 * 2) Paste a JSON content where the key and value are both strings. The key is the translation unit id and the value is the translation unit source.
 * 3) Save the wiki page.
 * 4) Go to Page information for the newly created wiki page.
 * 5) Change the page content model to Translatable message bundle.

Example of a message bundle:

The content under  is not translatable.

Declaring a source language
To define the source language for a message bundle, add an object with the  key in the message bundle content, and add the   key.

For example to set the source language to French:

To update the source language, the  should be set to.

Defining priority languages
To define priority languages for a message bundle message group, define  inside the   object in the message bundle content.

For example to set the priority language of a message bundle to Spanish, Italian, Hindi and Odia:

Additionally the key  inside   can be set to   to disable translations to non priority languages completely.

Translating a message bundle
Message bundles do not appear on. They can be translated by going to  page and then searching or the name of the wiki page that was created, in the group selector component.

On selecting the message bundle, the translation units will be displayed for translation.

Note that message bundles do not have translation pages.

Moving a message bundle
This process is similar to moving translatable pages. See the following documentation.

Deleting a message bundle
This process is similar to deleting translatable pages. See the following documentation.

Still to do

 * 1) Ensure that Translation statistics for message bundles work
 * 2) Ensure that message group stats for message bundles work
 * 3) Implement fuzzy for translations that are out of date
 * 4) Create a page where message bundles can be viewed similar to
 * 5) Change display format for Message bundle source pages to display JSON in a properly formatted manner.
 * 6) Remove tags from message bundle page when content model is changed to something else from Translatable message bundle.