<a id="asciidoc"></a>

# AsciiDoc 文件

#### Versionadded
Added in version 5.16.1.

从 AsciiDoc 文件中提取可翻译内容并提供翻译。

#### NOTE
和其他多数格式不同，翻译文件的更改不会被导入到 Weblate，因为无法可靠地完成这一任务。翻译真实性源自 Weblate 而不是已翻译的文件。

#### SEE ALSO
[AsciiDoc](https://docs.translatehouse.org/projects/translate-toolkit/en/latest/formats/asciidoc.html)

示例文件：

```default
== Ahoj světe!

Orangutan has five bananas.

Try Weblate at https://demo.weblate.org/[weblate.org]!

_Thank you for using Weblate._
```

<!-- AUTOGENERATED START: format-features asciidoc -->
<!-- This section is automatically generated by `./manage.py list_format_features`. Do not edit manually. -->

#### 支持的功能

| 文件扩展名                                                                       | `.ad`, `.adoc`, `.asciidoc`                                                                              |
|-----------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|
| Linguality [ⓘ](https://docs.weblate.org/zh-cn/latest/formats.md#bimono)          | 单语言                                                                                                      |
| 支持复数 [ⓘ](https://docs.weblate.org/zh-cn/latest/formats.md#format-plurals)        | `No`                                                                                                     |
| 支持描述 [ⓘ](https://docs.weblate.org/zh-cn/latest/formats.md#format-description)    | `No`                                                                                                     |
| 支持解释 [ⓘ](https://docs.weblate.org/zh-cn/latest/formats.md#format-explanation)    | `No`                                                                                                     |
| 支持上下文 [ⓘ](https://docs.weblate.org/zh-cn/latest/formats.md#format-context)       | `No`                                                                                                     |
| 支持位置 [ⓘ](https://docs.weblate.org/zh-cn/latest/formats.md#format-location)       | `No`                                                                                                     |
| 支持标记 [ⓘ](https://docs.weblate.org/zh-cn/latest/formats.md#format-flags)          | `No`                                                                                                     |
| API 标识符                                                                     | `asciidoc`                                                                                               |
| 支持只读字符串 [ⓘ](https://docs.weblate.org/zh-cn/latest/formats.md#read-only-strings)  | `No`                                                                                                     |
| 支持删除过时字符串 [ⓘ](https://docs.weblate.org/zh-cn/latest/formats.md#obsolete-strings) | `No`                                                                                                     |
| 检查此格式添加的标记 [ⓘ](https://docs.weblate.org/zh-cn/latest/admin/checks.md#custom-checks)   | [不安全的 HTML](https://docs.weblate.org/zh-cn/latest/user/checks.md#check-safe-html), `strict-same`, `asciidoc-text` |
<!-- AUTOGENERATED END: format-features asciidoc -->

## Weblate 配置

|             | 典型的 Weblate [部件配置](https://docs.weblate.org/zh-cn/latest/admin/projects.md#component)   |
|-------------|-----------------------------------------------------------------------------|
| 文件掩码        | `path/*.adoc`                                                               |
| 单语言译文模版语言文件 | `path/en.adoc`                                                              |
| 新语种的翻译模版    | `path/en.adoc`                                                              |
| 文件格式        | AsciiDoc 文件                                                                 |
| 文件格式参数      | `merge_duplicates=True`                                                     |

## 处理重复的字符串

Weblate 默认将字符串的每次出现视为不同的翻译单元来提供基于行的上下文。在 AsciiDoc 表格中这可能有问题，因为调整行顺序会改变上下文，导致译文丢失。

整合相同字符串到单一翻译单元，在 [文件格式参数](https://docs.weblate.org/zh-cn/latest/admin/projects.md#component-file-format-params) 中启用 Deduplicate identical strings.

#### NOTE
启用此选项为已合并单元禁用基于行的上下文，确保即使行或部分在文档内移动译文也保持稳定。
