Help:Translating: Difference between revisions

Help page
Created page with "The Resonite wiki uses the [https://www.mediawiki.org/wiki/Extension:Translate Translate MediaWiki extension], for enabling translations and for content to be surfaced in different languages. The extension has [https://www.mediawiki.org/wiki/Help:Extension:Translate extensive documentation] and [https://www.mediawiki.org/wiki/Help:Extension:Translate/Page_translation_example video tutorials available]. For brevity, we'll also present some information here. == Preparin..."
 
No edit summary
Line 31: Line 31:
=== Tables ===
=== Tables ===
'''Don't''':
'''Don't''':
<nowiki>
<pre>
<pre>
<translate>
<translate>
Line 48: Line 47:
</translate>
</translate>
</pre>
</pre>
</nowiki>


* Wrapping a whole table in translate tags makes it hard to translate.
* Wrapping a whole table in translate tags makes it hard to translate.


'''Do''':
'''Do''':
<nowiki>
<pre>
<pre>
{| class="wikitable"
{| class="wikitable"
Line 68: Line 65:
|}
|}
</pre>
</pre>
</nowiki>


* Wrapping each individual item in translate tags makes it '''easier''' to translate
* Wrapping each individual item in translate tags makes it '''easier''' to translate

Revision as of 00:09, 19 January 2024

The Resonite wiki uses the Translate MediaWiki extension, for enabling translations and for content to be surfaced in different languages.

The extension has extensive documentation and video tutorials available.

For brevity, we'll also present some information here.

Preparing a page for translation

This information is based on mediawiki's tutorial.

  1. Ensure the page is at a reasonable level of stability
    • Pages that are under construction or change frequently should not be included until they are ready.
  2. Add <languages /> to the top of the page in the source editing view.
  3. Surround translatable elements in <translate></translate> tags.
    • See further guidance on this below
  4. Mark this page for translation
    • This currently can only be done by administrators while we setup things.

Best practices for translate tags

These are based on Mediawiki's Examples.

  • Do not wrap the whole page in <translate>
    • This is a problem we had in he past which lead to confusion sometimes.
  • Instead wrap select parts with the tags.
  • A good example is actually the source of previous linked mediawiki page.
  • Be careful around:
    • Tables
    • Images
    • Templates
    • Lists

Tables

Don't:

{| class="wikitable"
|+ Food complements
|-
|Orange
|Apple
|-
|Bread
|Pie
|-
|Butter
|Ice cream
|}
  • Wrapping a whole table in translate tags makes it hard to translate.

Do:

{| class="wikitable"
|+Food complements
|-
|Orange
|Apple
|-
|Bread
|Pie
|-
|Butter
|Ice cream
|}
  • Wrapping each individual item in translate tags makes it easier to translate