Help:Translating: Difference between revisions

Help page
No edit summary
Marked this version for translation
 
(18 intermediate revisions by 3 users not shown)
Line 1: Line 1:
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.
<languages />
<translate><!--T:1--> 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.</translate>


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].
<translate><!--T:2--> 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].</translate>


For brevity, we'll also present some information here.
<translate><!--T:3--> For brevity, we'll also present some information here.</translate>


== Preparing a page for translation ==
== <translate><!--T:34--> Translating</translate> ==
This information is based on [https://www.mediawiki.org/wiki/Help:Extension:Translate/Page_translation_example mediawiki's tutorial].
=== <translate><!--T:31--> Before Translating</translate> ===
<translate><!--T:32--> Ensure, that you've been marked as an "automoderated user". This will prevent translations going to the moderation queue.</translate>
<translate><!--T:35--> To do this follow the [[Wiki_Contributions_%26_Translations#Getting_%22Automoderated%22|instructions on our contributing page]].</translate>
<translate><!--T:38--> Then you're ready to start!</translate>


# Ensure the page is at a reasonable level of stability
<translate>== Preparing a page for translation == <!--T:4--></translate>
#* Pages that are under construction or change frequently should not be included until they are ready.
<translate><!--T:5--> This information is based on [https://www.mediawiki.org/wiki/Help:Extension:Translate/Page_translation_example mediawiki's tutorial].</translate>
# Add <nowiki><languages /></nowiki> to the top of the page in the ''source editing'' view.
# Surround translatable elements in <nowiki><translate></translate></nowiki> tags.
#* See further guidance on this below
# Mark this page for translation
#* This currently can only be done by administrators while we setup things.


== Best practices for translate tags ==
# <translate><!--T:6--> Ensure the page is at a reasonable level of stability</translate>
#* <translate><!--T:7--> Pages that are under construction or change frequently should not be included until they are ready.</translate>
# <translate><!--T:8--> Add <nowiki><languages /></nowiki> to the top of the page in the ''source editing'' view.</translate>
# <translate><!--T:9--> Surround translatable elements in <nowiki><translate></translate></nowiki> tags.</translate>
#* <translate><!--T:10--> See further guidance on this below</translate>
# <translate><!--T:11--> Mark this page for translation</translate>
 
<translate>
<!--T:15-->
=== Best practices for translate tags ===
These are based on [https://www.mediawiki.org/wiki/Help:Extension:Translate/Page_translation_administration#Markup_examples Mediawiki's Examples].
These are based on [https://www.mediawiki.org/wiki/Help:Extension:Translate/Page_translation_administration#Markup_examples Mediawiki's Examples].
</translate>


* Do not wrap the whole page in <nowiki><translate></nowiki>
* <translate><!--T:16--> Do not wrap the whole page in <nowiki><translate></nowiki></translate>
** This is a problem we had in he past which lead to confusion sometimes.
** <translate><!--T:17--> This is a problem we had in he past which lead to confusion sometimes.</translate>
* Instead wrap select parts with the tags.
* <translate><!--T:18--> Instead wrap select parts with the tags.</translate>
* A good example is actually the [https://www.mediawiki.org/w/index.php?title=Help:Extension:Translate/Page_translation_administration&action=edit source of previous linked mediawiki page].
* <translate><!--T:19--> A good example is actually the [https://www.mediawiki.org/w/index.php?title=Help:Extension:Translate/Page_translation_administration&action=edit source of previous linked mediawiki page].</translate>
* Be careful around:
* <translate><!--T:20--> Be careful around:</translate>
** Tables
** <translate><!--T:21--> Tables</translate>
** Images
** <translate><!--T:22--> Images</translate>
** Templates
** <translate><!--T:23--> Templates</translate>
** Lists
** <translate><!--T:24--> Lists</translate>
 
<translate>
=== Tables ===
<!--T:25-->
==== Tables ====
'''Don't''':
'''Don't''':
<pre>
<pre>
<nowiki>
<translate>
<translate>
</nowiki>
{| class="wikitable"
{| class="wikitable"
|+ Food complements
|+ Food complements
Line 45: Line 57:
|Ice cream
|Ice cream
|}
|}
<nowiki>
</translate>
</translate>
</nowiki>
</pre>
</pre>
 
</translate>
* Wrapping a whole table in translate tags makes it hard to translate.
* <translate><!--T:26--> Wrapping a whole table in translate tags makes it hard to translate.</translate>
 
<translate>
'''Do''':
<!--T:27-->
'''Do'''
<pre>
<pre>
{| class="wikitable"
{| class="wikitable"
|+<translate nowrap>Food complements</translate>
|+<nowiki><translate nowrap>Food complements</translate></nowiki>
|-
|-
|<translate nowrap>Orange</translate>
|<nowiki><translate nowrap>Orange</translate></nowiki>
|<translate nowrap>Apple</translate>
|<nowiki><translate nowrap>Apple</translate></nowiki>
|-
|-
|<translate nowrap>Bread</translate>
|<nowiki><translate nowrap>Bread</translate></nowiki>
|<translate nowrap>Pie</translate>
|<nowiki><translate nowrap>Pie</translate></nowiki>
|-
|-
|<translate nowrap>Butter</translate>
|<nowiki><translate nowrap>Butter</translate></nowiki>
|<translate nowrap>Ice cream</translate>
|<nowiki><translate nowrap>Ice cream</translate></nowiki>
|}
|}
</pre>
</pre>
</translate>
* <translate><!--T:28--> Wrapping each individual item in translate tags makes it '''easier''' to translate.</translate>


* Wrapping each individual item in translate tags makes it '''easier''' to translate.
<translate>
<!--T:29-->
==== Images ====
Wrap only, the description/alt-text in <nowiki><translate></nowiki> e.g.
</translate>


== Images ==
Wrap only, the description/alt-text in <nowiki><translate></nowiki> e.g.
<pre>
<pre>
[[File:MediaWiki database schema latest.svg|thumb|link=https://www.mediawiki.org/w/index.php?title=Manual:Database_layout/diagram&action=render|<translate><!--T:65--> Database schema of MediaWiki core</translate>]]</pre>
<nowiki>
[[File:MediaWiki database schema latest.svg|thumb|link=https://www.mediawiki.org/w/index.php?title=Manual:Database_layout/diagram&action=render|<translate>Database schema of MediaWiki core</translate>]]</nowiki></pre>
 
<translate>
<!--T:30-->
=== Example Pages ===
The following pages have examples of '''good''' uses of the <nowiki><translate></nowiki> tags:
</translate>
* [[Resonite Team]]
 
<translate>
<!--T:12-->
== Tutorials ==
We have a number of tutorials available for translating pages:</translate>
 
* [https://www.youtube.com/watch?v=weR8pwJKejs <translate><!--T:13--> preparing a page for translations by ProbablePrime</translate>]
* [https://www.youtube.com/watch?v=ACuCSuklPRk <translate><!--T:14--> translating a page by ProbablePrime</translate>]

Latest revision as of 07:31, 7 June 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.

Translating

Before Translating

Ensure, that you've been marked as an "automoderated user". This will prevent translations going to the moderation queue. To do this follow the instructions on our contributing page. Then you're ready to start!

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

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:


<translate>

{| class="wikitable"
|+ Food complements
|-
|Orange
|Apple
|-
|Bread
|Pie
|-
|Butter
|Ice cream
|}

</translate>

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

Do

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

Images

Wrap only, the description/alt-text in <translate> e.g.


[[File:MediaWiki database schema latest.svg|thumb|link=https://www.mediawiki.org/w/index.php?title=Manual:Database_layout/diagram&action=render|<translate>Database schema of MediaWiki core</translate>]]

Example Pages

The following pages have examples of good uses of the <translate> tags:

Tutorials

We have a number of tutorials available for translating pages: