Help:Extension:Translate/Page translation administration/fi

From mediawiki.org
This page is a translated version of the page Help:Extension:Translate/Page translation administration and the translation is 26% complete.

Mitä. Sivujen kääntämis -toiminto mahdollistaa wiki-sivujen kääntämisen muille kielille kontrolloidusti. Tämä tarkoittaa sitä, että jokaisen käännöksen sisältö vastaa yleensä alkuperäisen sivun sisältöä. Tämä eroaa esimerkiksi Wikipedia-artikkelien eri kieliversioista, jotka ovat täysin itsenäisiä. Sivuja käännetään oletuksena vain yhdeltä pääkieleltä muille kielille, mutta kääntäjät voivat hyödyntää myös muiden kielien käännöksiä, jos niitä on olemassa.

Miksi. Useampien sivujen kääntäminen muille kielille ilman minkäänlaista apua on parhaimmillaan ajanhukkaa ja pahimmillaan hallitsematon sekasotku. Sivujen kääntämis -toiminnolla voidaan säästyä sotkulta ja tehdä kääntämisprosessista järjestelmällistä. Pääideana on se, että alkuperäinen teksti jaetaan pienemmiksi yksiköiksi, jotka sitten käännetään yksitellen. Kun alkuperäinen teksti jaetaan yksiköiksi, voidaan kaikki muutokset yksilöidä, ja kääntäjien tarvitsee päivittää käännökset vain niissä yksiköissä, joiden alkuperäistä tekstiä on muutettu. Tämä mahdollistaa myös sen, että kääntäjät voivat työstää pienemmän kokoisia yksiköitä, jolloin he voivat joko jakaa käännöstyön useamman kääntäjän kesken tai jatkaa itse käännöksen tekoa myöhemmin, koska käännöstä ei tarvitse tehdä heti kokonaan.

Kuka. Tämä sivu täsmentää sivujen kääntämisohjeita ja antaa syvällisempää tietoa siitä, miten järjestelmä toimii, sekä antaa ehdotuksia erilaisten tapausten käsittelemiseksi. Tämä sivu on tarkoitettu käännösylläpitäjille ja ylipäätään kaikille käännettävien sivujen lähdekoodia muokkaaville, vaikka heillä ei olisi käytettävissään ylläpitotoimintoja, joilla muutokset voidaan hyväksyä käännettäviksi.

Jos haluat pyytää itsellesi käännösylläpitäjän oikeuksia MediaWiki.org-projektissa, katso Project:Requests. Oikeuksia MetaWikissä voi pyytää sivulla Meta:Requests. Commonsissa sivu on Commons:Noticeboard.

Käännettävän sivun kehityskulku

Roolit. Wiki-sivun tekemisessä ja kääntämisessä on useita henkilöitä: sivun alkuperäinen kirjoittaja, kielenhuoltaja, käännösylläpitäjä, joka merkitsee sivun käännettäväksi, kääntäjät, joku joka tekee sivuun muutoksia, ja lopulta käännösylläpitäjä merkitsee muutokset käännettäväksi ja kääntäjät päivittävät käännökset. Roolit voivat olla lomittaisia, mutta lopullinen vastuu kääntämisen pitämisestä mutkattomana on käännösylläpitäjällä. Ylläpitäjä päättää, milloin sivu on valmis käännettäväksi ensimmäisen kerran, varmistaa osioiden tarkoituksenmukaisuuden ja hyväksyy (tai korjaa) muutokset.

Valmistelu. Jotta jotain voidaan kääntää, se pitää ensin kirjoittaa. Jos olet jo tehnyt käännöksen käyttämättä Käännös-laajennusta, katso alta osio käännösten migraatiosta. Jos haluat nopeasti useita käännöksiä, on erityisen tärkeää, että alkuperäinen teksti on kunnossa. Kysy jotakuta lukemaan sivun teksti läpi, ennen kuin merkitset sen käännettäväksi, ja jos mahdollista, pyydä kielen asiantuntijaa muokkaamaan teksti selväksi ja ytimekkääksi. Monimutkainen sanasto ja vaikeasti ymmärrettävät virkkeet tyssäävät monen vapaaehtoisen aikeet kääntämisestä. Myös merkinnät voivat aiheuttaa kääntäjille ongelmia, mutta käännösylläpitäjänä voit estää ongelmien syntymisen. Katso alempana osio merkinnöistä. Luonnollisesti sivun alkuperäiseen tekstiin tehdyt muutokst edellyttävät kaikkien olemassa olevien käännösten päivittämistä, joten on suositeltavaa odottaa, kunnes sivun sisältö on vakiintunut. Toisaalta muutoksia aina välillä tapahtuu ja järjestelmä käsittelee ne hyvin, joten katso alempana osio muutosten käsittelystä.

Taggaus. Kun sivu on muuten valmis käännettäväksi, kuka tahansa voi merkitä käännettävät osat laittamalla ne ‎<translate>-tagien sisälle ja lisäämällä sivulle ‎<languages />-palkin. Jälkimmäinen lisää sivulle listan kaikista käännöksistä sekä niiden valmistumis- ja päivitysprosentit. Se on ainoa osoitus siitä, että käännökset ovat olemassa. Katso alempana miten taggaus tehdään. Järjestelmä havaitsee tagien lisäämisen käännettävälle sivulle, ja sivulle tulee linkki, jonka kautta se voidaan merkitä käännettäväksi. Se myös antaa varoituksen ja estää tallennuksen, jos olet esimerkiksi unohtanut lisätä sulkevan tagin. Käännettävä sivu listataan myös sivulla Special:PageTranslation kommentilla valmis merkittäväksi.

Merkkaaminen. Taggauksen jälkeen käännösylläpitäjä merkitsee sivun käännettäväksi. Käyttöliittymä on selitetty esimerkkisivulla. Käännösylläpitäjän vastuulla on varmistaa, että osiot on tehty järkevästi ja taggaus on asianmukainen. Jos sivua on muutettu, se voidaan merkata uudelleen. Katso alempana miten tehdä muutoksia aiheuttamatta isoa häiriötä. Sivun merkkaaminen aloittaa taustaprosessin, joka käyttää MediaWikin työjonoa. Tämä prosessi käy läpi jokaisen käännöksen ja regeneroi ne: vanhentuneet käännökset korostetaan vaaleanpunaisella taustalla. Sen sijaan käännöskäyttöliittymä päivitetään heti.

Muutokset. Käyttäjät voivat jatkaa muutosten tekemistä alkuperäisen sivun lähdekoodiin. Muutokset näkyvät niille käyttäjille, jotka katsovat sivun lähdekoodia, mutta käännökset tehdään käännösyksiköille, jotka ovat peräisin alkuperäisen sivun viimeisimmästä versiosta, joka on merkitty käännettäväksi: käännösten näytetään olevan 100 %:sti valmiita ja päivitettyjä, vaikka alkuperäistä sivua olisi muutettu. Voit helposti nähdä, onko alkuperäisen sivun lähdekoodissa muutoksia: sivun ylälaidassa on ilmoitus siitä, että voit kääntää tämän sivun ja lisäksi siinä on linkit mahdollisiin muutoksiin.

Mitätöinti. Jos alkuperäisen sivun koodiin on tehty muutoksia, käännösylläpitäjä voi kunkin osion kohdalla valita vaihtoehdon "Älä merkitse käännöksiä vanhentuneiksi". Jos osio on merkitty vanhentuneeksi eli mitätöity, niin kyseinen osio näkyy käännetyllä sivulla vaaleanpunaisella taustalla, ja käännöskäyttöliittymässä näkyy kelloikoni. Jos osiota ei ole merkitty vanhentuneeksi, niin lukijat eivät näe mitään muutosta käännetyllä sivulla, ja kääntäjien täytyy katsoa käännöskäyttöliittymästä, mitä muutoksia kyseiseen osioon on tehty.

Lähdekieli. Myös alkuperäisen sivun kielellä on olemassa käännössivu: sillä ei ole ylimääräisiä tageja tai muita kääntämiseen liittyviä merkintöjä, jotka ovat näkyvissä alkuperäisen sivun lähdekoodissa. Tätä sivua ei ole linkitetty käyttöliittymästä, mutta se on kätevä silloin, jos haluat esimerkiksi sisällyttää (transclude) sivun (tyypillistä käännettäville mallineille) tai viedä (export) sivun. Esimerkiksi tämä sivu on saatavilla ilman merkintöjä täällä: Help:Extension:Translate/Page translation administration/en.

Käännettävän sivun kieli. Laajennus olettaa, että alkuperäinen sivu on kyseisen wikin oletuskielellä. Ylläpitäjät voivat muuttaa tietyn sivun kieliasetuksia käyttämällä sivua Special:PageLanguage, niin että sitä voidaan käyttää käännöksen alkuperäissivuna. Katso lisätietoja sivulta Page content language.

Käännöksen kieli. Käännettävällä sivulla voi olla tekstiä toisella kielellä, jos sivua ei ole kokonaan käännetty. Kääntämättömiin käännösyksiköihin merkitään asianmukainen kieli ja tekstin suunta, jotta CSS-säännöt toimivat oikein. MediaWiki ei kuitenkaan mahdollista kielen jäsentämistä (parsing) muuten kuin sivun tasolla. Kaikki taikasanat ja jäsennystoiminnot käyttävät käännöksen kohdekieltä, vaikka niitä ympäröivää tekstiä ei olisi käännetty. Tämä saattaa aiheuttaa ei-toivottuja poikkeamia esimerkiksi lukujen ja päivämäärien kanssa. Jotkin taikasanatoiminnot ja jäsennystagit mahdollistavat tulostekielen valinnan, eli silloin voit käyttää taikasanaa {{TRANSLATIONLANGUAGE}}, joka palauttaa kääntämättömille yksiköille alkuperäiskielisen ja käännetyille yksiköille käännöskielisen tulosteen.

Closed translation requests. Some translatable pages have a content that is only interesting for a certain period of time. For example announcements and regular status updates, like the Wikimedia monthly highlights. You can keep those pages around with translations, but hide them from the translation interface. This does not prevent further translations to the pages, but it greatly reduces the chance that a user accidentally starts translating the page. Discouraging and its reversion are done from Special:PageTranslation.

Prioritizing languages. You can also define a list of languages that you specifically want translations into; leaving the language list empty is interpreted as all languages allowed. The page will behave like a discouraged page (see previous paragraph) for the languages not in the priority list and, when translating into them, translators will be given a notice. You can also prevent the translation in other languages, say if translations are actually used elsewhere and you won't be able to use them but in some languages.

Grouping. It is possible to group related pages together. These groups work like all the other message groups. They have their own statistics and contain all the messages of the subgroups: in this case translatable pages. This functionality is currently in Special:AggregateGroups. Aggregate message groups are collapsed by default in Special:LanguageStats in the group selector at Special:Translate.

Siirtäminen. Käännettäviä sivuja voidaan siirtää samalla tavalla kuin muitakin sivuja. Sivua siirtäessäsi voit valita, haluatko siirtää myös sen alasivuja, jotka eivät ole käännöksiä. Useiden liittyvien sivujen siirto tehdään käyttämällä tausta-ajoa. Siirron aikana sivua ei ole mahdollista kääntää. Siirron päättyminen merkitään käännöslokiin.

Poistaminen. Kuten siirtäminen, voidaan sivun poistaminen tehdä normaalista paikasta. Voit poistaa joko käännettävän sivun kokonaan tai vain yhden käännössivun siinä olevasta poistonapista. Poistaminen poistaa myös kaikki käännösyksikkösivut. Samoin kuin siirrossa, tausta-ajo poistaa sivut ajan kanssa, ja poiston loppuunsuoritus merkitään sivun käännöslokiin. Poistaminen edellyttää sekä "delete" että "pagetranslation"-oikeuksia, mutta yksittäiset käännösyksikkösivut voidaan poistaa tavallisella "delete"-oikeudella.

Reverting. Similarly, reverting incorrect edits works as usual (including the rollback button): you only have to edit the affected translation unit and the translation page will be updated as well. To find the edit to the translation unit from the edit to the translation page, just click the "muokkaukset" link for the editor and look for an edit at a similar time. Within the translation system, you can mark an existing translation as outdated by adding !!FUZZY!! at the start of the translation unit's translated message box.

Suojaaminen. Käännettävä alkuperäinen sivu on mahdollista suojata. Käännöksiä ei voi suojata, eikä alkuperäisen sivun suojaaminen kata niitä. Jos haluat estää käännössivujen muokkaamisen, sinun tulee valita lähdekieli ainoaksi prioriteettikieleksi ja asettaa muiden kielten kääntäminen pois päältä. Katso kielten priorisointi ylempänä. Nämä kaksi toimintoa estävät muutosten tekemisen alkuperäiseen sivuun, sekä käännössivuun ja sen käännösyksikkösivuihin. Yksittäisten käännösyksikkösivujen suojaaminen on mahdollista, mutta sitä ei suositella.

Removal from translation. It is also possible to unmark a page for translation. You can use Special:PageTranslation or follow the link in the top of translatable page to remove it from translation. This will remove any structure related to page translation, but leave all the existing pages in place, freely editable. This action is not recommended.

Language aware transclusion. Käännettävä sivu on mahdollista sisällyttää toiseen sivuun mallineen tavoin. Silloin käännettävä sivu ladataan kohdesivun kielellä, jos se on käännetty kyseiselle kielelle. Jos käännöstä ei ole, käännettävä sivu ladataan alkuperäisellä kielellä. This behavior of a translatable page is controlled by the Enable translation aware transclusion for this page option when marking the page for translation. New translatable pages will have this behavior turned on by default.

Käännettävän sivun anatomia

The translation of a translatable page will produce many pages, which all together compose the translatable page in the broadest sense: their title is determined by the title of the translatable Page:

  • Page - the source page
  • Page/<language code> - the translation pages, plus a copy of the source page without markup
  • Translations:Page/<translation unit identifier>/<language code> - all the translation unit pages

In addition to this, there are the translation page template and the sources of translation units, extracted from the source page and stored in the database. The system keeps track of which versions of the source page contain translation tags and which version of them have been marked for translation.

Every time a translation unit page is updated, the system will also regenerate the corresponding translation page. This will result in two edits. The translation unit page edit is hidden by default in recent changes and can be shown by choosing show translations from the translation filter. Any action other than editing (like deleting and moving) the translation unit pages will not trigger the regeneration of the corresponding translation page.

If you need the copy of the source page without markup, e.g. to be pasted in another wiki without Translate,

  • identify the source language code (for English, en) and visit Page/<language code>
  • click the "Näytä historia" button to reach an address like this and replace action=history with action=raw in the address bar, press enter
  • the text will be displayed or saved.

Segmentation

General principles:

  1. All text intended for translation must be wrapped in ‎<translate> tags. There can be multiple pairs of tags in one page.
  2. Everything outside those tags will not change in any translation page. This static text, together with the placeholders which mark the place where the translation of each translation unit will be substituted, is called the translation page template.
  3. Too much markup in the text makes it difficult for translators to translate. Use more fine grained placing of ‎<translate> tags when there are lots of markup.
  4. The text inside ‎<translate> tags is split into translation units where there is one or more empty lines between them (two or more newlines).

Restrictions. The page translation feature places some restrictions on the text. There should not be any markup that spans over two or more translation units. In other words, each paragraph should be self-contained. This is currently not enforced in the software, but violating it will cause invalid rendering of the page, the severity depending on whether MediaWiki itself is able to fix the resulting HTML output or not.

Parsing order. Beware, the ‎<translate> tags work differently from other tags, because they do not go through the parser. This should not cause problems usually, but may if you are trying something fancy. In more detail, they are parsed before any other tags like ‎<pre> or ‎<source>, except for ‎<nowiki> which is recognized by the Translate extension.

Before Translate version 2020.10, ‎<nowiki> was not handled consistently and pages would still appear in Special:PageTranslation. Escape it like "&lt;translate>...&lt;/translate>" as a workaround.

Tag placing. If possible, try to put the tags on their own lines, with no empty lines between the content and the tags. Sometimes this is not possible, for example if you want to translate some content surrounded by the markup, but not the markup itself. This is fine too, for example:

{{Template|1=<translate>Some localised parameter</translate>}}

To make this work, the extension has a simple whitespace handling: whitespace is preserved, except if an opening or closing ‎<translate>‎</translate> tag is the only thing on a line. In that case the newline after the opening tag or before the closing tag is eaten. This means that they don't cause extra space in the rendered version of the page.

Variables. It is possible to use variables similar to template variables. The syntax for this is ‎<tvar name="name">contents‎</tvar> (quotes are optional if the value contains no spaces or any of " ' ` = < >). For translators these will show up only as $name, and in translation pages will automatically be replaced by the value defined in the translatable page (so they are global "constants" across all its translation pages). Variables can be used to hide untranslatable content in the middle of a translation unit. It also works for things like numbers that need to be updated often. You can update the number in all translations by changing the number in the translatable page source and re-marking the page. You do not need to invalidate translations, because the number is not part of the translation unit pages.

Before Translate version 2021.04, the syntax was <tvar|name>contents</> (T274881). This syntax is still supported, but it is deprecated.

Comma-separated values. For content such as Graph data, that needs to be parsed by the software as comma-separated values, you should separate the translation units between each comma, so that the translating editors don't use localized commas which will confuse the software.

Plain-text values. To prevent any kind of modification of the translation value, use nowrap attribute like this: <translate nowrap>...</translate>. By default outdated and untranslated values are modified in order to support highlighting and language tagging.

Markup examples

Below are listed some alternatives and suggested ways to handle different kinds of wiki markup.

Categories Categories can be added in two ways: in the translation page template or in one of the translation units.

If you have the categories in the translation page template, all translations will end up in the same category.

If you have categories inside translation units, you should teach the users a naming scheme.

On the right we show two possible schemes which are independent of the technical means to adopt them.

Translation by adding language suffix: Category:Cars/fi (recommended)

[...]
</translate>

[[Category:MediaWiki{{#translation:}}]]
  • Category page name not translated (just like the page names).
  • One category for each language.
  • Page translation could be used for the category itself: the categories would be linked together and the headings would be translated (but not the name of the category in links and such).

No translation: Category:Cars

  • All translations in same category (good if only few languages, bad if many).
  • Category name not translated (can be put as is in the translation template).
Headings Headings should be separated with an empty line. This way someone can quickly translate the table of contents before going into the contents, and an anchor in source language is added on translation pages.

When tagging headings, it is important to include the heading markup inside the tags and insert a newline between the opening translate tag and the heading markup, or MediaWiki will no longer identify them properly. For example, section editing only works with the recommended mark-up given in the example. The markup also immediately gives translators a context: they are translating a heading. Additionally, it ensures that linkable anchors are generated for the heading.

Väärin: (rivinvaihto ‎<translate>-tägin jälkeen puuttuu, otsikkosyntaksi on tägien ulkopuolella)

== <translate>Kulttuuri</translate> ==

Väärin: (ei rivinvaihtoa)

<translate>== Culture ==</translate>

Recommended segmentation:

<translate>
== Culture == 

Lorem ipsum dolor.
</translate>
Images Images that do contain language specific content like text should include the full image syntax in an unit. Other images can only tag the description with optional hint in message documentation of the page after it has been marked.
<translate>
[[File:Europe.png|thumb|Map of Europe with capital cities]]
</translate>
[[File:Ball.png|50px|<translate>Ball icon</translate>]]
Links Links can be included in the paragraph they are inside. This allows changing the link label, but also changing the link target to a localized version if one exists.

If the target page is (or should be) also translatable, you should link to it by prepending Special:MyLanguage/ to its title. Only the link label will need to be translated, because this automatically redirects users to the translation page in their own interface language, as selected for instance via the UniversalLanguageSelector. However, to achieve a constant behavior the syntax must be used for all links.

Internal links:

<translate>
Helsinki is capital of [[Finland (country)|Finland]].
</translate>

Links to translatable pages:

<translate>
It has marvelous beaches with a lot of [[Special:MyLanguage/Seagull|seagulls]].
</translate>

External links:

<translate>
PHP ([http://php.net website]) is a programming language.
</translate>
Lists Lists can get long, so might want to split them into multiple parts with one item in each unit.

Do so only if the items are sufficiently independent to be translated separately in all languages: don't create "lego messages". For instance, you must avoid to split a single sentence in multiple units, or to separate logically dependent parts which may affect each other (with regard to punctuation or style of the list, for instance). To split a list, use ‎<translate>-tags for each item without including leading asterisks/hashes/semicolons. Do not insert blank lines as this will break the HTML output.

* <translate>General principles</translate>
* <translate>Headings</translate>
* <translate>Images</translate>
* <translate>Tables</translate>

tai

<translate>
Please visit:
* our main page
* then the FAQ page.
</translate>
Numbers With numbers and other non-linguistic elements you may want to pull the actual number out of translation and make it a variable. This has multiple benefits:
  • You can update the number without invalidating translations.
  • Translation memory can work better when the changing number is ignored.
<translate>
Income this month <tvar name=income>{{FORMATNUM:3567800}}</tvar> EUR
</translate>

Note that this prevents the translators from localising the number by doing currency conversion. The FORMATNUM call makes sure the number is formatted correctly in the target language.

Templates Templates have varying functions and purposes, so the best solution depends on what the template is for. If the template is not a part of longer paragraph, it should be left out, unless it has parameters that need to be translated. If the template has no linguistic content itself, you don't need to do anything for the template itself. For an example of templates translated with page translation, see Malline:Laajennus-Translate . To use this template, you need to have another template similar to {{Translatable navigation template }}, because you cannot include the template by {{TemplateName}} anymore. This is not yet provided by the Translate extension itself, but that is in the plans.

Another way is to use the unstructured element translation to translate the template, but then the language of the template will follow the user's interface language, not the language of the page they are viewing.

Attributes By default the Translate extension may wrap outdated translation units to highlight them and untranslated units to set proper language metadata.

In some circumstances the additional markup added by this wrapping is not suitable.

<abbr title="<translate nowrap>Frequently asked questions</translate>"><translate>FAQ</translate></abbr>
Translation language (introduced in 5e8106cdc353) When text is using language-dependent formatting methods, a mismatch may appear for untranslated sections.

{{TRANSLATIONLANGUAGE}} can be used to avoid that.

2020-09-15 is {{#time:l|2020-09-15|fi}}

The above input may render as:

  • englanti: 2020-09-15 is Tuesday.
  • suomi: 2020-09-15 on tiistai.

Without the magic word, untranslated text on a Finnish translation page would render as:

  • 2020-09-15 is tiistai
Translated page language (introduced in 98b6958a2471) Translated templates may want to set the language they are actually in (e.g. on a wrapper HTML element). When used outside of ‎<translate> tags, {{TRANSLATIONLANGUAGE}} returns the language of the page it’s directly in (as opposed to the language of the page on which the reader sees it). Suppose {{1/en}} is transcluded in the page titled 2/de.
  • If {{PAGELANGUAGE}} is used in the text of {{1/en}}, it returns de.
  • If {{TRANSLATIONLANGUAGE}} is used in the text of {{1/en}} (outside of ‎<translate> tags), it returns en.
Translatable page (introduced in a582f3ad21bd) It can be used in templates that are transcluded on both translatable and non-translatable pages, and should behave differently depending on whether the page is translatable (e.g. use user language on non-translatable pages). It returns the title of the translation page (the page other languages are translated from) if a page is translatable (including translated pages), and nothing if the page is not translatable. Similarly to the ‎<languages> parser tag, it returns nothing if the page contains translation markup but hasn’t been marked for translation yet.
{{#if:{{TRANSLATABLEPAGE}}|{{Some template}}|{{Some template/{{int:lang}}}}}}

Assuming Template:Some template is a translatable template with language-aware transclusion (see above) enabled, and MediaWiki:lang and its translations are set up on the given wiki similarly to mediawiki.org, the above code transcludes it in the page language on translatable pages, and in the UI language on other pages.

Changing the source text

General principles:

  • Avoid changes
  • Make the changes as isolated as possible
  • Do not add translation unit markers yourself

Unit markers. When a page is marked for translation, the system will update the translatable page source and add unique identifiers, called "unit markers", for each translation unit. See example below. An example of a unit marker is <!--T:1-->. These unit markers are crucial for the system, which uses them to track changes to each translation unit. You should never add unit markers yourself. The unit markers are always on the line before the unit; or, if it starts with a heading, after the first heading on the same line. The different placement for headings is needed to keep section editing working as expected.

<translate>
== Birds == <!--T:1-->
Birds are animals which....

<!--T:2-->
Birds can fly and...
</translate>

Changing unit text. Changing is the most common operation for translation units. You can fix spelling mistakes, correct grammar or do other changes to the unit. When re-marking the page for translation, you will see the difference in the unit text. The same difference is also shown to translators when they update their translations. For simple spelling fixes and other cases where you don't want the existing translations to be highlighted on the translated pages, you can avoid invalidating them: translators will still see the difference if they ever update the translation for any reason.

Adding new text. You can freely add new text inside ‎<translate> tags. Make sure that there is one empty line between adjacent units, so that the system will see it as a new unit. You can also add ‎<translate> tags around the new text, if it is not inside existing ‎<translate> tags. Again, do not add unit markers yourself, the system will do it.

Deleting text. You can delete whole units. If you do so, also remove the unit marker.

Splitting units. You can split existing units by adding an empty line in the middle of a unit, or by placing ‎<translate> tags so that they split the unit. You can either keep the unit marker with the first unit or remove it altogether. In the first case, translators see the old text when updating the old translation. If you removed the unit marker, both units will behave as if no translation ever existed, after the page is re-marked for translation.

Original state Keeping the marker Removing the marker
<!--T:1-->
Cat purrs. Dog barks.
<!--T:1-->
Cat purrs.

<!--T:2--> (Added after remarking)
Dog barks.
<!--T:2--> (Added after remarking)
Cat purrs.

<!--T:3--> (Added after remarking)
Dog barks.
Kissa kehrää. Koira haukkuu. Kissa kehrää. Koira haukkuu.

Dog barks.

Cat purrs.

Dog barks.

Merging units. If you merge units, you have to remove at least all but one unit marker.

Moving units. You can move units around without invalidating translations: just move the unit marker together with the rest of the unit.

Before marking the new version of the page for translation, ensure that the best practices are followed, especially that translators get a new translation unit if the content has changed. Also make sure that there are no unnecessary changes to prevent wasting translators' time. If the source page is getting many changes, it may be worthwhile to wait for it to stabilize, and push the work for translators only after that.

Unused unit translations are not deleted automatically, but that should not cause trouble.

Migrating to page translation

If you have been translating pages before using the page translation system, you might want to migrate the pages to the new system, at least the ones you expect to have new translations and want statistics for. You will probably have existing templates for language switching and maybe different page naming conventions.

You can start migration by cleaning up, tagging and marking the source page. You can keep the existing language-switching templates while you migrate the old translations. If your pages follow the language code subpages naming convention, they will be replaced with the source text after marking the source page for translation, but you'll still be able to access translations from history.

This manual task has been partly automated by Special:PageMigration (available to translation administrators only), which shows the source and target units besides each other and allows the user to adjust the units by providing a set of features mentioned later in this page.

How to use?

Screenshot showing an example use of Special:PageMigration for "Help:Special pages" as page name and "fr" as language code.
  1. Go to Special:PageMigration
  2. Enter the title of the page and the language code. For example, "Help:Special pages" & "fr"
  3. The source text which was divided into units by Translate and the imported translations will be shown besides each other with some initial alignment.
  4. Use the actions available for each unit to manually do the remaining alignment
  5. As translated units are editable, do required manual improvements (for add translation variables, fix links and markup, etc.)
  6. Click on the "Tallenna" button. This will create pages under the Translations namespace of the form Translations:Page/<translation unit identifier>/<language code>. The old translations have been imported into Translate.
  7. Else, if you wish to abort the importing, click on the 'Cancel' button.

Actions available

Each row consisting of source and target unit has a set of action icons. They are used as follows:

  1. Add: Clicking on this action icon adds a new empty unit below the current one. Use this feature if you want to split the current unit and need a unit below.
  2. Swap: Clicking on this action icon swaps the content of the current unit with the unit below it. You can use this feature when the units get aligned improperly due to different ordering of sections. Or when you need to drag a unit below or above. In either case, remember it swaps with the unit below and does not create any additional units.
  3. Delete: Clicking on this action icon completely removes the corresponding target unit from the page and shifts the remaining target units up by one unit. Use this to remove unwanted content like code or imported translations which are present completely in the source language. Note: this irrevocable action (in the current session).

Troubleshooting

  1. If you mark a page for translation and immediately go to the special page and try to import translations, you may get an error message like "Sivulla <page-name>/<language-name> ei ole vanhoja käännöksiä.". This is because FuzzyBot didn't fuzzy the messages on the old page yet: the tool won't find an edit by FuzzyBot on the translation page. In this case, simply wait for FuzzyBot to do its job. Once an edit is seen, you can proceed with the imports.
  2. Please wait for some time after pressing the "Tallenna" button. While the button background remains gray, there is an ongoing process of importing non-empty units. Once the button becomes colored again, the import is completed.
  3. Within the translation system, you can mark an existing translation as outdated by adding !!FUZZY!! at the start of the translation unit's translated message box.

Tips

  1. Migration will be easier if you first (before the mark to translation) check whether existing translations are similar to the original English text, and manually edit the structure of pages: break paragraphs and lists, add the missing headings (even if empty).
  2. Will be useful to check the result in the core translation interface - some of the units may be immediately marked as obsolete because of errors markup or if not all of the translation variables was added.
  3. Translation of the page title will have to be added manually. If you do not know very well the language of the imported page, you can try to find the translation of the page title among the "links here" or sometimes in redirects.