Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWitness committed Dec 28, 2020
2 parents 22463f6 + 4869859 commit 28e7e29
Show file tree
Hide file tree
Showing 410 changed files with 312,184 additions and 254,966 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-docs-${{ hashFiles('**/requirements*.txt') }}
- name: Set up Python 3.8
uses: actions/setup-python@v2.1.4
uses: actions/setup-python@v2.2.1
with:
python-version: 3.8
- name: Install apt dependencies
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-docs-${{ hashFiles('**/requirements*.txt') }}
- name: Set up Python 3.8
uses: actions/setup-python@v2.1.4
uses: actions/setup-python@v2.2.1
with:
python-version: 3.8
- name: Install pip dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
~/.cache/pre-commit
key: ${{ runner.os }}-pip-lint-${{ hashFiles('**/requirements*.txt') }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Setup Python
uses: actions/setup-python@v2.1.4
uses: actions/setup-python@v2.2.1
with:
python-version: 3.9
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
~/.cache/pre-commit
key: ${{ runner.os }}-pip-lint-${{ hashFiles('**/requirements*.txt') }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Setup Python
uses: actions/setup-python@v2.1.4
uses: actions/setup-python@v2.2.1
with:
python-version: 3.9
- name: Install dependencies
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: Install apt dependencies
run: sudo ./ci/apt-install
- name: Set up Python 3.7
uses: actions/setup-python@v2.1.4
uses: actions/setup-python@v2.2.1
with:
python-version: 3.7
- name: Install pip dependencies
Expand All @@ -54,6 +54,8 @@ jobs:
run: ./ci/run-migrate 4.2
- name: Migrate from 4.3
run: ./ci/run-migrate 4.3
- name: Migrate from 4.4
run: ./ci/run-migrate 4.4
- name: Coverage
run: |
coverage combine
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
~/.cache/pre-commit
key: ${{ runner.os }}-pre-commit-${{ hashFiles('**/requirements*.txt') }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Setup Python
uses: actions/setup-python@v2.1.4
uses: actions/setup-python@v2.2.1
with:
python-version: 3.9
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Install apt dependencies
run: sudo ./ci/apt-install
- name: Set up Python 3.7
uses: actions/setup-python@v2.1.4
uses: actions/setup-python@v2.2.1
with:
python-version: 3.7
- name: Used versions
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
- name: Install apt dependencies
run: sudo ./ci/apt-install
- name: Setup Python
uses: actions/setup-python@v2.1.4
uses: actions/setup-python@v2.2.1
with:
python-version: 3.8
- name: Install pip dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stylelint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
~/.cache/pre-commit
key: ${{ runner.os }}-pip-lint-${{ hashFiles('**/requirements*.txt') }}-${{ hashFiles('.pre-commit-config.yaml') }}
- name: Setup Python
uses: actions/setup-python@v2.1.4
uses: actions/setup-python@v2.2.1
with:
python-version: 3.9
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Install apt dependencies
run: sudo ./ci/apt-install
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2.1.4
uses: actions/setup-python@v2.2.1
with:
python-version: ${{ matrix.python-version }}
- name: Used versions
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "scripts/graphics"]
path = scripts/graphics
url = https://github.com/WeblateOrg/graphics.git
[submodule "scripts/spdx-license-list"]
path = scripts/spdx-license-list
url = https://github.com/spdx/license-list-data.git
8 changes: 4 additions & 4 deletions docs/admin/access.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ Common setups
Locking down Weblate
++++++++++++++++++++

To completely lock down your Weblate installation, you can use
:setting:`REQUIRE_LOGIN` to force users to sign in and
:setting:`REGISTRATION_OPEN` to prevent new registrations.
To completely lock down your Weblate, you can use :setting:`REQUIRE_LOGIN` to
force users to sign in and :setting:`REGISTRATION_OPEN` to prevent new
registrations.

Site wide permissions
+++++++++++++++++++++
Expand Down Expand Up @@ -187,7 +187,7 @@ to a containing project as well.
An additional step is performed if checking permission for the translation:


4. Group :guilabel:`Languages` are matched against accessed translations, it it ignored for component or project level access.
4. Group :guilabel:`Languages` are matched against accessed translations, it is ignored for component or project level access.

.. hint::

Expand Down
6 changes: 5 additions & 1 deletion docs/admin/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,10 @@ A list of URLs you want to require logging into. (Besides the standard rules bui

It is desirable to lock down API access as well, as shown in the above example.

.. seealso::

:setting:`REQUIRE_LOGIN`

.. setting:: LOGIN_REQUIRED_URLS_EXCEPTIONS

LOGIN_REQUIRED_URLS_EXCEPTIONS
Expand Down Expand Up @@ -1685,7 +1689,7 @@ REQUIRE_LOGIN
.. versionadded:: 4.1

This enables :setting:`LOGIN_REQUIRED_URLS` and configures REST framework to
require sign in for all API endpoints.
require authentication for all API endpoints.

.. note::

Expand Down
4 changes: 2 additions & 2 deletions docs/admin/customize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ Custom quality checks, addons and auto-fixes
--------------------------------------------

To install your code for :ref:`custom-autofix`, :ref:`own-checks` or
:ref:`own-addon` and in Weblate:
:ref:`own-addon` in Weblate:

1. Place the files in your Python module containing the Weblate customization
1. Place the files into your Python module containing the Weblate customization
(see :ref:`custom-module`).
2. Add its fully-qualified path to the Python class in the dedicated settings
(:setting:`WEBLATE_ADDONS`, :setting:`CHECK_LIST` or :setting:`AUTOFIX_LIST`):
Expand Down
25 changes: 19 additions & 6 deletions docs/admin/deployments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ Weblate can be easily installed in your cloud. Please find detailed guide for yo
* :doc:`install/openshift`
* :doc:`install/kubernetes`

Helm Chart
----------
Third-party deployments for Weblate
+++++++++++++++++++++++++++++++++++

You can install Weblate on Kubernetes using Helm.
See <https://github.com/WeblateOrg/helm/tree/master/charts/weblate> for the detailed instructions.
.. note::

Following deployments are not developed or supported by Weblate team. Parts
of the setup might vary from what is described in this documentation.

Bitnami Weblate stack
---------------------
Expand All @@ -23,6 +25,17 @@ Bitnami provides a Weblate stack for many platforms at
installation, see <https://bitnami.com/stack/weblate/README.txt> for more
documentation.

Weblate Cloudron Package
------------------------

`Cloudron <https://cloudron.io/>`_ is a platform for self-hosting web applications.
Weblate installed with Cloudron will be automatically kept up-to-date.
The package is maintained by the Cloudron team at their `Weblate package repo <https://git.cloudron.io/cloudron/weblate-app>`_.

.. image:: /images/cloudron.png
:alt: Install Weblate with Cloudron
:target: https://cloudron.io/button.html?app=org.weblate.cloudronapp

Weblate in YunoHost
-------------------

Expand All @@ -35,8 +48,8 @@ usages.
You may use your administration interface, or this button (it will bring you to your server):

.. image:: /images/install-with-yunohost.png
:alt: Install Weblate with YunoHost
:target: https://install-app.yunohost.org/?app=weblate
:alt: Install Weblate with YunoHost
:target: https://install-app.yunohost.org/?app=weblate

It also is possible to use the commandline interface:

Expand Down
18 changes: 12 additions & 6 deletions docs/admin/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ complex setups the role name is different than username and you will get error
about non-existing role during the database migration
(``psycopg2.errors.UndefinedObject: role "weblate@hostname" does not exist``).
This is known to happen with Azure Database for PostgreSQL, but it's not
limited to this evironment. Please set ``ALTER_ROLE`` to change name of the
limited to this environment. Please set ``ALTER_ROLE`` to change name of the
role Weblate should alter during the database migration.

.. _mysql:
Expand Down Expand Up @@ -1304,18 +1304,24 @@ Background tasks using Celery

.. versionadded:: 3.2

Weblate uses Celery to process background tasks. The example settings come with
eager configuration, which does process all tasks in place, but you want to
change this to something more reasonable for a production setup.

A typical setup using Redis as a backend looks like this:
Weblate uses Celery to process background tasks. A typical setup using Redis as
a backend looks like this:

.. code-block:: python
CELERY_TASK_ALWAYS_EAGER = False
CELERY_BROKER_URL = "redis://localhost:6379"
CELERY_RESULT_BACKEND = CELERY_BROKER_URL
For development, you might want to use eager configuration, which does process
all tasks in place, but this will have performance impact on Weblate:

.. code-block:: python
CELERY_TASK_ALWAYS_EAGER = True
CELERY_BROKER_URL = "memory://"
CELERY_TASK_EAGER_PROPAGATES = True
You should also start the Celery worker to process the tasks and start
scheduled tasks, this can be done directly on the command line (which is mostly
useful when debugging or developing):
Expand Down
5 changes: 3 additions & 2 deletions docs/admin/install/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ Generic settings

.. envvar:: WEBLATE_REQUIRE_LOGIN

Configures sign in required for the whole of the Weblate installation using :setting:`LOGIN_REQUIRED_URLS`.
Enables :setting:`REQUIRE_LOGIN` to enforce authentication on whole Weblate.

**Example:**

Expand All @@ -450,7 +450,8 @@ Generic settings
.. envvar:: WEBLATE_ADD_LOGIN_REQUIRED_URLS_EXCEPTIONS
.. envvar:: WEBLATE_REMOVE_LOGIN_REQUIRED_URLS_EXCEPTIONS

Adds URL exceptions for sign in required for the whole Weblate installation using :setting:`LOGIN_REQUIRED_URLS_EXCEPTIONS`.
Adds URL exceptions for authentication required for the whole Weblate
installation using :setting:`LOGIN_REQUIRED_URLS_EXCEPTIONS`.

You can either replace whole settings, or modify default value using ``ADD`` and ``REMOVE`` variables.

Expand Down
11 changes: 7 additions & 4 deletions docs/admin/languages.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ If no exact match can be found, an attempt will be made
to best fit it into an existing language (e.g. ignoring the default country code
for a given language—choosing ``cs`` instead of ``cs_CZ``).

Should that also fail, a new language definition will be created using the defaults (left
to right text direction, one plural) and naming of the language as :guilabel:`xx_XX (generated)`.
You might want to change this in the admin interface later, (see :ref:`changing-languages`)
and report it to the issue tracker (see :ref:`contributing`).
Should that also fail, a new language definition will be created using the
defaults (left to right text direction, one plural). The automatically created
language with code ``xx_XX`` will be named as :guilabel:`xx_XX (generated)`.
You might want to change this in the admin interface later, (see
:ref:`changing-languages`) and report it to the issue tracker (see
:ref:`contributing`), so that the proper definition can be added to the
upcoming Weblate release.

.. hint::

Expand Down
12 changes: 7 additions & 5 deletions docs/admin/optionals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,17 @@ Usage
The module automatically hooks into Weblate and sets the exported repository URL in
the :ref:`component`.
The repositories are accessible under the ``/git/`` part of the Weblate URL, for example
``https://example.org/git/weblate/master/``:
``https://example.org/git/weblate/master/``.

Repositories for publicly available projects can be cloned without authentication:

.. code-block:: sh
git clone 'https://example.org/git/weblate/master/'
Repositories are available anonymously unless :ref:`acl` is turned on.
This requires authenticate using your API token (it can be obtained in your
:ref:`user-profile`):
Access to the repositories with restricted access (using :ref:`acl` or when
:setting:`REQUIRE_LOGIN` is enabled) requires a API token which can be obtained
in your :ref:`user-profile`:

.. code-block:: sh
Expand Down Expand Up @@ -115,7 +117,7 @@ following templates in the documents:

.. note::

Legal documents for the Hosted Weblate service is available in this Git repository
Legal documents for the Hosted Weblate service are available in this Git repository
<https://github.com/WeblateOrg/wllegal/tree/master/wllegal/templates/legal/documents>.

Most likely these will not be directly usable to you, but might come in handy
Expand Down
13 changes: 7 additions & 6 deletions docs/admin/translating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Suggestion voting
-----------------

Everyone can add suggestions by default, to be accepted by signed in users.
Suggestion voting can be used to make use of a string when more than signed in
Suggestion voting can be used to make use of a string when more than one signed-in
user agrees, by setting up the :ref:`component` configuration with
:guilabel:`Suggestion voting` to turn on voting, and :guilabel:`Autoaccept suggestions`
to set a threshold for accepted suggestions (this includes a vote from the user
Expand Down Expand Up @@ -40,9 +40,10 @@ You can combine these with :ref:`privileges` into one of the following setups:
Additional info on source strings
---------------------------------

Enhance the translation process with info available in the translation files.
This includes explanation, string priority, check flags, or providing visual
context. All these features can be set while editing additional string info:
Enhance the translation process by adding additional info to the strings
including explanations, string priorities, check flags and visual context. Some
of that info may be extracted from the translation files and some may be added
by editing the additional string info:

.. image:: /images/source-review-edit.png

Expand All @@ -57,7 +58,7 @@ Strings prioritization
.. versionadded:: 2.0

String priority can be changed to offer higher priority strings for translation earlier by
using the ``priority`` flag
using the ``priority`` flag.

.. hint::

Expand Down Expand Up @@ -86,7 +87,7 @@ Explanation

.. versionchanged:: 4.1

In previous version this has been called extra context.
In previous versions this has been called :guilabel:`Extra context`.

Use the explanation to clarify scope or usage of the translation. You can use
Markdown to include links and other markup.
Expand Down
3 changes: 2 additions & 1 deletion docs/admin/upgrade.rst
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,10 @@ Please follow :ref:`generic-upgrade-instructions` in order to perform update.

Notable configuration or dependencies changes:

* There is a change in :setting:`django:INSTALLED_APPS`.
* There is a change in :setting:`django:INSTALLED_APPS`, ``weblate.configuration`` has to be added there.
* Django 3.1 is now required.
* In case you are using MySQL or MariaDB, the minimal required versions have increased, see :ref:`mysql`.
* **Changed in 4.4.1:** :ref:`mono_gettext` now uses both ``msgid`` and ``msgctxt`` when present. This will change IDs of translation strings in such files. Please make sure you commit pending changes in such files prior upgrading.

.. seealso:: :ref:`generic-upgrade-instructions`

Expand Down
Loading

0 comments on commit 28e7e29

Please sign in to comment.