Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
36 changes: 31 additions & 5 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,40 @@ permissions:
contents: read

jobs:
update-snippets:
update-autogenerated-docs:
runs-on: ubuntu-24.04
permissions:
contents: write
env:
CI_REDIS_HOST: 127.0.0.1
CI_REDIS_PORT: '60001'
CI_REDIS_PORT: '6379'
CI_DB_PASSWORD: weblate
CI_DB_HOST: 127.0.0.1
CI_DB_PORT: '60000'
CI_DB_PORT: '5432'
CI_SELENIUM: '1'
DJANGO_SETTINGS_MODULE: weblate.settings_test
services:
database:
image: postgres:18.3-alpine@sha256:4da1a4828be12604092fa55311276f08f9224a74a62dcb4708bd7439e2a03911
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: weblate
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
cache:
image: valkey/valkey:9.0.3-alpine@sha256:84c96f47ebe197e635cd3ddbe3ab74e8bdf783cf3befbfb1c36387275c1cd5d5
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
if: github.event_name != 'pull_request' && github.repository_owner == 'WeblateOrg'
Expand All @@ -59,7 +81,11 @@ jobs:
run: sudo ./ci/apt-install
- name: Install Python dependencies
run: ./ci/pip-install latest
- run: make -C docs update-doc-snippets
- name: Prepare database
run: ./ci/prepare-database
- name: Migrate database
run: uv run --frozen ./manage.py migrate --noinput --traceback
- run: make -C docs update-docs

- name: Commit or create pull request
uses: ./.github/actions/auto-commit
Expand All @@ -73,7 +99,7 @@ jobs:
list-languages:
runs-on: ubuntu-24.04
needs:
- update-snippets
- update-autogenerated-docs
outputs:
languages: ${{ steps.list.outputs.languages }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ repos:
types: [rst]
entry: \S +(?![\| +])
language: pygrep
exclude: docs/devel/reporting-example.rst|docs/admin/addons.rst|docs/snippets/file-format-parameters.rst
exclude: docs/devel/reporting-example.rst|docs/admin/addons.rst|docs/snippets/file-format-parameters.rst|docs/snippets/addons-autogenerated.rst
- id: rst-http
name: http link in rst text
description: Detect mistake of using http links
Expand Down
7 changes: 5 additions & 2 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,14 @@ update-schemas:
update-openapi:
@WEBLATE_HIDE_VERSION=1 uv run --no-sync ../manage.py spectacular --skip-checks --fail-on-warn --validate > specs/openapi.yaml

update-doc-snippets:
update-docs:
@uv run --no-sync ../manage.py list_addons -o snippets/addons-autogenerated.rst
@uv run --no-sync ../manage.py list_machinery -o snippets/machines-autogenerated.rst
@uv run --no-sync ../manage.py list_file_format_params > snippets/file-format-parameters.rst
@uv run --no-sync ../manage.py list_permissions --sections perms > snippets/permissions.rst
@uv run --no-sync ../manage.py list_permissions --sections roles > snippets/roles.rst
@uv run --no-sync ../manage.py list_change_events > snippets/change-events.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

update-po: $(wildcard locales/*/LC_MESSAGES/docs.po)

Expand Down
1,500 changes: 1 addition & 1,499 deletions docs/admin/addons.rst

Large diffs are not rendered by default.

267 changes: 1 addition & 266 deletions docs/admin/checks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,272 +77,7 @@ for this particular string.

Here is a list of flags currently accepted:

``rst-text``
Treat a text as an reStructuredText document, affects :ref:`check-same`.
Turns on :ref:`check-rst-syntax` and :ref:`check-rst-references`.
``bbcode-text``
Treat a text as an Bulletin Board Code (BBCode) document, affects :ref:`check-same`.
``dos-eol``
Uses DOS end-of-line markers instead of Unix ones (``\r\n`` instead of ``\n``).
``read-only``
The string is read-only and should not be edited in Weblate, see :ref:`read-only-strings`.
``terminology``
Used in :ref:`glossary`. Copies the string into all glossary languages so it can be used consistently in all translations. Also useful in combination with ``read-only``, for example in product names.
``priority:N``
Priority of the string. Higher priority strings are presented first for translation.
The default priority is 100, the higher priority a string has, the earlier it is
offered for translation.
``max-length:N``
Limit the maximal length for a string to N characters, see :ref:`check-max-length`.
``xml-text``
Treat text as XML document, affects :ref:`check-xml-invalid` and :ref:`check-xml-tags`.
``font-family:NAME``
Define font-family for rendering checks, see :ref:`fonts`.
``font-weight:WEIGHT``
Define font-weight for rendering checks, see :ref:`fonts`.
``font-size:SIZE``
Define font-size for rendering checks, see :ref:`fonts`.
``font-spacing:SPACING``
Define letter spacing for rendering checks, see :ref:`fonts`.
``icu-flags:FLAGS``
Define flags for customizing the behavior of the :ref:`check-icu-message-format` quality check.
``icu-tag-prefix:PREFIX``
Set a required prefix for XML tags for the :ref:`check-icu-message-format` quality check.
``placeholders:NAME:NAME2:...``
Placeholder strings expected in translation, see :ref:`check-placeholders`.
``replacements:FROM:TO:FROM2:TO2...``
Replacements to perform when checking resulting text parameters (for
example in :ref:`check-max-size` or :ref:`check-max-length`). The typical
use case for this is to expand placeables to ensure that the text fits even
with long values, for example: ``replacements:%s:"John Doe"``.
``variants:SOURCE``
Mark this string as a variant of string with matching source. See :ref:`variants`.
``regex:REGEX``
Regular expression to match translation, see :ref:`check-regex`.
``discard:NAME``
Discards flag defined on a higher level.
``forbidden``
Indicates forbidden translation in a glossary, see :ref:`glossary-forbidden`.
``strict-same``
Make the :ref:`check-same` avoid using the built-in words exceptions.
``strict-format``
Make format checks enforce using format even for plural forms with a single value, see :ref:`check-formats`.
``check-glossary``
Enable the :ref:`check-check-glossary` quality check.
``angularjs-format``
Enable the :ref:`check-angularjs-format` quality check.
``c-format``
Enable the :ref:`check-c-format` quality check.
``c-sharp-format``
Enable the :ref:`check-c-sharp-format` quality check.
``es-format``
Enable the :ref:`check-es-format` quality check.
``i18next-interpolation``
Enable the :ref:`check-i18next-interpolation` quality check.
``icu-message-format``
Enable the :ref:`check-icu-message-format` quality check.
``java-printf-format``
Enable the :ref:`check-java-printf-format` quality check.
``java-format``
Enable the :ref:`check-java-format` quality check.
``javascript-format``
Enable the :ref:`check-javascript-format` quality check.
``lua-format``
Enable the :ref:`check-lua-format` quality check.
``object-pascal-format``
Enable the :ref:`check-object-pascal-format` quality check.
``percent-placeholders``
Enable the :ref:`check-percent-placeholders` quality check.
``perl-brace-format``
Enable the :ref:`check-perl-brace-format` quality check.
``perl-format``
Enable the :ref:`check-perl-format` quality check.
``php-format``
Enable the :ref:`check-php-format` quality check.
``python-brace-format``
Enable the :ref:`check-python-brace-format` quality check.
``python-format``
Enable the :ref:`check-python-format` quality check.
``qt-format``
Enable the :ref:`check-qt-format` quality check.
``qt-plural-format``
Enable the :ref:`check-qt-plural-format` quality check.
``ruby-format``
Enable the :ref:`check-ruby-format` quality check.
``scheme-format``
Enable the :ref:`check-scheme-format` quality check.
``vue-format``
Enable the :ref:`check-vue-format` quality check.
``md-text``
Treat text as a Markdown document, and provide Markdown syntax highlighting on the translation text area.
Enables :ref:`check-md-link`, :ref:`check-md-reflink`, and :ref:`check-md-syntax` quality checks.
``case-insensitive``
Adjust checks behavior to be case-insensitive. Currently affects only :ref:`check-placeholders` quality check.
``safe-html``
Enable the :ref:`check-safe-html` quality check.
``url``
The string should consist of only a URL.
Enable the :ref:`check-url` quality check.
``ignore-all-checks``
Ignore all quality checks.
``fluent-source-inner-html``
Enable the :ref:`check-fluent-source-inner-html` quality check.
``fluent-source-syntax``
Enable the :ref:`check-fluent-source-syntax` quality check.
``icu-message-format``
Enable the :ref:`check-icu-message-format-syntax` quality check.
``ignore-bbcode``
Skip the :ref:`check-bbcode` quality check.
``ignore-duplicate``
Skip the :ref:`check-duplicate` quality check.
``ignore-check-glossary``
Skip the :ref:`check-check-glossary` quality check.
``ignore-double-space``
Skip the :ref:`check-double-space` quality check.
``ignore-fluent-parts``
Skip the :ref:`check-fluent-parts` quality check.
``ignore-fluent-references``
Skip the :ref:`check-fluent-references` quality check.
``ignore-fluent-target-inner-html``
Skip the :ref:`check-fluent-target-inner-html` quality check.
``ignore-fluent-target-syntax``
Skip the :ref:`check-fluent-target-syntax` quality check.
``ignore-angularjs-format``
Skip the :ref:`check-angularjs-format` quality check.
``ignore-automattic-components-format``
Skip the :ref:`check-automattic-components-format` quality check.
``ignore-c-format``
Skip the :ref:`check-c-format` quality check.
``ignore-c-sharp-format``
Skip the :ref:`check-c-sharp-format` quality check.
``ignore-es-format``
Skip the :ref:`check-es-format` quality check.
``ignore-i18next-interpolation``
Skip the :ref:`check-i18next-interpolation` quality check.
``ignore-icu-message-format``
Skip the :ref:`check-icu-message-format` quality check.
``ignore-java-printf-format``
Skip the :ref:`check-java-printf-format` quality check.
``ignore-java-format``
Skip the :ref:`check-java-format` quality check.
``ignore-javascript-format``
Skip the :ref:`check-javascript-format` quality check.
``ignore-lua-format``
Skip the :ref:`check-lua-format` quality check.
``ignore-object-pascal-format``
Skip the :ref:`check-object-pascal-format` quality check.
``ignore-percent-placeholders``
Skip the :ref:`check-percent-placeholders` quality check.
``ignore-perl-brace-format``
Skip the :ref:`check-perl-brace-format` quality check.
``ignore-perl-format``
Skip the :ref:`check-perl-format` quality check.
``ignore-php-format``
Skip the :ref:`check-php-format` quality check.
``ignore-python-brace-format``
Skip the :ref:`check-python-brace-format` quality check.
``ignore-python-format``
Skip the :ref:`check-python-format` quality check.
``ignore-qt-format``
Skip the :ref:`check-qt-format` quality check.
``ignore-qt-plural-format``
Skip the :ref:`check-qt-plural-format` quality check.
``ignore-ruby-format``
Skip the :ref:`check-ruby-format` quality check.
``ignore-scheme-format``
Skip the :ref:`check-scheme-format` quality check.
``ignore-vue-format``
Skip the :ref:`check-vue-format` quality check.
``ignore-translated``
Skip the :ref:`check-translated` quality check.
``ignore-inconsistent``
Skip the :ref:`check-inconsistent` quality check.
``ignore-rst-references``
Skip the :ref:`check-rst-references` quality check.
``ignore-kashida``
Skip the :ref:`check-kashida` quality check.
``ignore-md-link``
Skip the :ref:`check-md-link` quality check.
``ignore-md-reflink``
Skip the :ref:`check-md-reflink` quality check.
``ignore-md-syntax``
Skip the :ref:`check-md-syntax` quality check.
``ignore-max-length``
Skip the :ref:`check-max-length` quality check.
``ignore-max-size``
Skip the :ref:`check-max-size` quality check.
``ignore-escaped-newline``
Skip the :ref:`check-escaped-newline` quality check.
``ignore-end-colon``
Skip the :ref:`check-end-colon` quality check.
``ignore-end-ellipsis``
Skip the :ref:`check-end-ellipsis` quality check.
``ignore-end-exclamation``
Skip the :ref:`check-end-exclamation` quality check.
``ignore-end-stop``
Skip the :ref:`check-end-stop` quality check.
``ignore-end-interrobang``
Skip the :ref:`check-end-interrobang` quality check.
``ignore-end-question``
Skip the :ref:`check-end-question` quality check.
``ignore-end-semicolon``
Skip the :ref:`check-end-semicolon` quality check.
``ignore-newline-count``
Skip the :ref:`check-newline-count` quality check.
``ignore-plurals``
Skip the :ref:`check-plurals` quality check.
``ignore-kabyle-characters``
Skip the :ref:`check-kabyle-characters` quality check.
``ignore-placeholders``
Skip the :ref:`check-placeholders` quality check.
``ignore-prohibited-initial-character``
Skip the :ref:`check-prohibited-initial-character` quality check.
``ignore-punctuation-spacing``
Skip the :ref:`check-punctuation-spacing` quality check.
``ignore-regex``
Skip the :ref:`check-regex` quality check.
``ignore-rst-syntax``
Skip the :ref:`check-rst-syntax` quality check.
``ignore-reused``
Skip the :ref:`check-reused` quality check.
``ignore-same-plurals``
Skip the :ref:`check-same-plurals` quality check.
``ignore-begin-newline``
Skip the :ref:`check-begin-newline` quality check.
``ignore-begin-space``
Skip the :ref:`check-begin-space` quality check.
``ignore-end-newline``
Skip the :ref:`check-end-newline` quality check.
``ignore-end-space``
Skip the :ref:`check-end-space` quality check.
``ignore-same``
Skip the :ref:`check-same` quality check.
``ignore-safe-html``
Skip the :ref:`check-safe-html` quality check.
``ignore-url``
Skip the :ref:`check-url` quality check.
``ignore-xml-tags``
Skip the :ref:`check-xml-tags` quality check.
``ignore-xml-invalid``
Skip the :ref:`check-xml-invalid` quality check.
``ignore-zero-width-space``
Skip the :ref:`check-zero-width-space` quality check.
``ignore-ellipsis``
Skip the :ref:`check-ellipsis` quality check.
``ignore-fluent-source-inner-html``
Skip the :ref:`check-fluent-source-inner-html` quality check.
``ignore-fluent-source-syntax``
Skip the :ref:`check-fluent-source-syntax` quality check.
``ignore-icu-message-format``
Skip the :ref:`check-icu-message-format-syntax` quality check.
``ignore-long-untranslated``
Skip the :ref:`check-long-untranslated` quality check.
``ignore-multiple-failures``
Skip the :ref:`check-multiple-failures` quality check.
``ignore-unnamed-format``
Skip the :ref:`check-unnamed-format` quality check.
``ignore-optional-plural``
Skip the :ref:`check-optional-plural` quality check.
.. include:: /snippets/check-flags-autogenerated.rst

.. note::

Expand Down
Loading
Loading