下載與上傳翻譯¶
您可以從轉換中匯出文件,進行變更,並再次匯入它們。這允許脫機工作,然後將變更合併回現有翻譯。這也有效,即使它在此期間已變更。
備註
Available options might be limited by access control settings.
下載翻譯¶
From the project or component dashboard, translatable files can be downloaded in the Files menu.
第一個選項是以原始格式下載檔案,因為它儲存在儲存庫中。在這種情況下,翻譯中的任何掛起變更都會被提交,最新檔案是不帶任何轉換的產量。
您還可以下載轉換為廣泛使用的在地化格式之一的翻譯。轉換後的檔案將富裕地在 Weblate 中提供的資料。例如其他上下文、評論或標誌。通過以下內容提供了多種檔案格式 檔案 ↓ 自訂下載選單:
gettext PO (
po)XLIFF 1.1 附帶 gettext 擴充 (
xliff)XLIFF 1.1 (
xliff11)TermBase eXchange (
tbx)Translation Memory eXchange (
tmx)gettext MO(僅當翻譯使用 gettext PO 時可用)(
mo)CSV (
csv)Excel Open XML (
xlsx)JSON(僅可用於單語言翻譯)(
json)JSON nested structure file (only available for monolingual translations) (
json-nested)Android String Resource (only available for monolingual translations) (
aresource)iOS 字串(僅可用於單語言翻譯)(
strings)
提示
The content available in the converted files differs based on file format features, you can find overview in 翻譯類型功能.
下載組件、類別或專案¶
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 下載翻譯.
上傳翻譯¶
當您進行變更時,請使用檔案選單中的上傳翻譯。
支援的檔案格式¶
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.
匯入方法¶
這些是上傳翻譯文件時提供的選項:
- 新增為翻譯 (
translate) 匯入的字串會被加入為現有字串的翻譯。這是最常見的使用情境,也是預設行為。
只能從上傳的文件中使用翻譯,而且沒有其他內容。
This option is available only if the user has the "Edit strings" permission.
- 新增為建議 (
suggest) 匯入的字串會以建議形式加入。如果您想檢閱上傳的字串,請選擇此選項。
只能從上傳的文件中使用翻譯,而且沒有其他內容。
This option is available only if the user has the "Add suggestion" permission.
- Add as approved translation (
approve) 匯入的字串會以核可翻譯形式加入。如果您在上傳翻譯前已事先檢閱過翻譯,請選擇此選項。
只能從上傳的文件中使用翻譯,而且沒有其他內容。
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) 更新雙語言翻譯文件中的來源字串。這類似於什麼 更新 PO 檔案以符合 POT (msgmerge) 。
This option is available only for some file formats and only if the user has the "Upload translations" permission.
- 新增字串 (
add) 將新字串加入為翻譯,略過現有的字串。
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 管理字串 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.
需要編輯的字串¶
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".