Téléchargement et téléversement des traductions

You can export files from a translation, make changes, and import them again. This allows working offline, and then merging changes back into the existing translation. This works even if it has been changed in the meantime.

Note

Les options disponibles peuvent être limitées par les paramètres du contrôle d’accès.

Téléchargement des traductions

From the project or component dashboard, translatable files can be downloaded in the Files menu.

The first option is to download the file in the original format as it is stored in the repository. In this case, any pending changes in the translation are getting committed and the up-to-date file is yield without any conversions.

You can also download the translation converted into one of the widely used localization formats. The converted files will be enriched with data provided in Weblate; such as additional context, comments or flags. Several file formats are available via the FilesCustomize download menu:

  • Fichier PO gettext(po)

  • XLIFF 1.1 avec extensions gettext(xliff)

  • XLIFF 1.1 (xliff11)

  • TermBase eXchange (tbx)

  • Translation Memory eXchange (tmx)

  • gettext MO (disponible uniquement si la traduction utilise gettext PO) (mo)

  • CSV (csv)

  • Excel Open XML (xlsx)

  • JSON (only available for monolingual translations) (json)

  • JSON nested structure file (only available for monolingual translations) (json-nested)

  • Android String Resource (only available for monolingual translations) (aresource)

  • iOS strings (only available for monolingual translations) (strings)

Indication

The content available in the converted files differs based on file format features, you can find overview in Fonctionnalités des types de traduction.

../_images/file-download.webp

Télécharger des composants, des catégories ou des projets

Translation files for a component, category or project can be downloaded at once via the Files menu. The download is always served as a ZIP file, and you can choose original or converted formats similarly as in Téléchargement des traductions.

Téléversement des traductions

Lorsque vos modifications sont terminées, utilisez Téléverser la traduction du menu Fichiers.

../_images/file-upload.webp

Formats des fichiers pris en charge

Vous pouvez téléverser tout fichier pourvu qu’il soit dans l’un des formats supportés, mais il est encore recommandé d’utiliser le même format de fichier que celui utilisé pour la traduction, sinon certaines fonctionnalités pourraient ne pas être traduites correctement.

Méthodes d’importation

Voici les choix proposés lors du téléversement des fichiers de traduction :

Ajouter comme traduction (translate)

Les chaînes importées sont ajoutées en tant que traductions aux chaînes existantes. C’est le cas d’utilisation le plus courant, ainsi que le comportement par défaut.

Seules les traductions sont utilisées à partir du fichier téléversé et sans contenu additionnel.

This option is available only if the user has the « Edit strings » permission.

Ajouter comme suggestion (suggest)

Les chaînes importées sont ajoutées en tant que suggestions. Faites ceci si vous souhaitez que les chaînes que vous avez téléversées soient relues.

Seules les traductions sont utilisées à partir du fichier téléversé et sans contenu additionnel.

This option is available only if the user has the « Add suggestion » permission.

Add as approved translation (approve)

Les chaînes importées sont ajoutées en tant que traductions approuvées. Faites ceci si vous avez déjà relu vos traductions avant de les téléverser.

Seules les traductions sont utilisées à partir du fichier téléversé et sans contenu additionnel.

This option is available only if the user has the « Review strings » permission.

Ajouter comme traduction à vérifier (fuzzy)

Les chaînes importées sont ajoutées comme des traductions nécessitant une édition. Ceci est utile si vous voulez utiliser les traductions mais aussi pour pouvoir les corriger.

Seules les traductions sont utilisées à partir du fichier téléversé et sans contenu additionnel.

This option is available only if the user has the « Edit strings » permission.

Remplacer le fichier de traduction existant (replace)

Le fichier existant est remplacé par le nouveau contenu. Cela peut mener à une perte des traductions existantes, à utiliser avec précaution.

This option is available only if the user has the « Edit component settings » permission or « Add new string », « Remove a string » and « Edit strings » permissions.

Mettre à jour les chaînes sources (source)

Updates source strings in bilingual translation file. This is similar to what Mettre à jour les fichiers PO afin qu’ils correspondent au POT (msgmerge) does.

This option is available only for some file formats and only if the user has the « Upload translations » permission.

Add new strings (add)

Adds new strings to the translation. It skips the one which already exist.

In case you want to both add new strings and update existing translations, upload the file second time with Add as translation.

Only source, translation and key (context) are used from the uploaded file.

This option is available only with Gérer les chaînes turned on and only if the user has the « Add new string » permission.

Conflicts handling

Defines how to deal with uploaded strings which are already translated:

Change only untranslated strings (ignore)

Ignore uploaded translations which are already translated.

Change translated strings (replace-translated)

Remplacer les traductions existantes par celles téléversées mais conserver celles qui ont été approuvées.

Change translated and approved strings (replace-approved)

Remplacer les traductions existantes par celles téléversées, y compris celles approuvées.

Strings needing edit

There is also an option for how to handle strings needing edit in the imported file. Such strings can be handle in one of the three following ways: « Do not import », « Import as string needing edit », or « Import as translated ».

Overriding authorship

With admin permissions, you can also specify authorship of uploaded file. This can be useful in case you’ve received the file in another way and want to merge it into existing translations while properly crediting the actual author.