Downloading and uploading translations

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.

注解

Available options might be limited by access control settings.

Downloading translations

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:

  • gettext PO

  • 带有 gettext 扩展的 XLIFF

  • XLIFF 1.1

  • TermBase eXchange

  • 翻译记忆库交换

  • gettext MO

  • CSV

  • Excel Open XML

  • JSON

  • Android 字符串资源

  • iOS 字符串

../_images/file-download.png

Uploading translations

When you have made your changes, use Upload translation in the Files menu.

../_images/file-upload.png

支持的文件格式

Any file in a supported file format can be uploaded, but it is still recommended to use the same file format as the one used for translation, otherwise some features might not be translated properly.

The uploaded file is merged to update the translation, overwriting existing entries by default (this can be turned off or on in the upload dialog).

Import methods

These are the choices presented when uploading translation files:

添加为翻译 (translate)

Imported translations are added as translations. This is the most common usecase, and the default behavior.

添加为建议(suggest)

Imported translations are added as suggestions, do this when you want to have your uploaded strings reviewed.

添加为需要编辑的翻译(fuzzy)

Imported translations are added as translations needing edit. This can be useful when you want translations to be used, but also reviewed.

替换现有翻译文件(replace)

Existing file is replaced with new content. This can lead to loss of existing translations, use with caution.

更新源字符串(source)

Updates source strings in bilingual translation file. This is similar to what 更新 PO 文件以匹配 POT 文件 (msgmerge) does.

此选项仅支持某些文件格式。

添加新字符串 (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.

This option is available only with 管理字符串 turned on.

Conflicts handling

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

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.