mirror of
https://github.com/django/django.git
synced 2025-06-05 11:39:13 +00:00
Updated docs for updating translations in docs/internals/howto-release-django.txt.
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
This commit is contained in:
parent
f973a70bfc
commit
e359f05b49
@ -84,6 +84,19 @@ You'll need a few things before getting started:
|
|||||||
username = __token__
|
username = __token__
|
||||||
password = # A project token.
|
password = # A project token.
|
||||||
|
|
||||||
|
* Access to Django's project on `Transifex
|
||||||
|
<https://app.transifex.com/django/django/>`_, with a Manager role. Generate
|
||||||
|
an API Token in the `user setting section
|
||||||
|
<https://app.transifex.com/user/settings/api/>`_ and set up your
|
||||||
|
``$HOME/.transifexrc`` file like this:
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
:caption: ``~/.transifexrc``
|
||||||
|
|
||||||
|
[https://www.transifex.com]
|
||||||
|
rest_hostname = https://rest.api.transifex.com
|
||||||
|
token = # API token
|
||||||
|
|
||||||
* Access to the ``djangoproject.com`` server to upload files.
|
* Access to the ``djangoproject.com`` server to upload files.
|
||||||
|
|
||||||
* Access to the admin on ``djangoproject.com`` as a "Site maintainer".
|
* Access to the admin on ``djangoproject.com`` as a "Site maintainer".
|
||||||
@ -129,18 +142,43 @@ any time leading up to the actual release:
|
|||||||
#. Double-check that the release notes index has a link to the notes
|
#. Double-check that the release notes index has a link to the notes
|
||||||
for the new release; this will be in ``docs/releases/index.txt``.
|
for the new release; this will be in ``docs/releases/index.txt``.
|
||||||
|
|
||||||
#. If this is a feature release, ensure translations from Transifex have been
|
#. If this is a :term:`feature release`, ensure translations from Transifex
|
||||||
integrated. This is typically done by a separate translation's manager
|
have been integrated. This is typically done by a separate translation's
|
||||||
rather than the releaser, but here are the steps. Provided you have an
|
manager rather than the releaser, but here are the steps. This process is a
|
||||||
account on Transifex:
|
bit lengthy so be sure to set aside 4-10 hours to do this, and ideally plan
|
||||||
|
for this task one or two days ahead of the release day.
|
||||||
|
|
||||||
|
In addition to having a configured Transifex account, the
|
||||||
|
`tx CLI <https://developers.transifex.com/docs/cli>`_ should be available in
|
||||||
|
your ``PATH``. Then, you can fetch all the translations by running:
|
||||||
|
|
||||||
.. code-block:: shell
|
.. code-block:: shell
|
||||||
|
|
||||||
$ python scripts/manage_translations.py fetch
|
$ python scripts/manage_translations.py fetch
|
||||||
|
|
||||||
and then commit the changed/added files (both ``.po`` and ``.mo``).
|
This command takes some time to run. When done, carefully inspect the output
|
||||||
Sometimes there are validation errors which need to be debugged, so avoid
|
for potential errors and/or warnings. If there are some, you will need to
|
||||||
doing this task immediately before a release is needed.
|
debug and resolve them on a case by case basis.
|
||||||
|
|
||||||
|
The recently fetched translations need some manual adjusting. First of all,
|
||||||
|
the ``PO-Revision-Date`` values must be manually bumped to be later than
|
||||||
|
``POT-Creation-Date``. You can use a command similar to this to bulk update
|
||||||
|
all the ``.po`` files (compare the diff against the relevant stable branch):
|
||||||
|
|
||||||
|
.. code-block:: shell
|
||||||
|
|
||||||
|
$ git diff --name-only stable/5.0.x | grep "\.po" | xargs sed -ri "s/PO-Revision-Date: [0-9\-]+ /PO-Revision-Date: $(date -I) /g"
|
||||||
|
|
||||||
|
All the new ``.po`` files should be manually and carefully inspected to
|
||||||
|
avoid committing a change in a file without any new translations. Also,
|
||||||
|
there shouldn't be any changes in the "plural forms": if there are any
|
||||||
|
(usually Spanish and French report changes for this) those will need
|
||||||
|
reverting.
|
||||||
|
|
||||||
|
Lastly, commit the changed/added files (both ``.po`` and ``.mo``) and create
|
||||||
|
a new PR targeting the stable branch of the corresponding release (example
|
||||||
|
`PR updating translations for 4.2
|
||||||
|
<https://github.com/django/django/pull/16715>`_).
|
||||||
|
|
||||||
#. :ref:`Update the django-admin manual page <django-admin-manpage>`:
|
#. :ref:`Update the django-admin manual page <django-admin-manpage>`:
|
||||||
|
|
||||||
@ -404,9 +442,10 @@ Now you're ready to actually put the release out there. To do this:
|
|||||||
|
|
||||||
Create new ``DocumentRelease`` objects for each language that has an entry
|
Create new ``DocumentRelease`` objects for each language that has an entry
|
||||||
for the previous release. Update djangoproject.com's `robots.docs.txt`__
|
for the previous release. Update djangoproject.com's `robots.docs.txt`__
|
||||||
file by copying entries from ``manage_translations.py robots_txt`` from the
|
file by copying the result generated from running the command
|
||||||
current stable branch in the ``django-docs-translations`` repository. For
|
``manage_translations.py robots_txt`` in the current stable branch from the
|
||||||
example, when releasing Django 4.2:
|
`django-docs-translations repository`__. For example, when releasing Django
|
||||||
|
4.2:
|
||||||
|
|
||||||
.. code-block:: shell
|
.. code-block:: shell
|
||||||
|
|
||||||
@ -415,6 +454,7 @@ Now you're ready to actually put the release out there. To do this:
|
|||||||
$ python manage_translations.py robots_txt
|
$ python manage_translations.py robots_txt
|
||||||
|
|
||||||
__ https://github.com/django/djangoproject.com/blob/main/djangoproject/static/robots.docs.txt
|
__ https://github.com/django/djangoproject.com/blob/main/djangoproject/static/robots.docs.txt
|
||||||
|
__ https://github.com/django/django-docs-translations
|
||||||
|
|
||||||
#. Post the release announcement to the |django-announce|, |django-developers|,
|
#. Post the release announcement to the |django-announce|, |django-developers|,
|
||||||
|django-users| mailing lists, and the Django Forum. This should include a
|
|django-users| mailing lists, and the Django Forum. This should include a
|
||||||
@ -447,9 +487,14 @@ You're almost done! All that's left to do now is:
|
|||||||
|
|
||||||
__ https://github.com/django/code.djangoproject.com/blob/main/trac-env/conf/trac.ini
|
__ https://github.com/django/code.djangoproject.com/blob/main/trac-env/conf/trac.ini
|
||||||
|
|
||||||
#. If it's a final release, update the current stable branch and remove the
|
#. If this was a final release:
|
||||||
pre-release branch in the `Django release process
|
|
||||||
<https://code.djangoproject.com/#Djangoreleaseprocess>`_ on Trac.
|
#. Update the current stable branch and remove the pre-release branch in the
|
||||||
|
`Django release process
|
||||||
|
<https://code.djangoproject.com/#Djangoreleaseprocess>`_ on Trac.
|
||||||
|
|
||||||
|
#. Update djangoproject.com's download page (`example PR
|
||||||
|
<https://github.com/django/djangoproject.com/pull/1444>`__).
|
||||||
|
|
||||||
#. If this was a security release, update :doc:`/releases/security` with
|
#. If this was a security release, update :doc:`/releases/security` with
|
||||||
details of the issues addressed.
|
details of the issues addressed.
|
||||||
@ -466,7 +511,8 @@ need to be done by the releaser.
|
|||||||
#. Create a new ``DocumentRelease`` object in the ``docs.djangoproject.com``
|
#. Create a new ``DocumentRelease`` object in the ``docs.djangoproject.com``
|
||||||
database for the new version's docs, and update the
|
database for the new version's docs, and update the
|
||||||
``docs/fixtures/doc_releases.json`` JSON fixture, so people without access
|
``docs/fixtures/doc_releases.json`` JSON fixture, so people without access
|
||||||
to the production DB can still run an up-to-date copy of the docs site.
|
to the production DB can still run an up-to-date copy of the docs site
|
||||||
|
(`example PR <https://github.com/django/djangoproject.com/pull/1446>`__).
|
||||||
|
|
||||||
#. Create a stub release note for the new feature version. Use the stub from
|
#. Create a stub release note for the new feature version. Use the stub from
|
||||||
the previous feature release version or copy the contents from the previous
|
the previous feature release version or copy the contents from the previous
|
||||||
|
Loading…
x
Reference in New Issue
Block a user