Skip to content

Commit

Permalink
chore(docs): Update translation workflow
Browse files Browse the repository at this point in the history
Weblate settings are changed to rebase commits onto our master continuously. All
that's needed to pull in translations now is to pull, rather than locking, using
a custom script, and resetting the Weblate repo.

Committing translatable strings is now done on every commit and checked on PR,
so that is no longer part of the import process.

Commits on Weblate are squashed using the "squash git commits" addon. It is
configurable to squash all commits into one and add co-author commit messages,
like we do now. Instead I've set it to just squash commits from a single author
for clearer attribution.
  • Loading branch information
anthonybilinski committed Feb 21, 2022
1 parent 7aa8d71 commit 4f798e9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 175 deletions.
37 changes: 15 additions & 22 deletions MAINTAINING.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,29 +156,22 @@ apply the normal rating process.

# Translations from Weblate

Weblate provides an easy way for people to translate qTox. On one hand, it does
require a bit more attention & regular checking whether there are new
translations, on the other, it lessened problems that were happening with
"manual" way of providing translations.
Weblate provides an easy way for people to translate qTox.

New translable strings need to be generated into a form Weblate can consume
using `./tools/update-translation-files.sh ALL` and commiting the result.

To get translations into qTox:

1. Go to `https://hosted.weblate.org/projects/tox/qtox/#repository` and lock
the repository for translations.
2. Make sure you have git setup to automatically gpg sign commits.
3. To update translated strings from Weblate, in the root of the qTox
repository execute the script `tools/update-weblate.sh`
4. If a new translation language has been added, update the following files:
- `translations/CMakeLists.txt`
- `src/widget/form/settings/generalform.cpp`
- `translations/README.md`
- `translations/i18n.pri`
- `translations/translations.qrc`
5. After the Pull Request has been merged, `reset` Weblate to master and
unlock it.
using `./tools/update-translation-files.sh ALL` and commiting the result. This
should be done as soon as strings are available since weblate follows our
branch, so is checked for in CI.

To get translations into qTox, fast-forward merge from
https://hosted.weblate.org/git/tox/qtox/.

If a new translation language has been added, update the following files:
- `translations/CMakeLists.txt`
- `src/widget/form/settings/generalform.cpp`
- `translations/README.md`
- `translations/i18n.pri`
- `translations/translations.qrc`

# Releases

Expand Down Expand Up @@ -211,6 +204,7 @@ To get translations into qTox:
[`./tools/update-versions.sh`] script, e.g. `./tools/update-versions.sh
1.11.0`
- Update toxcore version number to the latest tag in [`./buildscripts/download/download_toxcore.sh]
- Pull in latest translations from Weblate.
- Update the bootstrap nodelist at `./res/nodes.json` from https://nodes.tox.chat/json.
This can be done by running [`./tools/update-nodes.sh`]
- Generate changelog with `clog`.
Expand Down Expand Up @@ -259,7 +253,6 @@ helping for a while, ask to be added to the `qTox` organization on GitHub.
[`CONTRIBUTING.md`]: /CONTRIBUTING.md
[`merge-pr.sh`]: /merge-pr.sh
[`test-pr.sh`]: /test-pr.sh
[`./tools/deweblate-translation-file.sh`]: /tools/deweblate-translation-file.sh
[`./tools/create-tarball.sh`]: /tools/create-tarball.sh
[`./tools/update-nodes.sh`]: /tools/update-nodes.sh
[`./tools/update-versions.sh`]: /tools/update-versions.sh
Expand Down
73 changes: 0 additions & 73 deletions tools/deweblate-translation-file.sh

This file was deleted.

80 changes: 0 additions & 80 deletions tools/update-weblate.sh

This file was deleted.

0 comments on commit 4f798e9

Please sign in to comment.