Mercurial > kallithea
annotate docs/dev/i18n.rst @ 9013:3a3865b4861d draft i18n tip
i18n: updated translation for German
Currently translated at 67.1% (727 of 1082 strings)
author | Kuro Chu <mitecolider@gmail.com> |
---|---|
date | Thu, 25 Jul 2024 00:00:26 +0200 |
parents | a564e87a3958 |
children |
rev | line source |
---|---|
8417
a564e87a3958
docs: move i18n how_to directly under docs
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
8382
diff
changeset
|
1 .. _translations: |
a564e87a3958
docs: move i18n how_to directly under docs
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
8382
diff
changeset
|
2 |
4959
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
3 ============ |
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
4 Translations |
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
5 ============ |
0 | 6 |
4959
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
7 Translations are available on Hosted Weblate at the following URL: |
3925
8ddf35e02d05
updated translations and added transifex link
Marcin Kuzminski <marcin@python-works.com>
parents:
3690
diff
changeset
|
8 |
4677
d86bd885b9fc
Update i18n howto: we now use Hosted Weblate.
Andrew Shadura <andrew@shadura.me>
parents:
4212
diff
changeset
|
9 https://hosted.weblate.org/projects/kallithea/kallithea/ |
3925
8ddf35e02d05
updated translations and added transifex link
Marcin Kuzminski <marcin@python-works.com>
parents:
3690
diff
changeset
|
10 |
4959
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
11 Registered users may contribute to the existing languages, or request a new |
7863
de1342abcf42
i18n/how_to: fix typos
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7570
diff
changeset
|
12 language translation. |
4959
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
13 |
5433
fbbe80e3322b
docs: consistent spacing around headings
Mads Kiilerich <madski@unity3d.com>
parents:
5416
diff
changeset
|
14 |
4959
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
15 Translating using Weblate |
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
16 ------------------------- |
1225
357b0c18f844
refreshed how_to on translations
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
17 |
4959
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
18 Weblate_ offers a simple and easy to use interface featuring glossary, machine |
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
19 translation, suggestions based on similar translations in other projects, |
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
20 automatic checks etc. Weblate imports the source code tree directly from |
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
21 the version control system, and commits edits back from time to time. |
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
22 |
7569
e3748f24f256
i18n: how_to: fix some non-fluent English
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7390
diff
changeset
|
23 When registering at Weblate, make sure you use the name and email address you |
e3748f24f256
i18n: how_to: fix some non-fluent English
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7390
diff
changeset
|
24 prefer to be used when your changes are committed. We can and probably will |
e3748f24f256
i18n: how_to: fix some non-fluent English
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7390
diff
changeset
|
25 amend changesets coming from Weblate, but having things right from the beginning |
e3748f24f256
i18n: how_to: fix some non-fluent English
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7390
diff
changeset
|
26 makes things easier. |
4959
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
27 |
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
28 Weblate performs sanity checks all the time and tries to prevent you from ignoring |
7569
e3748f24f256
i18n: how_to: fix some non-fluent English
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7390
diff
changeset
|
29 them. Most common mistakes are inconsistent punctuation, whitespace, missing or extra |
4959
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
30 format parameters, untranslated strings copied into the translation. Please perform |
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
31 necessary corrections when they're needed, or override the false positives. |
1225
357b0c18f844
refreshed how_to on translations
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
32 |
5433
fbbe80e3322b
docs: consistent spacing around headings
Mads Kiilerich <madski@unity3d.com>
parents:
5416
diff
changeset
|
33 |
7570
5b841d56bf74
i18n: how_to: add instructions to regenerate translations
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7569
diff
changeset
|
34 Merging translations from Weblate (admin-only) |
5b841d56bf74
i18n: how_to: add instructions to regenerate translations
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7569
diff
changeset
|
35 ---------------------------------------------- |
4959
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
36 |
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
37 Weblate rebases its changes every time it pulls from our repository. Pulls are triggered |
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
38 by a web hook from Our Own Kallithea every time it receives new commits. Usually merging |
7569
e3748f24f256
i18n: how_to: fix some non-fluent English
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7390
diff
changeset
|
39 the new translations is a straightforward process consisting of a pull from the Weblate-hosted |
e3748f24f256
i18n: how_to: fix some non-fluent English
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7390
diff
changeset
|
40 repository which is available under the Data Exports tab in the Weblate interface. |
3933
a5d30196711e
Updated translations how_to
Marcin Kuzminski <marcin@python-works.com>
parents:
3925
diff
changeset
|
41 |
7569
e3748f24f256
i18n: how_to: fix some non-fluent English
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7390
diff
changeset
|
42 Weblate tries to minimise the number of commits, but that doesn't always work, especially |
4959
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
43 when two translators work with different languages at more or less the same time. |
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
44 It makes sense sometimes to re-order or fold commits by the same author when they touch |
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
45 just the same language translation. That, however, may confuse Weblate sometimes, in |
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
46 which case it should be manually convinced it has to discard the commits it created by |
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
47 using its administrative interface. |
1225
357b0c18f844
refreshed how_to on translations
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
48 |
5433
fbbe80e3322b
docs: consistent spacing around headings
Mads Kiilerich <madski@unity3d.com>
parents:
5416
diff
changeset
|
49 |
7863
de1342abcf42
i18n/how_to: fix typos
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7570
diff
changeset
|
50 Regenerating translations after source code changes (admin-only) |
de1342abcf42
i18n/how_to: fix typos
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7570
diff
changeset
|
51 ---------------------------------------------------------------- |
7570
5b841d56bf74
i18n: how_to: add instructions to regenerate translations
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7569
diff
changeset
|
52 |
5b841d56bf74
i18n: how_to: add instructions to regenerate translations
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7569
diff
changeset
|
53 When the Kallithea source code changes, both the location as the content of |
5b841d56bf74
i18n: how_to: add instructions to regenerate translations
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7569
diff
changeset
|
54 translation strings can change. It is therefore necessary to regularly |
5b841d56bf74
i18n: how_to: add instructions to regenerate translations
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7569
diff
changeset
|
55 regenerate the `kallithea.pot` file containing these strings, as well as aligning |
5b841d56bf74
i18n: how_to: add instructions to regenerate translations
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7569
diff
changeset
|
56 the translation files (`*.po`). |
5b841d56bf74
i18n: how_to: add instructions to regenerate translations
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7569
diff
changeset
|
57 |
5b841d56bf74
i18n: how_to: add instructions to regenerate translations
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7569
diff
changeset
|
58 First update the translation strings:: |
5b841d56bf74
i18n: how_to: add instructions to regenerate translations
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7569
diff
changeset
|
59 |
8209
01aca0a4f876
py3: officially support Python 3
Mads Kiilerich <mads@kiilerich.com>
parents:
7863
diff
changeset
|
60 python3 setup.py extract_messages |
7570
5b841d56bf74
i18n: how_to: add instructions to regenerate translations
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7569
diff
changeset
|
61 |
8209
01aca0a4f876
py3: officially support Python 3
Mads Kiilerich <mads@kiilerich.com>
parents:
7863
diff
changeset
|
62 Then regenerate the translation files. This could either be done with `python3 |
7570
5b841d56bf74
i18n: how_to: add instructions to regenerate translations
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7569
diff
changeset
|
63 setup.py update_catalog` or with `msgmerge` from the `gettext` package. As |
5b841d56bf74
i18n: how_to: add instructions to regenerate translations
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7569
diff
changeset
|
64 Weblate is also touching these translation files, it is preferred to use the |
5b841d56bf74
i18n: how_to: add instructions to regenerate translations
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7569
diff
changeset
|
65 same tools (`msgmerge`) and settings as Weblate to minimize the diff:: |
5b841d56bf74
i18n: how_to: add instructions to regenerate translations
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7569
diff
changeset
|
66 |
5b841d56bf74
i18n: how_to: add instructions to regenerate translations
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7569
diff
changeset
|
67 find kallithea/i18n -name kallithea.po | xargs -I '{}' \ |
5b841d56bf74
i18n: how_to: add instructions to regenerate translations
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7569
diff
changeset
|
68 msgmerge --width=76 --backup=none --previous --update '{}' \ |
5b841d56bf74
i18n: how_to: add instructions to regenerate translations
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7569
diff
changeset
|
69 kallithea/i18n/kallithea.pot |
5b841d56bf74
i18n: how_to: add instructions to regenerate translations
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7569
diff
changeset
|
70 |
5b841d56bf74
i18n: how_to: add instructions to regenerate translations
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7569
diff
changeset
|
71 |
4959
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
72 Manual creation of a new language translation |
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
73 --------------------------------------------- |
1225
357b0c18f844
refreshed how_to on translations
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
74 |
4959
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
75 In the prepared development environment, run the following to ensure |
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
76 all translation strings are extracted and up-to-date:: |
3933
a5d30196711e
Updated translations how_to
Marcin Kuzminski <marcin@python-works.com>
parents:
3925
diff
changeset
|
77 |
8209
01aca0a4f876
py3: officially support Python 3
Mads Kiilerich <mads@kiilerich.com>
parents:
7863
diff
changeset
|
78 python3 setup.py extract_messages |
3933
a5d30196711e
Updated translations how_to
Marcin Kuzminski <marcin@python-works.com>
parents:
3925
diff
changeset
|
79 |
a5d30196711e
Updated translations how_to
Marcin Kuzminski <marcin@python-works.com>
parents:
3925
diff
changeset
|
80 Create new language by executing following command:: |
4959
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
81 |
8209
01aca0a4f876
py3: officially support Python 3
Mads Kiilerich <mads@kiilerich.com>
parents:
7863
diff
changeset
|
82 python3 setup.py init_catalog -l <new_language_code> |
3933
a5d30196711e
Updated translations how_to
Marcin Kuzminski <marcin@python-works.com>
parents:
3925
diff
changeset
|
83 |
4959
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
84 This creates a new translation under directory `kallithea/i18n/<new_language_code>` |
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
85 based on the translation template file, `kallithea/i18n/kallithea.pot`. |
3933
a5d30196711e
Updated translations how_to
Marcin Kuzminski <marcin@python-works.com>
parents:
3925
diff
changeset
|
86 |
4959
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
87 Edit the new PO file located in `LC_MESSAGES` directory with poedit or your |
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
88 favorite PO files editor. After you finished with the translations, check the |
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
89 translation file for errors by executing:: |
3933
a5d30196711e
Updated translations how_to
Marcin Kuzminski <marcin@python-works.com>
parents:
3925
diff
changeset
|
90 |
4186
7e5f8c12a3fc
First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3934
diff
changeset
|
91 msgfmt -f -c kallithea/i18n/<new_language_code>/LC_MESSAGES/<updated_file.po> |
3933
a5d30196711e
Updated translations how_to
Marcin Kuzminski <marcin@python-works.com>
parents:
3925
diff
changeset
|
92 |
4959
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
93 Finally, compile the translations:: |
3933
a5d30196711e
Updated translations how_to
Marcin Kuzminski <marcin@python-works.com>
parents:
3925
diff
changeset
|
94 |
8209
01aca0a4f876
py3: officially support Python 3
Mads Kiilerich <mads@kiilerich.com>
parents:
7863
diff
changeset
|
95 python3 setup.py compile_catalog -l <new_language_code> |
3933
a5d30196711e
Updated translations how_to
Marcin Kuzminski <marcin@python-works.com>
parents:
3925
diff
changeset
|
96 |
5433
fbbe80e3322b
docs: consistent spacing around headings
Mads Kiilerich <madski@unity3d.com>
parents:
5416
diff
changeset
|
97 |
7569
e3748f24f256
i18n: how_to: fix some non-fluent English
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7390
diff
changeset
|
98 Manually updating translations |
e3748f24f256
i18n: how_to: fix some non-fluent English
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7390
diff
changeset
|
99 ------------------------------ |
1225
357b0c18f844
refreshed how_to on translations
Marcin Kuzminski <marcin@python-works.com>
parents:
547
diff
changeset
|
100 |
4959
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
101 Extract the latest versions of strings for translation by running:: |
3933
a5d30196711e
Updated translations how_to
Marcin Kuzminski <marcin@python-works.com>
parents:
3925
diff
changeset
|
102 |
8209
01aca0a4f876
py3: officially support Python 3
Mads Kiilerich <mads@kiilerich.com>
parents:
7863
diff
changeset
|
103 python3 setup.py extract_messages |
3933
a5d30196711e
Updated translations how_to
Marcin Kuzminski <marcin@python-works.com>
parents:
3925
diff
changeset
|
104 |
4959
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
105 Update the PO file by doing:: |
3933
a5d30196711e
Updated translations how_to
Marcin Kuzminski <marcin@python-works.com>
parents:
3925
diff
changeset
|
106 |
8209
01aca0a4f876
py3: officially support Python 3
Mads Kiilerich <mads@kiilerich.com>
parents:
7863
diff
changeset
|
107 python3 setup.py update_catalog -l <new_language_code> |
3933
a5d30196711e
Updated translations how_to
Marcin Kuzminski <marcin@python-works.com>
parents:
3925
diff
changeset
|
108 |
7569
e3748f24f256
i18n: how_to: fix some non-fluent English
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7390
diff
changeset
|
109 Edit the newly updated translation file. Repeat all steps after the |
e3748f24f256
i18n: how_to: fix some non-fluent English
Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
parents:
7390
diff
changeset
|
110 `init_catalog` step from the 'new translation' instructions above. |
3933
a5d30196711e
Updated translations how_to
Marcin Kuzminski <marcin@python-works.com>
parents:
3925
diff
changeset
|
111 |
5433
fbbe80e3322b
docs: consistent spacing around headings
Mads Kiilerich <madski@unity3d.com>
parents:
5416
diff
changeset
|
112 |
4959
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
113 Testing translations |
6a2ec172c127
docs: update the translation howto
Andrew Shadura <andrew@shadura.me>
parents:
4677
diff
changeset
|
114 -------------------- |
3933
a5d30196711e
Updated translations how_to
Marcin Kuzminski <marcin@python-works.com>
parents:
3925
diff
changeset
|
115 |
7390
451b3f9d814e
docs: update i18n doc after TG migration changed lang to i18n.lang and test.ini is generated
Mads Kiilerich <mads@kiilerich.com>
parents:
6789
diff
changeset
|
116 Edit `kallithea/tests/conftest.py` and set `i18n.lang` to `<new_language_code>` |
451b3f9d814e
docs: update i18n doc after TG migration changed lang to i18n.lang and test.ini is generated
Mads Kiilerich <mads@kiilerich.com>
parents:
6789
diff
changeset
|
117 and run Kallithea tests by executing:: |
3933
a5d30196711e
Updated translations how_to
Marcin Kuzminski <marcin@python-works.com>
parents:
3925
diff
changeset
|
118 |
5701
2d2decce586f
pytest migration: update documentation
Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
parents:
5502
diff
changeset
|
119 py.test |
6789
4d04ac08fff7
docs: fix some sphinx warnings
Mads Kiilerich <mads@kiilerich.com>
parents:
5701
diff
changeset
|
120 |
4d04ac08fff7
docs: fix some sphinx warnings
Mads Kiilerich <mads@kiilerich.com>
parents:
5701
diff
changeset
|
121 |
8382
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
122 Managing translations with scripts/i18n tooling |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
123 ----------------------------------------------- |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
124 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
125 The general idea with the ``scripts/i18n`` tooling is to keep changes in the |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
126 main repository focussed on actual and reviewable changes with minimal noise. |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
127 Noisy generated or redundant localization changes (that are useful when |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
128 translations) are contained in the ``kallithea-i18n`` repo on the ``i18n`` |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
129 branch. The translation files in the main repository have no line numbers, no |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
130 untranslated entries, no fuzzy entries, no unused entries, and no constantly |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
131 changing records of "latest" this and that (name, date, version, etc). |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
132 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
133 The branches in the main repo (``default`` and ``stable``) will thus only have |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
134 stripped ``.pot`` and ``.po`` files: an (almost) empty |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
135 ``kallithea/i18n/kallithea.pot`` file, and minimal ``.po`` files. There are no |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
136 binary ``.mo`` files in any repo - these are only generated when packaging for |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
137 release (or locally if installing from source). |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
138 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
139 Generally, ``kallithea/i18n/`` should not be changed on the ``default`` and |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
140 ``stable`` branches at all. The ``i18n`` branch should *only* change |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
141 ``kallithea/i18n/`` . If there are changesets with exceptions from that, these |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
142 changesets should probably be grafted/redone in the "right" place. |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
143 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
144 The basic flow is thus: |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
145 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
146 0. All weblate translation is done on the ``i18n`` branch which generally is |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
147 based on the ``stable`` branch. |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
148 1. Graft the essential part of all new changes on the ``i18n`` branch to |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
149 ``stable`` (while normalizing to current stripped state of stable). |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
150 2. Merge from ``stable`` to ``i18n`` (while normalizing to the resulting |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
151 unstripped and fully ``msgmerge``'d state and ``.pot``-updating state). |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
152 3. Verify that the content of the ``i18n`` branch will give exactly the content |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
153 of the ``stable`` branch after stripping. If there is a diff, something has |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
154 to be fixed in one way or the other ... and the whole process should |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
155 probably be redone. |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
156 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
157 Translate |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
158 ^^^^^^^^^ |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
159 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
160 First land full translation changes in the ``kallithea-i18n`` repo on the |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
161 ``i18n`` branch. That can be done in pretty much any way you want. If changes |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
162 for some reason have to be grafted or merged, there might be odd conflicts due |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
163 to all the noise. Conflicts on the full ``i18n`` branch can perhaps be resolved |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
164 more easily using non-stripping normalization before merging:: |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
165 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
166 python3 setup.py extract_messages && cp kallithea/i18n/kallithea.pot full.pot && hg revert kallithea/i18n/kallithea.pot -r . |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
167 hg resolve kallithea/i18n/ --tool X --config merge-tools.X.executable=python3 --config merge-tools.X.args='scripts/i18n normalized-merge --merge-pot-file full.pot $local $base $other $output' |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
168 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
169 Land in main repository - stripped |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
170 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
171 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
172 When the full i18n changes have landed on the ``i18n`` branch, prepare to land |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
173 them on ``stable``:: |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
174 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
175 hg up -cr stable |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
176 python3 setup.py extract_messages && cp kallithea/i18n/kallithea.pot full.pot && hg revert kallithea/i18n/kallithea.pot |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
177 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
178 Consider all new ``i18n`` changes since last merge from ``stable``:: |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
179 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
180 hg log -G --style compact -r 'only("i18n", children(::stable))' |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
181 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
182 Graft them one by one (or in collapsed chunks) while normalizing. |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
183 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
184 If the graft has conflicts, use the ``scripts/i18n`` normalization tool to |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
185 apply ``msgmerge`` and strip before doing 3-way merge and resolving conflicts:: |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
186 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
187 hg resolve kallithea/i18n/ --tool X --config merge-tools.X.executable=python3 --config merge-tools.X.args='scripts/i18n normalized-merge --merge-pot-file full.pot --strip $local $base $other $output' |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
188 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
189 When all conflicts have been resolved, continue the graft:: |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
190 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
191 hg graft --continue |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
192 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
193 Then make sure any non-conflicting files are normalized and stripped too:: |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
194 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
195 scripts/i18n normalize-po-files --strip --merge-pot-file full.pot kallithea/i18n/*/LC_MESSAGES/kallithea.po |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
196 hg ci --amend --config ui.editor=true |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
197 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
198 When things have been grafted to the ``stable`` branch, clean up history if |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
199 necessary: clean up the author and commit message when necessary, and perhaps |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
200 merge multiple changesets from same contributor. |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
201 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
202 Merge back to ``i18n`` |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
203 ^^^^^^^^^^^^^^^^^^^^^^ |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
204 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
205 For any i18n changes that for some reason have been done on the ``stable`` |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
206 branch, apply them manually on the ``i18n`` branch too - perhaps by grafting |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
207 and editing manually. The merge done in this step will `not` take care of it. |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
208 If the verification step done a bit later points out that something has been |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
209 missed, strip and go back to this point. |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
210 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
211 Then merge back to the ``i18n`` branch using normalization while keeping the |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
212 full ``.po`` files, and updating the full ``.pot`` and ``.po`` to current |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
213 state:: |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
214 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
215 hg up -cr i18n |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
216 hg merge stable --tool internal:fail |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
217 hg revert kallithea/i18n/*/LC_MESSAGES/*.po -r . |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
218 hg resolve -m kallithea/i18n/*/LC_MESSAGES/*.po |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
219 hg resolve -l # verify all conflicts have been resolved |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
220 python3 setup.py extract_messages && cp kallithea/i18n/kallithea.pot full.pot |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
221 scripts/i18n normalize-po-files --merge-pot-file full.pot kallithea/i18n/*/LC_MESSAGES/kallithea.po |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
222 hg commit # "Merge from stable" |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
223 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
224 Note: ``normalize-po-files`` can also pretty much be done manually with:: |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
225 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
226 for po in kallithea/i18n/*/LC_MESSAGES/kallithea.po; do msgmerge --width=76 --backup=none --previous --update $po full.pot ; done |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
227 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
228 Note: Additional merges from ``stable`` to ``i18n`` can be done any time. |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
229 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
230 Verify |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
231 ^^^^^^ |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
232 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
233 Verify things are in sync between the full ``i18n`` branch and the stripped |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
234 ``stable`` branch:: |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
235 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
236 hg up -cr stable |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
237 hg revert -a -r i18n |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
238 python3 setup.py extract_messages && cp kallithea/i18n/kallithea.pot full.pot && hg revert kallithea/i18n/kallithea.pot |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
239 scripts/i18n normalize-po-files --strip --merge-pot-file full.pot kallithea/i18n/*/LC_MESSAGES/kallithea.po |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
240 hg diff |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
241 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
242 If there is a diff, figure out where it came from, go back and fix the root |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
243 cause, and redo the graft/merge. |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
244 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
245 Push |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
246 ^^^^ |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
247 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
248 The changes on the ``stable`` branch should now be ready for pushing - verify |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
249 the actual changes with a thorough review of:: |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
250 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
251 hg out -pvr stable |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
252 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
253 When ``stable`` changes have been pushed, also push the ``i18n`` branch to the |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
254 ``kallithea-i18n`` repo so Weblate can see it. |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
255 |
fa373bf186b2
scripts/i18n: update i18n howto with recipe for use of scripts/i18n tooling
Mads Kiilerich <mads@kiilerich.com>
parents:
8209
diff
changeset
|
256 |
6789
4d04ac08fff7
docs: fix some sphinx warnings
Mads Kiilerich <mads@kiilerich.com>
parents:
5701
diff
changeset
|
257 .. _Weblate: http://weblate.org/ |