Skip to content

Commit

Permalink
Merge branch 'main' into 11168_clean_unused_glossary_languages
Browse files Browse the repository at this point in the history
  • Loading branch information
gersona authored Oct 3, 2024
2 parents 9e1b5ce + 16a2c68 commit 94d9376
Show file tree
Hide file tree
Showing 86 changed files with 2,138 additions and 1,042 deletions.
16 changes: 16 additions & 0 deletions .github/matchers/spectacular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"problemMatcher": [
{
"owner": "spectacular",
"pattern": [
{
"file": 1,
"line": 2,
"severity": 3,
"message": 4,
"regexp": "^([^:]*):(\\d+): (Warning|Error) (.*)$"
}
]
}
]
}
5 changes: 5 additions & 0 deletions .github/matchers/spectacular.json.license
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Copyright © Michal Čihař <[email protected]>

SPDX-License-Identifier: CC0-1.0

This file is maintained in https://github.com/WeblateOrg/meta/
62 changes: 62 additions & 0 deletions .github/workflows/api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Copyright © Michal Čihař <[email protected]>
#
# SPDX-License-Identifier: GPL-3.0-or-later

name: API

on:
push:
branches-ignore:
- deepsource-fix-**
- renovate/**
- weblate
pull_request:

permissions:
contents: read

jobs:
api-lint:
runs-on: ubuntu-24.04
name: API Lint
env:
CI_DATABASE: postgresql
CI_REDIS_HOST: 127.0.0.1
CI_REDIS_PORT: '60001'
CI_DB_PASSWORD: weblate
CI_DB_HOST: 127.0.0.1
CI_DB_PORT: '60000'
CI_SELENIUM: '1'
DJANGO_SETTINGS_MODULE: weblate.settings_test
PYTHONWARNINGS: default,ignore:unclosed:ResourceWarning
PYTHONUNBUFFERED: 1
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
cache-dependency-glob: ''
cache-suffix: ${{ matrix.python-version }}
- name: Start services
run: ./ci/services-up $CI_DATABASE
- name: Install apt dependencies
run: sudo ./ci/apt-install $CI_DATABASE
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Used versions
run: ./ci/print-versions
- name: Install Python dependencies
run: ./ci/pip-install latest
- name: Prepare database
run: ./ci/prepare-database
- name: Migrate database
run: coverage run ./manage.py migrate --noinput --traceback
- name: Generate OpenAPI
run: |
echo "::add-matcher::.github/matchers/spectacular.json"
./manage.py spectacular > weblate-openapi.yaml
echo "::remove-matcher owner=spectacular::"
- name: openapi-lint
run: npx @redocly/cli lint --format github-actions weblate-openapi.yaml
2 changes: 1 addition & 1 deletion .github/workflows/fossa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run FOSSA Scan
uses: fossas/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: Upload to code-scanning
uses: github/codeql-action/[email protected].9
uses: github/codeql-action/[email protected].10
with:
sarif_file: results.sarif
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ weblate-*.tar.*
/fil-result/
/weblate/static/js/vendor/oss-licenses.json
*node_modules/
/weblate-openapi.yaml
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ repos:
hooks:
- id: biome-check
additional_dependencies:
- '@biomejs/[email protected].2'
- '@biomejs/[email protected].3'
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.20.2
hooks:
Expand Down
2 changes: 1 addition & 1 deletion .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Files: weblate/templates/* weblate/wladmin/templates/* weblate/legal/templates/*
Copyright: Michal Čihař <[email protected]>
License: GPL-3.0-or-later

Files: .editorconfig .gitattributes .gitignore .gitmodules .imgbotconfig .pre-commit-config.yaml .pylintrc .readthedocs.yml .weblate MANIFEST.in codecov.yml pyproject.toml requirements*.txt dev-docker/environment scripts/yarn/.gitignore scripts/yarn/package.json scripts/yarn/yarn.lock setup.cfg docs/requirements.txt biome.json
Files: .editorconfig .gitattributes .gitignore .gitmodules .imgbotconfig .pre-commit-config.yaml .pylintrc .readthedocs.yml .weblate MANIFEST.in codecov.yml pyproject.toml requirements*.txt dev-docker/environment scripts/yarn/.gitignore scripts/yarn/package.json scripts/yarn/yarn.lock setup.cfg docs/requirements.txt biome.json redocly.yaml
Copyright: Michal Čihař <[email protected]>
License: GPL-3.0-or-later

Expand Down
2 changes: 1 addition & 1 deletion ci/docker-compose-postgresql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

services:
database:
image: postgres:16.4
image: postgres:17.0
ports:
- 60000:5432
# make postgres faster and non-durable, see https://www.postgresql.org/docs/current/non-durability.html
Expand Down
4 changes: 2 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"build": "webpack"
},
"dependencies": {
"jquery": "3.7.1",
"@sentry/browser": "8.32.0"
"@sentry/browser": "8.33.0",
"jquery": "3.7.1"
},
"devDependencies": {
"terser-webpack-plugin": "5.3.10",
Expand Down
8 changes: 5 additions & 3 deletions client/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ const copyrightRegex = /Copyright.*\n/;

// REUSE-IgnoreStart
function extractCopyright(pkg) {
const copyrights = pkg.licenseText.match(copyrightRegex);
if (copyrights !== null) {
return copyrights.join("");
if (pkg.licenseText !== null) {
const copyrights = pkg.licenseText.match(copyrightRegex);
if (copyrights !== null) {
return copyrights.join("");
}
}
return `Copyright ${pkg.author}\n`;
}
Expand Down
140 changes: 70 additions & 70 deletions client/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -47,76 +47,76 @@
"@jridgewell/resolve-uri" "^3.1.0"
"@jridgewell/sourcemap-codec" "^1.4.14"

"@sentry-internal/browser-utils@8.32.0":
version "8.32.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/browser-utils/-/browser-utils-8.32.0.tgz#9bcea7d107d5adc82ed9331168468ee44eef8f2d"
integrity sha512-DpUGhk5O1OVjT0fo9wsbEdO1R/S9gGBRDtn9+FFVeRtieJHwXpeZiLK+tZhTOvaILmtSoTPUEY3L5sK4j5Xq9g==
dependencies:
"@sentry/core" "8.32.0"
"@sentry/types" "8.32.0"
"@sentry/utils" "8.32.0"

"@sentry-internal/feedback@8.32.0":
version "8.32.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-8.32.0.tgz#ac9a08b060d1016704e42f8c2726ead419f64061"
integrity sha512-XB7hiVJQW1tNzpoXIHbvm3rjipIt7PZiJJtFg2vxaqu/FzdgOcYqQiwIKivJVAKuRZ9rIeJtK1jdXQFOc/TRJA==
dependencies:
"@sentry/core" "8.32.0"
"@sentry/types" "8.32.0"
"@sentry/utils" "8.32.0"

"@sentry-internal/replay-canvas@8.32.0":
version "8.32.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-8.32.0.tgz#5d56161b0b62b22cbd49db120e3ea56b370ead8c"
integrity sha512-oBbhtDBkD+5z/T0NVJ5VenBWAid/S9QdVrod/UqxVqU7F8N+E9/INFQI48zCWr4iVlUMcszJPDElvJEsMDvvBQ==
dependencies:
"@sentry-internal/replay" "8.32.0"
"@sentry/core" "8.32.0"
"@sentry/types" "8.32.0"
"@sentry/utils" "8.32.0"

"@sentry-internal/replay@8.32.0":
version "8.32.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-8.32.0.tgz#59e3ec7b51c9214eeae9fa617490b89ce6737e1c"
integrity sha512-yiEUnn2yyo1AIQIFNeRX3tdK8fmyKIkxdFS1WiVQmeYI/hFwYBTZPly0FcO/g3xnRMSA2tvrS+hZEaaXfK4WhA==
dependencies:
"@sentry-internal/browser-utils" "8.32.0"
"@sentry/core" "8.32.0"
"@sentry/types" "8.32.0"
"@sentry/utils" "8.32.0"

"@sentry/browser@8.32.0":
version "8.32.0"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-8.32.0.tgz#3944bc5178e6cfffc8c71ba05920fee7dec5bd38"
integrity sha512-AEKFj64g4iYwEMRvVcxiY0FswmClRXCP1IEvCqujn8OBS8AjMOr1z/RwYieEs0D90yNNB3YEqF8adrKENblJmw==
dependencies:
"@sentry-internal/browser-utils" "8.32.0"
"@sentry-internal/feedback" "8.32.0"
"@sentry-internal/replay" "8.32.0"
"@sentry-internal/replay-canvas" "8.32.0"
"@sentry/core" "8.32.0"
"@sentry/types" "8.32.0"
"@sentry/utils" "8.32.0"

"@sentry/core@8.32.0":
version "8.32.0"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-8.32.0.tgz#7c4b74afa7a15bd31f5e6881aac82ccfd753e1d6"
integrity sha512-+xidTr0lZ0c755tq4k75dXPEb8PA+qvIefW3U9+dQMORLokBrYoKYMf5zZTG2k/OfSJS6OSxatUj36NFuCs3aA==
dependencies:
"@sentry/types" "8.32.0"
"@sentry/utils" "8.32.0"

"@sentry/types@8.32.0":
version "8.32.0"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-8.32.0.tgz#dfd8aa9449a5f793b9c720888819a74a11f1790d"
integrity sha512-hxckvN2MzS5SgGDgVQ0/QpZXk13Vrq4BtZLwXhPhyeTmZtUiUfWvcL5TFQqLinfKdTKPe9q2MxeAJ0D4LalhMg==

"@sentry/utils@8.32.0":
version "8.32.0"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-8.32.0.tgz#99a4298ee8fd7208ade470931c19d71c571dfce8"
integrity sha512-t1WVERhgmYURxbBj9J4/H2P2X+VKqm7B3ce9iQyrZbdf5NekhcU4jHIecPUWCPHjQkFIqkVTorqeBmDTlg/UmQ==
dependencies:
"@sentry/types" "8.32.0"
"@sentry-internal/browser-utils@8.33.0":
version "8.33.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/browser-utils/-/browser-utils-8.33.0.tgz#17921cd2b83c835f6b986877d65b2aeb68e4b9b0"
integrity sha512-zwjmD+XI3pgxxiqKGLXYDGSd+zfO7az9zzbLn1le8Vv9cRL2lZyMLcwiwEaTpwz3B0pPONeDZMT8+bzMGRs8zw==
dependencies:
"@sentry/core" "8.33.0"
"@sentry/types" "8.33.0"
"@sentry/utils" "8.33.0"

"@sentry-internal/feedback@8.33.0":
version "8.33.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-8.33.0.tgz#dac09d62e7852143ff8cc3081e298828c18ecff7"
integrity sha512-KSW/aiNgmJc8PDl2NsM+ONvGure4tPaluj7O1Nw+947Dh8W6CJnQ9srB7xPyoYYWyQW8Hyl1vzxY9W0J+fjlhA==
dependencies:
"@sentry/core" "8.33.0"
"@sentry/types" "8.33.0"
"@sentry/utils" "8.33.0"

"@sentry-internal/replay-canvas@8.33.0":
version "8.33.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-8.33.0.tgz#d498ef94163fca9f79a7f35093ac746d44965b36"
integrity sha512-9fEhMP+gQYQrtn/SQd1Vd7U7emTSGBpLKc5h5f0iV0yDmjYAhNVbq4RgPTYAgnBEcdVo3qgboL6UIz9Dv+dYRQ==
dependencies:
"@sentry-internal/replay" "8.33.0"
"@sentry/core" "8.33.0"
"@sentry/types" "8.33.0"
"@sentry/utils" "8.33.0"

"@sentry-internal/replay@8.33.0":
version "8.33.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/replay/-/replay-8.33.0.tgz#5a1297e05666aee059e2de9f278889ab5c405f44"
integrity sha512-GFBaDA4yhlEf3wTXOVXnJVG/diuKxeqZuXcuhsAwJb+YcFR0NhgsRn3wIGuYOZZF8GBXzx9PFnb9yIuFgx5Nbw==
dependencies:
"@sentry-internal/browser-utils" "8.33.0"
"@sentry/core" "8.33.0"
"@sentry/types" "8.33.0"
"@sentry/utils" "8.33.0"

"@sentry/browser@8.33.0":
version "8.33.0"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-8.33.0.tgz#077fce0014d0674405920c87c8aed03be11d4815"
integrity sha512-qu/g20ZskywEU8BWc4Fts1kXFFBtw1vS+XvPq7Ta9zCeRG5dlXhhYDVQ4/v4nAL/cs0o6aLCq73m109CFF0Kig==
dependencies:
"@sentry-internal/browser-utils" "8.33.0"
"@sentry-internal/feedback" "8.33.0"
"@sentry-internal/replay" "8.33.0"
"@sentry-internal/replay-canvas" "8.33.0"
"@sentry/core" "8.33.0"
"@sentry/types" "8.33.0"
"@sentry/utils" "8.33.0"

"@sentry/core@8.33.0":
version "8.33.0"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-8.33.0.tgz#407b70c19038b3201a742b3f041ab44fbb7f7397"
integrity sha512-618PQGHQLBVCpAq1s+e/rpIUaLUnj19IPUgn97rUGXLLna8ETIAoyQoG70wz4q9niw4Z4GlS5kZNrael2O3+2w==
dependencies:
"@sentry/types" "8.33.0"
"@sentry/utils" "8.33.0"

"@sentry/types@8.33.0":
version "8.33.0"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-8.33.0.tgz#2613acefae23c53e660c410120d5d4cbcfc5d713"
integrity sha512-V/A+72ZdnfGtXeXIpz1kUo3LRdq3WKEYYFUR2RKpCdPh9yeOrHq6u/rmzTWx49+om0yhZN+JhVoxDzt75UoFRg==

"@sentry/utils@8.33.0":
version "8.33.0"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-8.33.0.tgz#60b7d441e93500f1e547e819e62987d0e544e644"
integrity sha512-TdwtGdevJij2wq2x/hDUr+x5TXt47ZhWxZ8zluai/lnIDTUB3Xs/L9yHtj1J+H9hr8obkMASE9IanUrWXzrP6Q==
dependencies:
"@sentry/types" "8.33.0"

"@types/estree@^1.0.5":
version "1.0.5"
Expand Down
2 changes: 1 addition & 1 deletion dev-docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ services:
env_file:
- ./environment
database:
image: postgres:16-alpine
image: postgres:17-alpine
env_file:
- ./environment
volumes:
Expand Down
17 changes: 17 additions & 0 deletions docs/admin/projects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,23 @@ Some examples of filtering:
| Include all files (default) | ``^[^.]+$`` |
+-------------------------------+-----------------------+


.. _component-key_filter:

Key filter
++++++++++

.. versionadded:: 5.8

A regular expression that is used to filter units by their keys. It displays only
those units whose keys match the regular expression that was set
as the value of this field.

.. note::

This filter is only available for components with monolingual file formats.


.. _component-variant_regex:

Variants regular expression
Expand Down
3 changes: 1 addition & 2 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ The API is accessible on the ``/api/`` URL and it is based on
You can use it directly or by :ref:`wlc`.

The API is also documented using OpenAPI 3.0 on the ``/api/schema/`` URL, you
can browse it using Swagger at ``/api/schema/swagger-ui/`` or Redoc at
``/api/schema/redoc/``.
can browse at ``/api/docs/``.

.. note::

Expand Down
4 changes: 4 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Not yet released.

**New features**

* Added :ref:`component-key_filter` in the component.
* :ref:`Searching` now supports filtering by object path and :ref:`date-search`.
* Merge requests credentials can now be passed in the repository URL, see :ref:`settings-credentials`.
* :ref:`mt-azure-openai` automatic suggestion service.
Expand All @@ -19,6 +20,7 @@ Not yet released.
* :ref:`autofix` for French and Breton now uses a non-breaking space before colons instead of a narrow one.
* :ref:`api` now has a preview OpenAPI specification.
* Stale, empty glossaries are now automatically removed.
* :kbd:`?` now displays available :ref:`keyboard`.

**Bug fixes**

Expand All @@ -33,6 +35,8 @@ Not yet released.

Please follow :ref:`generic-upgrade-instructions` in order to perform update.

* There are several changes in :file:`settings_example.py`, most notable are the new settings for :ref:`api` in ``SPECTACULAR_SETTINGS`` and changes in ``REST_FRAMEWORK`` and ``INSTALLED_APPS``; please adjust your settings accordingly.

**Contributors**

.. include:: changes/contributors/5.8.rst
Expand Down
Loading

0 comments on commit 94d9376

Please sign in to comment.