Vintage Story Wiki:How to translate the wiki
Want to find something to work on? Check the Priority translations category.
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.
- Has the page not been updated for over a month? Check by clicking on "View History" and ask about it in the discord channel before starting 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:
- If you are marking a template for translation, make sure the "Enable translation-aware transclusion" checkbox is selected!
How to mark for translation
PLEASE read the official MediaWiki documentation for this feature!
- Go to the page you want to translate and click edit. Make sure the page is complete, or close to being complete!
- Add the language selector bar by typing in
<languages />
. - 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. - 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 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.
Want other editors to know this page is not only ready for translation, but of the absolute highest translatability? Use the priority translation template.
How to update translations
- Go to the page you want to translate and switch to the language you want to translate to
- If the page does not offer the option for that language yet, no translation has been started
- 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
- Instead you might also find "This page contains changes which are not marked for translation." - in which case the original version of the page was updated since it's last translation. Click on "marked for translation" and check the changes between last (translated) version and the current one. Take care to not invalidate previous translations unless they now include misleading or wrong translations - keep in mind that you would not just invalidate your own translation language, but all others as well!
- Once done checking, scroll to the bottom and hit "mark this version for translation".
- Back on the content page, click on "translated version" to continue working on the translation.
How to mark new edits for translation
This applies when you have made new edits to a page, and want those changes to be reflected for translation. Note that translators cannot translate what hasn't been written in the original page - translators cannot add new text in the Translate software.
If you are making major edits, be careful with the translation tags. Additions usually don't need to edit or change any translation tags. If you need to reorder or move paragraphs, move the associated translation tags with them - it doesn't matter if the translation tags are out of order. If you are removing old text, you may need to delete translation tags. Whenever possible, avoid doing so since this removes already-finished translations. However in some cases, this is unavoidable.
- Make your changes to the base version of the article.
- Double check that your additions and the article generally are properly marked for translation.
- Save your edit.
- At the top of the article, find and click "mark this version for translation"
- Your new edits should now be translatable.
How to actually translate
- Click on the "translate" or "translated version" page after the page was marked for translation
- This will open up the translation page, with the original English text showing up on the left side of the screen
- 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
- 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.
- Clicking on a section to the left will open a text box below, in which the translation can be typed.
- 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
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 mark a template for translation, make sure that the "Enable translation-aware transclusion" checkbox is enabled. On older templates, you must make a content change that would prompt you to re-mark it for translation in order to update its translations to be transclusion aware. Once you have done so, MediaWiki will automatically fetch the correctly translated version of the template for use on a translated page - there's no longer a need to use {{tnt}}
to call them.
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, make sure the Category tags are not included in the <translate>
tags, then 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.
Using translation variables
Note: our version of the Translate extension is outdated, so current MediaWiki documentation does not apply for this feature.
Sometimes, you don't want to translate something in a page - maybe it is something like a number, a special link name, or some piece of code that should not be translated. In this case, you can use a translation variable in order to make sure translation of the page does not change it.
Translation variables are written like this: <tvar|name>variable</>
To translators, it will look like this:
- some text that isn't the variable $name some more text
When translating, simply paste in the $name part and it will appear in your translation exactly as it is in the original page.
Example
Hello! This is a sentence which includes a translation variable: <tvar|tvar-example>🙂I'm a translation variable</>. Look at it in different languages!
Hello! This is a sentence which includes a translation variable: 🙂I'm a translation variable. Look at it in different languages!
Frequently Asked Questions
Why is there a /en subpage if the pages are already in English?
By default, the translation extension will create a subpage for every language version of a page, and English is not an exception. This is because the Translate extension doesn't really care which language the "base" version of the article was written with. Hypothetically, every single page could be written in German and translated to everything else, and the Translation extension would still create a /de
subpage and more importantly, continue to work in exactly the same way.
You usually won't see the /en
subpage when browsing the wiki. However, due to the way that some templates are localized, you may navigate to them through certain navbox links. In those cases, you'll be directed to the Article/en
subpage if your account language is set to English.
Much like every other language subpage, it is only updated when someone remembers to "mark this version for translation". So if you see an out-of-date /en
page, go to the main page and update the whole thing for translation. You'll be helping everyone that way.