Help:Extension:Translate/Off-line translation/fr

Cette page explique de quelle manière traduire sans connection internet (traduire hors-ligne). Vous connaissez surement les fichiers Gettext PO si vous avez déjà traduit d'autres projets. Nous allons donc sur cette page décrire la partie particulière à l’extension. Vous pouvez donc déjà lire la page Comment traduire avant celle-ci.

Éviter d'utiliser un navigateur internet est une contrainte importante si vous avez une mauvaise connexion et vous êtes obligés d'utiliser des outils faisant attention au volume de données échangées. Puisque l'extension Translate a été conçue pour le travail collaboratif, elle prend cet aspect en compte. Cela veut aussi dire que les fichiers téléchargés sont rapidement périmés par les contributions d'autres utilisateurs. Il faut donc télécharger une version juste avant de traduire, afin d'éviter un conflit d'édition avec les autres contributeurs qui travaillent sur le site.

Exportation
Vous pouvez télécharger n’importe quel groupe de messages Gettext PO en utilisant la commande Exporter pour une traduction hors ligne dans Special:Translate, si le site l'a activé dans sa configuration. Il est plus prudent de se renseigner sur la démarche propre au Wiki avant de débuter la traduction.

The files are standard Gettext PO files with some extra information. The header contains some extra fields shown below; the  for each message contains an identifier that the Translate extension needs. Some editors are known to strip either the header comments or the  lines, so start with a small file to make sure that your editor does not remove these – it's not funny to realize the editor was buggy after translating hundreds of messages that you cannot import back into the online system! The message documentation is exported as translation comments.

Important header fields: "X-Language-Code: nl\n" "X-Message-Group: ext-abc\n" In this example, "ext-abc" is the name of the message group. For translatable pages, the corresponding message group has the name "page-" + the page name (i.e. for the page "Example", the header would contain the line ).

Example entry in a Translate Gettext po file.
 * 1) . [Wiki] This text is used on the history tab.
 * 2) . [Wiki]

msgctxt "history_short" msgid "History" msgstr "Versionsgeschichte"

Importation
There is no need to translate the file completely. Uploading partially translated message groups is perfectly fine. There are two ways to import these files.

The users with correct user rights can use Special:ImportTranslations to upload and import the translations. The special page processes the file, shows the changes and lets the user import them. For large files with lots of changes the importing might take multiple steps, as the processing time is limited.

Importing can also be done using a command line script in. It's less flexible but can import everything in one go. It also needs intervention from someone with shell access to the server.

The way how imports of off-line translations are handled (or not) depends on your wiki.

Gettext Editors
Here are some tools you can use to edit the files off-line.

WARNING: make sure you are using version 1.4.2 or above, otherwise " " lines are dropped and your work cannot be processed.
 * POedit : Available for all platforms supporting the wxWidgets toolkit, tested on Unix with GTK+ and Windows.
 * gtranslator : Can be used in the GNOME desktop environment on Unix and Linux platforms.
 * gted : To be used as plugin in the Eclipse IDE on Linux, Windows and MAC OS X, has various tools integrated.
 * Lokalize : Uses the KDE 4 Desktop Environment on all platforms supporting it. Has a user wiki and online handbook
 * Translate Toolkit : Toolkit written in the python programming language which must be installed as well, usable on all platforms. Supports several other file formats as well.
 * Virtaal : Multi-format translation tool based on the toolkit above. Currently working in Windows and Linux.
 * OmegaT : Free tool for professional translators written in Java, requires Java installed; available on all platforms. Supports a variety of other file formats, glosssaries, fuzzy matching, and translation memories.
 * Gorm PO file editor : Small program, runs on Windows, no installation required.
 * Better PO Editor : Available for Windows, BSD, Unix, Linux, Mac OS X. Includes spell checker and Google Translate suggestions.