Replace Transifex documentation and configuration with Weblate.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2025-08-29 12:35:20 -07:00
parent dc39c68389
commit 6e307570d0
5 changed files with 9 additions and 66 deletions

3
.gitignore vendored
View File

@@ -4,9 +4,6 @@
# npm cache directory
.npm
# transifexrc - if user prefers it to be in working tree
.transifexrc
# Compiled binary build directory
/dist/
/dist-electron/

View File

@@ -1,9 +0,0 @@
[main]
host = https://www.transifex.com
[o:zulip:p:zulip:r:desktopjson]
file_filter = public/translations/<lang>.json
minimum_perc = 0
source_file = public/translations/en.json
source_lang = en
type = KEYVALUEJSON

View File

@@ -8,55 +8,13 @@ appropriate translation for a given string ("message") used in the UI.
To manage the set of UI messages and translations for them, and
provide a nice workflow for people to contribute translations, we use
(along with the rest of the Zulip project) a service called Transifex.
## Maintainers: syncing to/from Transifex
### Setup
You'll want Transifex's CLI client, `tx`.
- Install in your homedir with `easy_install transifex-client` or `pip3 install --user transifex-client`.
Or you can use your Zulip dev server virtualenv, which has it.
- Configure a `.transifexrc` with your API token. See [upstream
instructions](https://docs.transifex.com/client/client-configuration#transifexrc).
This can go either in your homedir, or in your working tree to make
the configuration apply only locally; it's already ignored in our
`.gitignore`.
- You'll need to be added [as a "maintainer"][tx-zulip-maintainers] to
the Zulip project on Transifex. (Upstream [recommends
this][tx-docs-maintainers] as the set of permissions on a Transifex
project needed for interacting with it as a developer.)
[tx-zulip-maintainers]: https://www.transifex.com/zulip/zulip/settings/maintainers/
[tx-docs-maintainers]: https://docs.transifex.com/teams/understanding-user-roles#project-maintainers
### Uploading strings to translate
Run `tx push -s`.
This uploads from `public/translations/en.json` to the
set of strings Transifex shows for contributors to translate.
(See `.tx/config` for how that's configured.)
### Downloading translated strings
Run `tools/tx-pull`.
This writes to files `public/translations/<lang>.json`.
(See `.tx/config` for how that's configured.)
Then look at the following sections to see if further updates are
needed to take full advantage of the new or updated translations.
(along with the rest of the Zulip project) a service called Weblate.
### Updating the languages supported in the code
Sometimes when downloading translated strings we get a file for a new
language. This happens when we've opened up a new language for people
to contribute translations into in the Zulip project on Transifex,
to contribute translations into in the Zulip project on Weblate,
which we do when someone expresses interest in contributing them.
The locales for supported languages are stored in `public/translations/supported-locales.json`

View File

@@ -4,17 +4,17 @@ These are _generated_ files (\*) that contain translations of the strings in
the app.
You can help translate Zulip Desktop into your language! We do our
translations in Transifex, which is a nice web app for collaborating on
translations in Weblate, which is a nice web app for collaborating on
translations; a maintainer then syncs those translations into this repo.
To help out, [join the Zulip project on
Transifex](https://www.transifex.com/zulip/zulip/) and enter translations
Weblate](https://hosted.weblate.org/projects/zulip/) and enter translations
there. More details in the [Zulip contributor docs](https://zulip.readthedocs.io/en/latest/translating/translating.html#translators-workflow).
Within that Transifex project, if you'd like to focus on Zulip Desktop, look
at `desktop.json`. The other resources there are for the Zulip web/mobile
Within that Weblate project, if you'd like to focus on Zulip Desktop, look
at the **Desktop** component. The other components are for the Zulip web/mobile
app, where translations are also very welcome.
(\*) One file is an exception: `en.json` is manually maintained as a
list of (English) messages in the source code, and is used when we upload to
Transifex a list of strings to be translated. It doesn't contain any
(\*) One file is an exception: `en.json` is maintained by `i18next-parser` as a
list of (English) messages in the source code, and is used by Weblate as
a list of strings to be translated. It doesn't contain any
translations.

View File

@@ -1,3 +0,0 @@
#!/bin/bash
set -eux
exec tx pull -a -f --minimum-perc=5