下載和上傳翻譯

您可以從轉換中導出文件,進行更改,並再次導入它們。這允許脫機工作,然後將更改合併回現有翻譯。這也有效,即使它在此期間已更改。

備註

可用選項可能受到 存取控制 設定的限制。

下載翻譯

從專案或元件儀錶板中,可以在Files選單中下載可翻譯檔。

第一個選項是以原始格式下載檔案,因為它儲存在儲存庫中。在這種情況下,翻譯中的任何掛起變更都會被送交,最新檔案是不帶任何轉換的產量。

您還可以下載轉換為廣泛使用的在地化格式之一的翻譯。轉換後的檔案將富裕地在 Weblate 中提供的資料。例如其他上下文、評論或標誌。通過以下內容提供了多種檔案格式 檔案自訂下載選單:

  • gettext PO (po)

  • XLIFF 1.1 with gettext extensions (xliff)

  • XLIFF 1.1 (xliff11)

  • TermBase eXchange (tbx)

  • Translation Memory eXchange (tmx)

  • gettext MO (only available when translation is using 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)

提示

轉換檔案中可用的內容基於檔案格式功能而不同,您可以尋找概覽 翻譯類型功能

../_images/file-download.webp

Downloading components, categories or projects

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 下載翻譯.

上傳翻譯

當您進行變更時,請使用檔案選單中的上傳翻譯

../_images/file-upload.webp

支援的文件格式

可以上載支援的文件格式中的任何文件,但仍然建議使用與用於翻譯的文件格式相同的文件格式,否則可能無法正確翻譯一些功能。

導入方法

這些是上傳翻譯文件時提供的選項:

新增為翻譯 (translate)

導入的字串作為現有字串的翻譯新增。這是最常見的用例,也是預設行為。

只能從上傳的文件中使用翻譯,而且沒有其他內容。

This option is available only if the user has the 「Edit strings」 permission.

新增為建議 (suggest)

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

只能從上傳的文件中使用翻譯,而且沒有其他內容。

This option is available only if the user has the 「Add suggestion」 permission.

Add as approved translation (approve)

Imported strings are added as approved translations. Do this when you already reviewed your translations before uploading them.

只能從上傳的文件中使用翻譯,而且沒有其他內容。

This option is available only if the user has the 「Review strings」 permission.

新增為需要編輯的翻譯 (fuzzy)

字串作為需要編輯的翻譯匯入。當您希望使用翻譯但也需要審核時,這可能很有用。

只能從上傳的文件中使用翻譯,而且沒有其他內容。

This option is available only if the user has the 「Edit strings」 permission.

取代既有翻譯檔 (replace)

現有文件替換為新內容。這可能導致現有翻譯遺失,謹慎使用。

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.

更新來源字串 (source)

更新雙語翻譯文件中的源字串。這類似於什麼 addon-webblate.gettext.msgmerge

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

新增字串 (add)

將新字串新增到翻譯中。它跳過已經存在的那個。

如果您想要新增新字串並更新現有翻譯,請使用以下時間將文件上載 新增作為翻譯

上傳檔中僅使用源、翻譯和金鑰(情境)。

This option is available only with 管理字串 turned on and only if the user has the 「Add new string」 permission.

衝突處理

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)

Replace existing translations with uploaded ones, but keep approved ones.

Change translated and approved strings (replace-approved)

Replace existing translations with uploaded ones, including approved ones.

需要編輯的字串

還有一個選擇如何處理需要在導入的文件中編輯的字串。這種字串可以以以下三種方式之一句柄:“不要導入”,“導入作為字串需要編輯”,或“轉換為”導入“。

覆蓋作者身份

使用管理員權限,您還可以指定上傳文件的作者身份。如果您以其他方式收到文件並希望將其合併到現有翻譯中,同時正確註明實際作者,這可能會很有用。