<a id="html"></a>

# HTML ファイル

#### Versionadded
Added in version 4.1.

翻訳するコンテンツを HTML ファイルから抽出し、翻訳するために使用します。

#### NOTE
他の多くのフォーマットとは異なり、翻訳ファイルの変更は確実に Weblate にインポートされない点に注意してください。翻訳の正確な情報源は翻訳ファイルではなく Weblate です。

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

ファイルの例:

```html
<html>
  <body>
    <p>Ahoj světe!</p>

    <p>Orangutan has five bananas.</p>

    <p>
      Try Weblate at <a href="https://demo.weblate.org/">weblate.org</a>!
    </p>

    <p>Thank you for using Weblate.</p>
  </body>
</html>
```

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

#### 対応機能

| File extensions                                                                                      | `.htm`, `.html`                                                                          |
|------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------|
| Linguality [ⓘ](https://docs.weblate.org/ja/latest/formats.md#bimono)                                   | Monolingual                                                                              |
| Supports plural [ⓘ](https://docs.weblate.org/ja/latest/formats.md#format-plurals)                      | `No`                                                                                     |
| Supports descriptions [ⓘ](https://docs.weblate.org/ja/latest/formats.md#format-description)            | `No`                                                                                     |
| Supports explanation [ⓘ](https://docs.weblate.org/ja/latest/formats.md#format-explanation)             | `No`                                                                                     |
| Supports context [ⓘ](https://docs.weblate.org/ja/latest/formats.md#format-context)                     | `No`                                                                                     |
| Supports location [ⓘ](https://docs.weblate.org/ja/latest/formats.md#format-location)                   | `No`                                                                                     |
| Supports flags [ⓘ](https://docs.weblate.org/ja/latest/formats.md#format-flags)                         | `No`                                                                                     |
| API identifier                                                                                       | `html`                                                                                   |
| Supports read-only strings [ⓘ](https://docs.weblate.org/ja/latest/formats.md#read-only-strings)        | `No`                                                                                     |
| Supports removing obsolete strings [ⓘ](https://docs.weblate.org/ja/latest/formats.md#obsolete-strings) | `No`                                                                                     |
| Check flags added by this format [ⓘ](https://docs.weblate.org/ja/latest/admin/checks.md#custom-checks)      | [安全でない HTML](https://docs.weblate.org/ja/latest/user/checks.md#check-safe-html), `strict-same` |
<!-- AUTOGENERATED END: format-features html -->

## Weblate の設定

|                      | 典型的な Weblate [コンポーネント構成](https://docs.weblate.org/ja/latest/admin/projects.md#component)   |
|----------------------|-----------------------------------------------------------------------------------|
| ファイル マスク             | `path/*.html`                                                                     |
| モノリンガル用の、基礎となる言語ファイル | `path/en.html`                                                                    |
| 新しい翻訳のテンプレート         | `path/en.html`                                                                    |
| ファイル形式               | HTML ファイル                                                                         |
| ファイル形式パラメータ          | `html_merge_duplicates=True`                                                      |

<a id="html-duplicates"></a>

## 重複文字列の処理

Weblate はデフォルトで、文字列の各出現箇所を行ベースのコンテキストを提供するために別々の翻訳単位として扱います。しかし、HTML ファイルでは要素を移動するとコンテキストが変化し、翻訳が失われる原因となる場合があります。

同一の文字列を 1 つの翻訳単位に統合するには、[ファイル形式パラメータ](https://docs.weblate.org/ja/latest/admin/projects.md#component-file-format-params) で Deduplicate identical strings を有効にしてください。

#### NOTE
このオプションを有効にすると、統合された翻訳単位に対する行ベースのコンテキストが無効になり、ドキュメント内で要素が移動された場合でも翻訳が安定して保持されます。
