HTML ファイル¶
Added in version 4.1.
翻訳するコンテンツを HTML ファイルから抽出し、翻訳するために使用します。
注釈
他の多くのフォーマットとは異なり、翻訳ファイルの変更は確実に Weblate にインポートされない点に注意してください。翻訳の正確な情報源は翻訳ファイルではなく Weblate です。
参考
ファイルの例:
<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>
Weblate の設定¶
典型的な Weblate コンポーネント構成 |
|
|---|---|
ファイル マスク |
|
モノリンガル用の、基礎となる言語ファイル |
|
新しい翻訳のテンプレート |
|
ファイル形式 |
HTML ファイル |
ファイル形式パラメータ |
|
Handling duplicate strings¶
By default, Weblate treats each occurrence of a string as a separate translation unit to provide line-based context. This can be problematic in HTML files, where moving elements changes the context and can lead to translation loss.
To consolidate identical strings into a single translation unit, enable Deduplicate identical strings in the ファイル形式パラメータ.
注釈
Enabling this option disables line-based context for the merged units, ensuring that translations remain stable even if elements are moved within the document.