Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ update-docs:
@uv run --no-sync ../manage.py list_permissions --sections roles > snippets/roles.rst
@uv run --no-sync ../manage.py list_checks -s checks -o snippets/checks-autogenerated.rst
@uv run --no-sync ../manage.py list_checks -s flags -o snippets/check-flags-autogenerated.rst
@uv run --no-sync ../manage.py list_format_features -o snippets/format-features

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
Expand Down
18 changes: 18 additions & 0 deletions docs/admin/management.rst
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,24 @@ list_change_events

Lists all possible change event types.

list_format_features
--------------------

.. weblate-admin:: list_format_features

Generates RST documentation snippets describing the supported features for every file format.

The command generates one file for every format, that can be found in the specified output directory.

.. weblate-admin-option:: --output PATH

Directory where the format feature snippets will be written.

.. note::

The generated documentation files are meant to be included in documentation sources such as :doc:`/formats`. See also :file:`weblate/formats/management/commands/list_format_features.py` for customization and merging logic.


loadpo
------

Expand Down
2 changes: 2 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Weblate 5.17
.. rubric:: New features

* Added :setting:`WEBSITE_ALERTS_ENABLED` setting to allow disabling project website availability checks and alerts.
* Added new management command :wladmin:`list_format_features`, which generates RST documentation snippets describing the supported features for every file format.
* Shared components can now be categorized within the target project.
* :ref:`api` supports specifying a category when sharing a component via ``category_id`` parameter.
* Added :ref:`addon-weblate.gettext.xgettext`, :ref:`addon-weblate.gettext.django`, and :ref:`addon-weblate.gettext.sphinx` to update POT files with configurable update cadence.
Expand All @@ -18,6 +19,7 @@ Weblate 5.17
* Improved error messages in some of the :ref:`api` endpoints.
* Improved performance of project and category search result pages with very large match sets.
* :envvar:`WEBLATE_COMMIT_PENDING_HOURS` is now available in Docker container.
* Improved documentation with auto-generated snippets for :ref:`addons`, :ref:`fmt_capabs`, :ref:`checks`, and :ref:`machine-translation` machines.
* Improved performance of :ref:`mt-weblate` lookups.

.. rubric:: Bug fixes
Expand Down
5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ def setup(app) -> None:
"Thumbs.db",
".DS_Store",
"devel/reporting-example.rst",
# exclude snippets from being treated as standalone documents
# as they are already included in the real pages
# this prevents some labels defined in snippets from being marked as duplicate
"snippets/*",
"snippets/**/*",
]

ogp_social_cards = {
Expand Down
331 changes: 2 additions & 329 deletions docs/formats.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,335 +31,8 @@ format (JSON, YAML, properties) or file encoding, so please verify that
Translation types capabilities
------------------------------

.. list-table:: Capabilities of all supported formats
:header-rows: 1

* - Format
- Linguality [#m]_
- Plurals [#p]_
- Descriptions [#n]_
- Context [#c]_
- Location [#l]_
- Flags [#f]_
- Additional states [#a]_
* - :ref:`gettext`
- bilingual
- yes
- yes
- yes
- yes
- yes [#po]_
- needs editing
* - :ref:`mono_gettext`
- mono
- yes
- yes
- yes
- yes
- yes [#po]_
- needs editing
* - :ref:`xliff`
- both
- yes
- yes
- yes
- yes
- yes
- needs editing, approved
* - :ref:`javaprop`
- both
- no
- yes
- no
- no
- no
-
* - :ref:`mi18n-lang`
- mono
- no
- yes
- no
- no
- no
-
* - :ref:`gwt`
- mono
- yes
- yes
- no
- no
- no
-
* - :ref:`joomla`
- mono
- no
- yes
- no
- yes
- no
-
* - :ref:`qtling`
- both
- yes
- yes
- no
- yes
- yes
- needs editing
* - :ref:`aresource`
- mono
- yes
- yes [#x]_
- no
- no
- yes
-
* - :ref:`apple`
- both
- no
- yes
- no
- no
- no
-
* - :ref:`php`
- mono
- no [#lp]_
- yes
- no
- no
- no
-
* - :ref:`json`
- mono
- no
- no
- no
- no
- no
-
* - :ref:`js-i18next`
- mono
- yes
- no
- no
- no
- no
-
* - :ref:`go-i18n-json`
- mono
- yes
- yes
- no
- no
- no
-
* - :ref:`gotext-json`
- mono
- yes
- yes
- no
- yes
- no
-
* - :ref:`arb`
- mono
- yes
- yes
- no
- no
- no
-
* - :ref:`webex`
- mono
- yes
- yes
- no
- no
- no
-
* - :ref:`dotnet`
- mono
- no
- yes
- no
- no
- yes
-
* - :ref:`resourcedict`
- mono
- no
- no
- no
- no
- yes
-
* - :ref:`csv`
- both
- no
- yes
- yes
- yes
- no
- needs editing
* - :ref:`yaml`
- mono
- no
- no
- no
- no
- no
-
* - :ref:`ryaml`
- mono
- yes
- no
- no
- no
- no
-
* - :ref:`dtd`
- mono
- no
- no
- no
- no
- no
-
* - :ref:`flatxml`
- mono
- no
- no
- no
- no
- yes
-
* - :ref:`winrc`
- mono
- no
- yes
- no
- no
- no
-
* - :ref:`xlsx`
- mono
- no
- yes
- yes
- yes
- no
- needs editing
* - :ref:`appstore`
- mono
- no
- no
- no
- no
- no
-
* - :ref:`subtitles`
- mono
- no
- no
- no
- yes
- no
-
* - :ref:`html`
- mono
- no
- no
- no
- no
- no
-
* - :ref:`markdown`
- mono
- no
- no
- no
- no
- no
-
* - :ref:`odf`
- mono
- no
- no
- no
- no
- no
-
* - :ref:`idml`
- mono
- no
- no
- no
- no
- no
-
* - :ref:`ini`
- mono
- no
- no
- no
- no
- no
-
* - :ref:`islu`
- mono
- no
- no
- no
- no
- no
-
* - :ref:`tbx`
- bilingual
- no
- yes
- yes
- no
- yes
-
* - :ref:`txt`
- mono
- no
- no
- no
- no
- no
-
* - :ref:`stringsdict`
- mono
- yes
- no
- no
- no
- no
-
* - :ref:`fluent`
- mono
- no [#fp]_
- yes
- no
- no
- no
-

.. [#m] See :ref:`bimono`
.. [#p] See :ref:`format-plurals`
.. [#n] See :ref:`format-description`
.. [#c] See :ref:`format-context`
.. [#l] See :ref:`format-location`
.. [#a] See :ref:`format-states`
.. [#x] XML comment placed before the ``<string>`` element, parsed as a source string description.
.. [#f] See :ref:`format-flags`.
.. [#po] The gettext type comments are used as flags.
.. [#lp] The plurals are supported only for Laravel which uses in string syntax to define them, see `Localization in Laravel`_.
.. [#fp] Plurals are handled in the syntax of the strings and not exposed as plurals in Weblate.

.. _Localization in Laravel: https://laravel.com/docs/localization
Please refer to the documentation page of each individual file format
for information about which features are supported in that format.

.. _bimono:

Expand Down
Loading
Loading