Skip to content

Commit e003ecc

Browse files
committed
Prepare switch from Transifex to weblate
1 parent 1160539 commit e003ecc

File tree

5 files changed

+40
-42
lines changed

5 files changed

+40
-42
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
.transifexrc
55
.tx
66
.DS_Store
7+
locale/.doctrees

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,9 @@ info:
177177

178178
.PHONY: gettext
179179
gettext:
180-
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
180+
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) locale
181181
@echo
182-
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
182+
@echo "Created or updated POT file in locale."
183183

184184
.PHONY: changes
185185
changes:
@@ -222,4 +222,4 @@ pseudoxml:
222222
dummy:
223223
$(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy
224224
@echo
225-
@echo "Build finished. Dummy builder generates no files."
225+
@echo "Build finished. Dummy builder generates no files."

README.md

+31-36
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![Documentation Status][badge]][docs] [![Translation Status][tbadge]][wbetranslate]
2+
13
# Zammad admin documentation
24

35
If you want to contribute to zammad documentation you can
@@ -25,9 +27,6 @@ Thanks! ❤️ ❤️ ❤️
2527

2628
Zammad Team
2729

28-
29-
[![Documentation Status](https://readthedocs.org/projects/zammad-admin-documentation/badge/?version=latest)](https://zammad-admin-documentation.readthedocs.io/de/latest/)
30-
3130
## Notes on Documentation Branches and Pull Requests
3231

3332
Please note that this repository uses protected branches.
@@ -36,64 +35,60 @@ please use ``main`` as destination Branch.
3635

3736
This will ensure that your changes are available upon merge.
3837

38+
## Compilation
39+
40+
### Dependencies
41+
42+
* sphinx
3943

40-
## Local tests (mostly internal stuff)
44+
```
45+
$ pip install sphinx sphinx-autobuild sphinx-intl sphinx_rtd_theme sphinx-tabs
46+
```
4147

42-
If you want to test the doc for yourself you need a local installation of sphinx and gettext.
48+
* gettext
4349

4450
```
45-
pip install sphinx sphinx-autobuild sphinx-intl sphinx_rtd_theme sphinx-version-warning
51+
$ brew install gettext # macOS
52+
$ sudo apt install gettext # Debian / Ubuntu
53+
$ sudo dnf install gettext # Fedora
4654
```
4755

48-
4956
### Example for a local HTML build
5057

5158
```
5259
make html
5360
```
5461

55-
### Example workflow for localization using transifex
56-
57-
If you have to work on the translations you need gettext.
62+
### Localization using Weblate
5863

59-
For OS X use HomeBrew or build from source. For Linux use your package
60-
manager.
64+
This documentation is translated via Weblate.
65+
After changing or adding text in this documentation, updating the POT file
66+
is required. (This is usually done by us after QA *before* merging the PR)
6167

62-
```
63-
brew install gettext
64-
```
68+
Weblate will automatically provide the translation parts in in its UI for
69+
all available languages. If there's translation progress it will automatically
70+
provide pull requests on this repository. 🎉
6571

66-
The workflow itself
6772
```
68-
# create .tx config
69-
$ tx init
70-
7173
# ensure clean enviroment
7274
$ make clean
7375
7476
# generate the strings from the *.rst files
7577
$ make gettext
7678
77-
# OPTIONAL: if you have to adapt a new locale, run
78-
sphinx-intl update -p _build/locale/ -l de
79-
80-
# update the resource files from the pot dir
81-
$ sphinx-intl update-txconfig-resources --pot-dir _build/locale --transifex-project-name zammad-admin-documentation
82-
83-
# push to transifex (if configured)
84-
$ tx push -s
85-
86-
# Below pull options by default ignore unreviewed (see https://docs.transifex.com/client/pull#getting-different-file-variants )
87-
# after translation pull needed languages from transifex
88-
$ tx pull -l en
89-
90-
# build the .MO files for use with readthedocs
91-
# (After a successful build, push to this repo and readthedocs will update itself.)
92-
$ sh build_mo.sh
93-
9479
# manual language-based build (`_build/html/`) (for testing)
9580
$ make -e SPHINXOPTS="-D language='de'" html
9681
$ make -e SPHINXOPTS="-D language='en'" html
9782
```
9883

9984
If you have a problem, please create an issue. Thanks.
85+
86+
### Localization progress
87+
88+
[![Translation progress][tprogress]][wbetranslate]
89+
90+
[badge]: https://readthedocs.org/projects/zammad-admin-documentation/badge/?version=latest
91+
[docs]: https://admin-docs.zammad.org/en/latest/
92+
[tbadge]: https://translations.zammad.org/widgets/documentations/-/admin-documentation/svg-badge.svg
93+
[wbetranslate]: https://translations.zammad.org/projects/documentations/admin-documentation/
94+
[tprogress]: https://translations.zammad.org/widgets/documentations/-/admin-documentation/multi-auto.svg

conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
extensions = ['versionwarning.extension', 'sphinx_tabs.tabs']
1717

1818
locale_dirs = ['locale/']
19-
gettext_compact = False
19+
gettext_compact = "user-docs"
2020
language = "en"
2121

2222
html_static_path = ['_static']

requirements.txt

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
sphinx-version-warning
2-
sphinx-tabs
1+
Sphinx>=4.1
2+
sphinx-rtd-theme>=0.5
3+
sphinx-tabs>=1.3
4+
sphinx-version-warning>=1.1

0 commit comments

Comments
 (0)