mirror of
https://gh.wpcy.net/https://github.com/WeblateOrg/weblate.git
synced 2026-04-27 01:12:26 +08:00
* initial implementation suggestion * basic supported features snippets generation * Add API identifiers, read-only strings and common extensions to features table * generate doc features snippet files * autogenerated snippets cleanup * changelog update * delete one file to test auto-update * replace SUPPORTS_FUZZY with file format additional_states flag * docs: Documentation snippets update * fix include statetement typo * fix incorrect monolingual attributes * minor styling change * docs: Documentation snippets update * exclude snippets from being treated as standalone documents * Set YAMLFormat as both mono/bilingual * docs: Documentation snippets update * fix duplicate format IDs * only use backwards quotes for literals --------- Co-authored-by: gersona <6675010+gersona@users.noreply.github.com> Co-authored-by: Michal Čihař <michal@weblate.org>
56 lines
2 KiB
ReStructuredText
56 lines
2 KiB
ReStructuredText
.. _asciidoc:
|
|
|
|
AsciiDoc files
|
|
--------------
|
|
|
|
.. versionadded:: 5.16.1
|
|
|
|
.. include:: /snippets/format-in-development.rst
|
|
|
|
The translatable content is extracted from the AsciiDoc files and offered for the translation.
|
|
|
|
.. include:: /snippets/format-database-backed.rst
|
|
|
|
.. seealso::
|
|
|
|
:doc:`tt:formats/asciidoc`
|
|
|
|
Example file:
|
|
|
|
.. literalinclude:: ../../weblate/trans/tests/data/cs.adoc
|
|
|
|
.. include:: /snippets/format-features/asciidoc-features.rst
|
|
|
|
Weblate configuration
|
|
+++++++++++++++++++++
|
|
|
|
+--------------------------------+-------------------------------------+
|
|
| Typical Weblate :ref:`component` |
|
|
+================================+=====================================+
|
|
| File mask | ``path/*.adoc`` |
|
|
+--------------------------------+-------------------------------------+
|
|
| Monolingual base language file | ``path/en.adoc`` |
|
|
+--------------------------------+-------------------------------------+
|
|
| Template for new translations | ``path/en.adoc`` |
|
|
+--------------------------------+-------------------------------------+
|
|
| File format | `AsciiDoc file` |
|
|
+--------------------------------+-------------------------------------+
|
|
| File format parameters | ``merge_duplicates=True`` |
|
|
+--------------------------------+-------------------------------------+
|
|
|
|
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 AsciiDoc tables, where reordering rows changes the context and can
|
|
lead to translation loss.
|
|
|
|
To consolidate identical strings into a single translation unit, enable
|
|
:guilabel:`Deduplicate identical strings` in the
|
|
:ref:`component-file_format_params`.
|
|
|
|
.. note::
|
|
Enabling this option disables line-based context for the merged units,
|
|
ensuring that translations remain stable even if rows or sections
|
|
are moved within the document.
|