支持的文件格式¶
Weblate 支持 translate-toolkit 理解的大多数翻译格式,但是每种格式都略有不同,可能会出现未经良好测试的格式问题。
注解
为您的应用程序选择文件格式时,最好在您使用的工具箱/平台中保留一些公认的格式。这样,您的翻译人员可以额外使用他们习惯使用的任何工具,并且更有可能为您的项目做出贡献。
双语和单语格式¶
支持 monolingual 和 bilingual 格式。双语格式在单个文件中存储两种语言 —— 源和翻译(典型示例是 GNU gettext,XLIFF 或 苹果 iOS 字符串 字符串)。另一方面,单语格式通过 ID 识别字符串,每个语言文件仅包含那些语言到任何给定语言(通常是 安卓字符串资源)的映射。两种变体都使用某些文件格式,请参见下面的详细说明。
为了正确使用单语文件,Weblate 要求访问一个包含完整字符串列表的文件,以与其源一起翻译 —— 该文件在 Weblate 中称为 单语言译文模版语言文件,尽管命名方式可能会有所不同。
另外,可以利用 中间语言文件 扩展此工作流程,以包括开发人员提供的字符串,但不要在最终的字符串中使用。
自动检测¶
Weblate 可以自动检测几种常用的文件格式,但是这种检测会损害您的性能,并且会限制特定于给定文件格式的功能(例如,自动添加新翻译)。
翻译类型功能¶
所有受支持格式的功能:
格式 |
语言能力 1 |
复数 2 |
注释 3 |
语境 4 |
位置 5 |
标记 8 |
附加状态 6 |
---|---|---|---|---|---|---|---|
双语 |
支持 |
支持 |
支持 |
支持 |
是 9 |
需要编辑 |
|
单一 |
支持 |
支持 |
支持 |
支持 |
是 9 |
需要编辑 |
|
二者 |
支持 |
支持 |
支持 |
支持 |
是 10 |
需要编辑,已同意 |
|
二者 |
不支持 |
支持 |
不支持 |
不支持 |
不支持 |
||
单一 |
支持 |
支持 |
不支持 |
不支持 |
不支持 |
||
单一 |
不支持 |
支持 |
不支持 |
支持 |
不支持 |
||
二者 |
支持 |
支持 |
不支持 |
支持 |
是 10 |
需要编辑 |
|
单一 |
支持 |
是 7 |
不支持 |
不支持 |
是 10 |
||
双语 |
不支持 |
支持 |
不支持 |
不支持 |
不支持 |
||
单一 |
否 11 |
支持 |
不支持 |
不支持 |
不支持 |
||
单一 |
不支持 |
不支持 |
不支持 |
不支持 |
不支持 |
||
单一 |
支持 |
不支持 |
不支持 |
不支持 |
不支持 |
||
单一 |
支持 |
不支持 |
不支持 |
不支持 |
不支持 |
||
单一 |
支持 |
支持 |
不支持 |
不支持 |
不支持 |
||
单一 |
支持 |
支持 |
不支持 |
不支持 |
不支持 |
||
单一 |
不支持 |
支持 |
不支持 |
不支持 |
是 10 |
||
二者 |
不支持 |
支持 |
支持 |
支持 |
不支持 |
需要编辑 |
|
单一 |
不支持 |
支持 |
不支持 |
不支持 |
不支持 |
||
单一 |
支持 |
支持 |
不支持 |
不支持 |
不支持 |
||
单一 |
不支持 |
不支持 |
不支持 |
不支持 |
不支持 |
||
单一 |
不支持 |
不支持 |
不支持 |
不支持 |
是 10 |
||
单一 |
不支持 |
支持 |
不支持 |
不支持 |
不支持 |
||
单一 |
不支持 |
支持 |
支持 |
支持 |
不支持 |
需要编辑 |
|
单一 |
不支持 |
不支持 |
不支持 |
不支持 |
不支持 |
||
单一 |
不支持 |
不支持 |
不支持 |
支持 |
不支持 |
||
单一 |
不支持 |
不支持 |
不支持 |
不支持 |
不支持 |
||
单一 |
不支持 |
不支持 |
不支持 |
不支持 |
不支持 |
||
单一 |
不支持 |
不支持 |
不支持 |
不支持 |
不支持 |
||
单一 |
不支持 |
不支持 |
不支持 |
不支持 |
不支持 |
||
单一 |
不支持 |
不支持 |
不支持 |
不支持 |
不支持 |
||
双语 |
不支持 |
支持 |
不支持 |
不支持 |
是 10 |
||
单一 |
不支持 |
不支持 |
不支持 |
不支持 |
不支持 |
- 1
请参见 双语和单语格式
- 2
将带有不同数量的字符串正确本地化时复数是必要的。
- 3
注释能够用户传递要翻译的字符串的附加信息。
- 4
文本用于却别不同范围中使用的相同字符串(例如`Sun`可以用作 “Sunday” 名称的缩写,或用作我们最近的恒星)。
- 5
源代码中字符串的位置会帮助熟练的译者识别出字符串如何使用。
- 6
除了 “Not translated” (未翻译)和 “Translated” (已翻译),文件格式支持的其它状态。
- 7
放在
<string>
元素前的 XML 注释,解析为开发者的注释。- 8
请参见 使用标志定制行为
- 9(1,2)
gettext 类型的注释用作标记。
- 10(1,2,3,4,5,6)
对于基于格式所有 XML,标记从非标准的属性
weblate-flags
中提取。此外,max-length:N
通过maxwidth
attribute <http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#maxwidth>`_如在 XLIFF 标准中定义的,请参见 :ref:`xliff-flags。- 11
只对于 Laravel 来支持复数,在字符串语法中使用来定义它们,请参见 Localization in Laravel。
GNU gettext¶
翻译自由软件用得最广泛的格式。
通过调整文件头或链接到相应的源文件,可以支持存储在文件中的语境信息。
双语 gettext PO 文件通常如下所示:
#: weblate/media/js/bootstrap-datepicker.js:1421
msgid "Monday"
msgstr "Pondělí"
#: weblate/media/js/bootstrap-datepicker.js:1421
msgid "Tuesday"
msgstr "Úterý"
#: weblate/accounts/avatar.py:163
msgctxt "No known user"
msgid "None"
msgstr "Žádný"
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
空 |
新翻译的译文模版 |
|
文件格式 |
Gettext PO file |
参见
使用GNU gettext 来翻译软件、使用 Sphinx 翻译文档、Gettext on Wikipedia、 PO Files、 更新“配置文件”中的 ALL_LINGUAS 变量、 自定义 gettext 输出、 更新 LINGUAS 文件、 生成 MO 文件、 更新 PO 文件以匹配 POT 文件 (msgmerge)
单语 gettext¶
一些项目决定使用 gettext 作为单语格式 —— 它们仅在源代码中编码 ID,然后将字符串翻译成所有语言,包括英语。支持此功能,尽管在将组件导入 Weblate 时必须明确选择此文件格式。
单语言的 gettext PO 文件通常如下所示:
#: weblate/media/js/bootstrap-datepicker.js:1421
msgid "day-monday"
msgstr "Pondělí"
#: weblate/media/js/bootstrap-datepicker.js:1421
msgid "day-tuesday"
msgstr "Úterý"
#: weblate/accounts/avatar.py:163
msgid "none-user"
msgstr "Žádný"
基本语言文件将是:
#: weblate/media/js/bootstrap-datepicker.js:1421
msgid "day-monday"
msgstr "Monday"
#: weblate/media/js/bootstrap-datepicker.js:1421
msgid "day-tuesday"
msgstr "Tuesday"
#: weblate/accounts/avatar.py:163
msgid "none-user"
msgstr "None"
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
|
文件格式 |
Gettext PO 文件(单语) |
XLIFF¶
创建基于 XML 的格式来标准化翻译文件,但最终它是该领域中 许多标准 之一。
XML Localization Interchange File Format (XLIFF) 通常用作双语言格式,但 Weblate 也支持其作为单语言格式。
参见
XML Localization Interchange File Format (XLIFF) 规范
翻译状态¶
在 3.3 版更改: 3.3 版本前的 Weblate 忽略 state
属性。
文件中的 state
属性在 Weblate 中被部分处理并映射为 “Needs edit” (需要编辑)的状态(如果出现目标的话,后面的状态用于将字符串标记为需要编辑: new
、 needs-translation
、 needs-adaptation
、 needs-l10n
)。如果应该省略 state
属性,只要 <target>
元素存在,那么字符串被认为需要翻译。
如果翻译字符串具有 approved="yes"
,那么它还将被导入 Weblate 作为 “Approved”(同意的),任何其它内容被导入作为 “Waiting for review” (等待复核,这与 XLIFF 规范匹配)。
当存储时,Weblate 如无必要不会添加其它属性:
state
属性只在字符串标记为需要编辑的情况下添加。approved
属性只在字符串已经被复查的情况下添加。在其它情况下不添加属性,但在它们出现的情况下更新。
那意味着当使用 XLIFF 格式时,强烈推荐打开 Weblate 复查过程,从而能看到并更改字符串的同意状态。
相似地在导入这样的文件时(在上传表格中),应该选择 Processing of strings needing edit 之下的 Import as translated。
参见
XLIFF 中的空白字符和新行符¶
在 XML 格式中不区分通常类型或量的空白字符。如果想要保留,必须将 xml:space="preserve"
标记添加到字符串中。
例如:
<trans-unit id="10" approved="yes">
<source xml:space="preserve">hello</source>
<target xml:space="preserve">Hello, world!
</target>
</trans-unit>
指定翻译标记¶
还可以通过使用 weblate-flags
属性指定附加的翻译标记(请参见 使用标志定制行为)。Weblate 还理解来自 XLIFF 规范的 maxwidth
和 font
属性:
<trans-unit id="10" maxwidth="100" size-unit="pixel" font="ubuntu;22;bold">
<source>Hello %s</source>
</trans-unit>
<trans-unit id="20" maxwidth="100" size-unit="char" weblate-flags="c-format">
<source>Hello %s</source>
</trans-unit>
解析 font
属性用于字体集、尺寸和粗细,上面的示例显示了全部,尽管只需要字符集。字符集中的任何空白字符被转换为下划线,所以 Source Sans Pro
变成 Source_Sans_Pro
,当命名字符集时请记住这些请参见 管理字型)。
字符串键¶
Weblate 通过 resname
属性在它出线的情况下识别 XLIFF 文件中的单元,并退回到 id
(如果出现的话与 file
标签一起)。
resname
属性被认为是人类友好的单元识别符,对 Weblate 比 id
更适于显示。在整个 XLIFF 文件中 resname
具有一致性。这是 Weblate 需要的,并且不被 XLIFF 标准覆盖——它不在这个属性上放入任何独特性限制。
用于双语言 XLIFF 的典型 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
空 |
新翻译的译文模版 |
|
文件格式 |
XLIFF 翻译文件 |
用于单语言 XLIFF 的典型 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
|
文件格式 |
XLIFF 翻译文件 |
Java 属性¶
用于翻译的本地 Java 格式。
Java 属性通常用作单语言翻译。
Weblate 支持这个格式的 ISO-8859-1、UTF-8 和 UTF-16 变体。它们所有都支持存储 Unicode 字符,只是编码不同。在 ISO-8859-1 中,使用了 Unicode 转义序列(例如 zkou\u0161ka
),所有其它编码字符直接或者在 UTF-8 中或者在 UTF-16 中。
注解
加载转义序列也在 UTF-8 模式中工作,因此请小心选择正确的编码组,与您应用的需要匹配。
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
空 |
文件格式 |
Java Properties (ISO-8859-1) |
GWT 属性¶
用于翻译的本地 GWT 格式。
GWT 属性通常用作单语言翻译。
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
空 |
文件格式 |
GWT 属性 |
INI 翻译¶
4.1 新版功能.
用于翻译的 INI 文件格式。
INI 翻译通常用作单语言翻译。
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
空 |
文件格式 |
INI File |
Inno Setup INI 翻译¶
4.1 新版功能.
用于翻译的 Inno Setup INI 文件格式。
Inno Setup INI 翻译,通常用作单语言翻译。
注解
唯一需要注意的差异是 INI 翻译 支持 %n
和 %t
占位符用于换行和制表符。
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
空 |
文件格式 |
Inno Setup INI 文件 |
注解
当前只支持 Unicode 文件(.islu
),当前不支持 ANSI 变体(.isl
)。
Joomla 翻译¶
2.12 新版功能.
用于翻译的本地 Joomla 格式。
Joomla 翻译通常用作单语言翻译。
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
空 |
文件格式 |
Joomla 语言文件 |
Qt Linguist .ts¶
基于 Qt 的应用中使用的翻译格式。
Qt Linguist 文件既用作双语翻译,也用作单语翻译。
用作双语言时典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
空 |
新翻译的译文模版 |
|
文件格式 |
Qt Linguist 翻译文件 |
用作单语言时典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
|
文件格式 |
Qt Linguist 翻译文件 |
参见
安卓字符串资源¶
用于翻译应用的安卓特定文件格式。
安卓字符串是单语言的,单语言译文模版语言文件 存储位置不同于其他 res/values/strings.xml
。
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
空 |
文件格式 |
安卓字符串资源 |
注解
当前不支持安卓的 string-array 架构。为了解决这个问题,可以将字符串数组分开:
<string-array name="several_strings">
<item>First string</item>
<item>Second string</item>
</string-array>
变为:
<string-array name="several_strings">
<item>@string/several_strings_0</item>
<item>@string/several_strings_1</item>
</string-array>
<string name="several_strings_0">First string</string>
<string name="several_strings_1">Second string</string>
指向 string 元素的 string-array 应存储在不同文件中,并且不为翻译所用。
这个脚本可以帮助预处理现有的 strings.xml 文件和翻译:https://gist.github.com/paour/11291062
苹果 iOS 字符串¶
翻译应用的苹果特定的文件格式,用于 iOS 和 iPhone/:index:`iPad <pair: iPad; translation>`应用的翻译。
苹果 iOS 字符串通常用作双语言翻译。
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
空 |
文件格式 |
iOS Strings (UTF-8) |
PHP 字符串¶
PHP翻译通常只包含一种语言,因此建议指定(最常见的)带英语字符串的模板文件。
示例文件:
<?php
$LANG['foo'] = 'bar';
$LANG['foo1'] = 'foo bar';
$LANG['foo2'] = 'foo bar baz';
$LANG['foo3'] = 'foo bar baz bag';
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
|
文件格式 |
PHP 字符串 |
Laravel PHP 字符串¶
在 4.1 版更改.
Laravel PHP 本地化文件也支持复数:
<?php
return [
'welcome' => 'Welcome to our application',
'apples' => 'There is one apple|There are many apples',
];
JSON 文件¶
2.0 新版功能.
在 2.16 版更改: 自从 Weblate 2.16 和最早 2.2.4 版本的 translate-toolkit,也支持嵌套结构的 JSON 文件。
在 4.3 版更改: 即使对于在之前发布版本中中断的复杂情况,JSON 文件的结构也适当保留。
JSON 格式主要用于翻译 Javascript 中实施的应用。
Weblate 当前支持 JSON 翻译的几个变体:
简单的键/值文件,由例如 vue-i18n 或 react-intl 使用。
具有嵌套键的文件。
JSON 翻译通常是单语言的,因此推荐指定带有(最经常使用的)英语字符串的翻译模板文件。
示例文件:
{
"Hello, world!\n": "Ahoj světe!\n",
"Orangutan has %d banana.\n": "",
"Try Weblate at https://demo.weblate.org/!\n": "",
"Thank you for using Weblate.": ""
}
也支持嵌套文件(要求请参见上面),这样的文件看起来像:
{
"weblate": {
"hello": "Ahoj světe!\n",
"orangutan": "",
"try": "",
"thanks": ""
}
}
提示
JSON file 和 JSON nested structure file 都可以处理相同类型的文件。翻译时都保留现有的 JSON 架构。
The only difference between them is when adding new strings using Weblate.
The nested structure format parses the newly added key and inserts the new
string into the matching structure. For example app.name
key is inserted as:
{
"app": {
"name": "Weblate"
}
}
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
空 |
文件格式 |
JSON nested structure file |
参见
JSON i18next files¶
在 2.17 版更改: Since Weblate 2.17 and with translate-toolkit at-least 2.2.5, i18next JSON files with plurals are supported as well.
i18next is an internationalization framework written in and for JavaScript. Weblate supports its localization files with features such as plurals.
i18next translations are monolingual, so it is recommended to specify a base file with (what is most often the) English strings.
注解
Weblate supports the i18next JSON v3 format. The v2 and v1 variants are mostly compatible, with exception of how plurals are handled.
示例文件:
{
"hello": "Hello",
"apple": "I have an apple",
"apple_plural": "I have {{count}} apples",
"apple_negative": "I have no apples"
}
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
空 |
文件格式 |
i18next JSON file |
go-i18n JSON files¶
4.1 新版功能.
go-i18n translations are monolingual, so it is recommended to specify a base file with (what is most often the) English strings.
注解
Weblate supports the go-i18n JSON v1 format, for flat JSON formats please use JSON 文件. The v2 format with hash is currently not supported.
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
空 |
文件格式 |
go-i18n JSON file |
参见
JSON, go-i18n, 自定义 JSON 输出, 清理翻译文件,
ARB File¶
4.1 新版功能.
ARB translations are monolingual, so it is recommended to specify a base file with (what is most often the) English strings.
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
空 |
文件格式 |
ARB file |
WebExtension JSON¶
2.16 新版功能: This is supported since Weblate 2.16 and with translate-toolkit at-least 2.2.4.
File format used when translating extensions for Mozilla Firefox or Google Chromium.
注解
While this format is called JSON, its specification allows to include comments, which are not part of JSON specification. Weblate currently does not support file with comments.
示例文件:
{
"hello": {
"message": "Ahoj světe!\n",
"description": "Description",
"placeholders": {
"url": {
"content": "$1",
"example": "https://developer.mozilla.org"
}
}
},
"orangutan": {
"message": "",
"description": "Description"
},
"try": {
"message": "",
"description": "Description"
},
"thanks": {
"message": "",
"description": "Description"
}
}
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
空 |
文件格式 |
WebExtension JSON file |
.XML resource files¶
2.3 新版功能.
A .XML resource (.resx) file employs a monolingual XML file format used in Microsoft .NET applications. It is interchangeable with .resw, when using identical syntax to .resx.
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
空 |
文件格式 |
.NET 资源文件 |
CSV 文件¶
2.4 新版功能.
CSV 文件可以包含源和翻译的简单列表。Weblate 支持以下文件:
带有标头定义字段(
location
,source
,target
,ID
,fuzzy
,context
,translator_comments
,developer_comments
)的文件。这是推荐的方法,因为它最不容易出错。挑选 CSV file 作为一种文件格式。具有两个字段的文件 —— 源和翻译(按此顺序),选择 Simple CSV file 作为文件格式。
无标头文件字段顺序由 translate-toolkit:
location
、source
、target
、ID
、fuzzy
、context
、translator_comments
、developer_comments
所定义。选择 CSV file 作为一种文件格式。Remember to define 单语言译文模版语言文件 when your files are monolingual (see 双语和单语格式).
警告
CSV 格式当前会自动检测 CSV 文件的方言。在某些情况下,自动检测可能会失败,并且您会得到不同的结果。对于值中包含换行符的 CSV 文件尤其如此。作为一种解决方法,推荐省略引用的字符。
示例文件:
Thank you for using Weblate.,Děkujeme za použití Weblate.
双语 CSV 文件的典型Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
空 |
新翻译的译文模版 |
|
文件格式 |
CSV 文件 |
单语 CSV 文件的典型 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
|
文件格式 |
简单 CSV 文件 |
参见
YAML files¶
2.9 新版功能.
The plain YAML files with string keys and values. Weblate also extract strings from lists or dictionaries.
Example of a YAML file:
weblate:
hello: ""
orangutan": ""
try": ""
thanks": ""
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
空 |
文件格式 |
YAML file |
参见
Ruby YAML files¶
2.9 新版功能.
Ruby i18n YAML files with language as root node.
Example Ruby i18n YAML file:
cs:
weblate:
hello: ""
orangutan: ""
try: ""
thanks: ""
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
空 |
文件格式 |
Ruby YAML file |
参见
DTD files¶
2.18 新版功能.
Example DTD file:
<!ENTITY hello "">
<!ENTITY orangutan "">
<!ENTITY try "">
<!ENTITY thanks "">
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
空 |
文件格式 |
DTD file |
Flat XML files¶
3.9 新版功能.
Example of a flat XML file:
<?xml version='1.0' encoding='UTF-8'?>
<root>
<str key="hello_world">Hello World!</str>
<str key="resource_key">Translated value.</str>
</root>
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
空 |
文件格式 |
Flat XML file |
参见
Windows RC files¶
在 4.1 版更改: Support for Windows RC files has been rewritten.
注解
Support for this format is currently in beta, feedback from testing is welcome.
Example Windows RC file:
LANGUAGE LANG_CZECH, SUBLANG_DEFAULT
STRINGTABLE
BEGIN
IDS_MSG1 "Hello, world!\n"
IDS_MSG2 "Orangutan has %d banana.\n"
IDS_MSG3 "Try Weblate at http://demo.weblate.org/!\n"
IDS_MSG4 "Thank you for using Weblate."
END
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
|
文件格式 |
RC file |
应用商店元数据文件¶
3.5 新版功能.
Metadata used for publishing apps in various app stores can be translated. Currently the following tools are compatible:
The metadata consists of several textfiles, which Weblate will present as separate strings to translate.
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
|
文件格式 |
App store metadata files |
Subtitle files¶
3.7 新版功能.
Weblate 可以翻译多个字幕文件:
SubRip subtitle file (
*.srt
)MicroDVD subtitle file (
*.sub
)Advanced Substation Alpha subtitles file (
*.ass
)Substation Alpha subtitle file (
*.ssa
)
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
|
新翻译的译文模版 |
|
文件格式 |
SubRip subtitle file |
参见
Excel Open XML¶
3.2 新版功能.
Excel Open XML (.xlsx) files can be imported and exported.
When uploading XLSX files for translation, be aware that only the active
worksheet is considered, and there must be at least a column called source
(which contains the source string) and a column called target
(which
contains the translation). Additionally there should be the column called context
(which contains the context path of the translation string). If you use the XLSX
download for exporting the translations into an Excel workbook, you already get
a file with the correct file format.
HTML files¶
4.1 新版功能.
注解
Support for this format is currently in beta, feedback from testing is welcome.
The translatable content is extracted from the HTML files and offered for the translation.
参见
文本文件¶
4.6 新版功能.
注解
Support for this format is currently in beta, feedback from testing is welcome.
The translatable content is extracted from the plain text files and offered for the translation. Each paragraph is translated as a separate string.
这种格式有三种风格:
纯文本文件
DokuWiki 文本文件
MediaWiki 文本文件
OpenDocument Format¶
4.1 新版功能.
注解
Support for this format is currently in beta, feedback from testing is welcome.
The translatable content is extracted from the OpenDocument files and offered for the translation.
IDML Format¶
4.1 新版功能.
注解
Support for this format is currently in beta, feedback from testing is welcome.
The translatable content is extracted from the Adobe InDesign Markup Language files and offered for the translation.
TermBase eXchange 格式¶
4.5 新版功能.
TBX is an XML format for the exchange of terminology data.
典型的 Weblate 组件配置 |
|
---|---|
文件掩码 |
|
单语言译文模版语言文件 |
空 |
新翻译的译文模版 |
空 |
文件格式 |
TermBase eXchange 文件 |
参见
支持其他格式¶
Most formats supported by translate-toolkit which support serializing can be easily supported, but they did not (yet) receive any testing. In most cases some thin layer is needed in Weblate to hide differences in behavior of different translate-toolkit storages.
To add support for a new format, the preferred approach is to first implement support for it in the translate-toolkit.