Vintage Story Wiki:How to translate the wiki/ja: Difference between revisions

From Vintage Story Wiki
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>
== Principles for translation ==
* Is the page going to get major changes in the future? If so, maybe finish writing it before you tag it for translation.
* If the content inside the <code><nowiki><translate></nowiki></code><code><nowiki></translate></nowiki></code> doesn't need to be translated, ''don't put it inside the tags''. Better to have multiple sets of translation tags than one massive one that creates future problems.
* "Maintenance" tags (categories, navboxes) should not be inside the translate tags.
* Make use of our templates for translatable content:
*: {{ll|Template:Page language link|2=Template:Page language link}}
*: {{ll|Template:Localized link|2=Template:Localized link}}
*: {{ll|Template:Translatable template|2=Template:Translatable template}}
<div class="mw-translate-fuzzy">
<div class="mw-translate-fuzzy">
# 翻訳したいページに移動し、編集をクリックします
# 翻訳したいページに移動し、編集をクリックします
Line 10: Line 20:
[[File:Translate.PNG|thumb|500px|right|This is how it should look after translation & language tags were added]]
[[File:Translate.PNG|thumb|500px|right|This is how it should look after translation & language tags were added]]


# Go to the page you want to translate and click edit
# Go to the page you want to translate and click edit. Make sure the page is complete, or close to being complete!
# To the very top add <code><translate<nowiki/>></code>, to the very bottom add <code></translate<nowiki/>></code>
# Add the language selector bar by typing in <code><nowiki><languages /></nowiki></code>.
# Click save, then at the top of the page a small link will appear, titled "Mark this page for translation". Click on it, scroll to the bottom and hit the button "Mark this version for translation"
# Enclose the text you want to translate using <code><nowiki><translate></nowiki></code><code><nowiki></translate></nowiki></code> tags. You can add as many sets of these tags as you want. Make sure navboxes and category tags are ''excluded''.
# Click save, then at the top of the page a small link will appear, titled "Mark this page for translation". Click on it, scroll to the bottom and hit the button "Mark this version for translation".
# Go to the [[Special:Translate|translation center]] and start thunder typing ;-)
# Go to the [[Special:Translate|translation center]] and start thunder typing ;-)
# Once translated, edit the page again, and to the very top, add <code><languages<nowiki/>/></code> - this will make the language bar appear
 
For tackling specific formatting issues in wikitext and how they interact with the translate tags, see [https://www.mediawiki.org/wiki/Help:Extension:Translate/Page_translation_administration#Markup_examples this guide on MediaWiki]. When translating a page that uses translatable templates, do not include them within the <code><nowiki><translate></nowiki></code> tags.


=== How to update translations ===
=== How to update translations ===
Line 45: Line 57:




=== How to translate templates ===
== How to translate templates ==
 
[[File:Template-translate.PNG|thumb|500px|right|Veerserif's note: now outdated due to the new tnt template.]]
 
Templates should only be tagged and mark for translation when they are ''complete''. Make sure the <code><nowiki><languages /></nowiki></code> tag is '''outside''' of the part of the template marked for transclusion, i.e. the <code><nowiki><onlyinclude> ... </onlyinclude></nowiki></code> or <code><nowiki><includeonly> ... </includeonly></nowiki></code> part.
 
When you use a translated or translatable (i.e. tagged and marked for translation) template on any page, you '''must''' use the [[Template:Translatable template|Translatable template]] template instead! For example, if you wanted to use the <code><nowiki>{{Metals navbox}}</nowiki></code> template on a page, instead write it as <code><nowiki>{{Translatable template|Metals navbox}}</nowiki></code>. You can also use <code><nowiki>{{tnt|Metals navbox}}</nowiki></code> as a shorter version.
 
When translating a page that uses translatable templates, do not include them within the <code><nowiki><translate></nowiki></code> tags. (I'm repeating this because it's important.)
 
== Translating categories ==
 
Categories can also be translated, and if done correctly will automatically put translated pages in their relevant language code subpage.
 
=== Translating a Category page ===
 
You can tag a Category page for translation in the same way as any other page, by adding <code><nowiki><languages/></nowiki></code> for the language selector bar then adding a set of <code><nowiki><translate></nowiki></code><code><nowiki></translate></nowiki></code> tags. The translate tags must be present even if there is no content in the Category page. [https://wiki.vintagestory.at/index.php?title=Category%3AItems&type=revision&diff=43848&oldid=28218 See this diff] as an example of what to add to an empty Category page.
 
=== Translation-aware category tags ===
 
On the article that should be included in the translatable category, change the Category tags so that they read:
 
<code><nowiki>[[Category:CategoryName{{#translation:}}]]</nowiki></code>


[[File:Template-translate.PNG|thumb|500px|right]]
For example, <code><nowiki>[[Category:Metals]]</nowiki></code> should become <code><nowiki>[[Category:Metals{{#translation:}}]]</nowiki></code>.


# When marking templates like the [[Template:Navbox]] for translation, it is important to consider the placement of the language & translation tags, since the whole template will be nestled inside other pages!
Then save and re-mark the page for translation to update the page across all languages.
# Make sure to mark templates like this in the following way, nestled into <code><noinclude<nowiki/>></code> tags:
## The beginning of the page should show: <code><noinclude<nowiki/>></code><code><languages/<nowiki/>></code><code><translate<nowiki/>></code><code></noinclude<nowiki/>></code>
## The end of the page should show: <code><noinclude<nowiki/>></code><code></translate<nowiki/>></code><code></noinclude<nowiki/>></code>
# This ensures that the translate and language tags themselves do not appear on the page in which the template is used.




[[Category:Wiki Editing]]
[[Category:Wiki Editing]]

Revision as of 15:25, 22 June 2022

Principles for translation

  • Is the page going to get major changes in the future? If so, maybe finish writing it before you tag it for translation.
  • If the content inside the <translate></translate> doesn't need to be translated, don't put it inside the tags. Better to have multiple sets of translation tags than one massive one that creates future problems.
  • "Maintenance" tags (categories, navboxes) should not be inside the translate tags.
  • Make use of our templates for translatable content:
    Template:Page language link
    Template:Localized link
    Template:Translatable template
  1. 翻訳したいページに移動し、編集をクリックします
  2. 一番上に <translate> を追加し、一番下に </translate> を追加します
  3. 保存をクリックすると、ページの上部に「このページを翻訳対象に指定」という小さいリンクが表示されます。これをクリックし、下までスクロールし、「この版を翻訳対象に指定」をクリックします
  4. translation center へ移動し、怒涛のタイピングを始めましょう ;-)
  5. 翻訳が終わったら、再びページを編集し一番上に <languages/> を追加します。これによって言語バーが表示されます
This is how it should look after translation & language tags were added
  1. Go to the page you want to translate and click edit. Make sure the page is complete, or close to being complete!
  2. Add the language selector bar by typing in <languages />.
  3. Enclose the text you want to translate using <translate></translate> tags. You can add as many sets of these tags as you want. Make sure navboxes and category tags are excluded.
  4. Click save, then at the top of the page a small link will appear, titled "Mark this page for translation". Click on it, scroll to the bottom and hit the button "Mark this version for translation".
  5. Go to the translation center and start thunder typing ;-)

For tackling specific formatting issues in wikitext and how they interact with the translate tags, see this guide on MediaWiki. When translating a page that uses translatable templates, do not include them within the <translate> tags.

How to update translations

Update-translation.PNG
  1. Go to the page you want to translate and switch to the language you want to translate to
  2. If the page does not offer the option for that language yet, no translation has been started
  3. If there was a translation attempt previously, the page will show the current progress of translation at the top, adding information if the translation is up to date or not
  4. Click on "translated version" to continue working on the translation.

How to actually translate

  1. Click on the "translate" or "translated version" page after the page was marked for translation
  2. This will open up the translation page, with the original English text showing up on the left side of the screen
  3. If necessary, you can choose into which language you wish to translate in the upper right corner of the screen using the "Translate to ..." drop down menu
  4. After being marked for translation, every page is automatically segmented into sections for translation. These can be translated and saved individually, meaning there is no need to do a whole page at a time.
  5. Clicking on a section to the left will open a text box below, in which the translation can be typed.
  6. Clicking on "Save Translation" will save the text, and it will then show up to the right as the current translated version

Important notes on what to translate and what not

Everything that looks like "code" probably doesn't need translation. This includes:

  • __TOC__ - To create a Table Of Contents at the beginning of a page.
  • {| class="wikitable sortable" - Or any other "wikitable" lines, used together with plenty of |- and other such symbols to build a nice looking table. Only the actual content text within the table needs translation - if in doubt, open the original page on the side to check the content of the table.
  • [[File:MeatInFirepit.png|200px|thumb|right|text]] - To include a picture into the page. Only the "text" part here needs translating, as it is the description that shows up under the picture - the rest should not be translated!
  • [[quern|text]] - To link to a different page in the wiki, while not directly using the linked-to page name. Only translate the "text" part, this will change the word in which the link is embedded, without changing the link destination itself.

If in doubt, don't hesitate to ask in the discords wiki-and-translation channel for help!


How to translate templates

Veerserif's note: now outdated due to the new tnt template.

Templates should only be tagged and mark for translation when they are complete. Make sure the <languages /> tag is outside of the part of the template marked for transclusion, i.e. the <onlyinclude> ... </onlyinclude> or <includeonly> ... </includeonly> part.

When you use a translated or translatable (i.e. tagged and marked for translation) template on any page, you must use the Translatable template template instead! For example, if you wanted to use the {{Metals navbox}} template on a page, instead write it as {{Translatable template|Metals navbox}}. You can also use {{tnt|Metals navbox}} as a shorter version.

When translating a page that uses translatable templates, do not include them within the <translate> tags. (I'm repeating this because it's important.)

Translating categories

Categories can also be translated, and if done correctly will automatically put translated pages in their relevant language code subpage.

Translating a Category page

You can tag a Category page for translation in the same way as any other page, by adding <languages/> for the language selector bar then adding a set of <translate></translate> tags. The translate tags must be present even if there is no content in the Category page. See this diff as an example of what to add to an empty Category page.

Translation-aware category tags

On the article that should be included in the translatable category, change the Category tags so that they read:

[[Category:CategoryName{{#translation:}}]]

For example, [[Category:Metals]] should become [[Category:Metals{{#translation:}}]].

Then save and re-mark the page for translation to update the page across all languages.