You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/i18n-l10n/resync-translations.md
+70-56Lines changed: 70 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,97 +8,111 @@ html_meta:
8
8
9
9
(resync-translations-label)=
10
10
11
-
## Resync translations in Plone back-end
11
+
## Resync translations in the Plone backend
12
12
13
-
Plone po files need to be updated each time a new string is added into Plone interface, or each time one of those strings is updated. Those translations are not only used in Plone Classic, but many of them are also exposed through the REST API to Volto.
13
+
Plone {term}`PO file`s need to be updated each time a new string is added into the Plone interface or each time one of those strings is updated.
14
+
Those translations are not only used in Plone Classic UI, but many of them are also exposed through the REST API to Volto.
14
15
15
-
Usually Translations team handles the update of those po files so you don't need to worry about it. Here we will explain the procedure to update such files.
16
+
Usually the Plone Translations Team updates these PO files.
17
+
Here we will explain the procedure to update them.
16
18
17
-
1. Clone the relevant branch of [buildout.coredev](https://github.com/plone/buildout.coredev) corresponding to the Plone version you want to update.
19
+
1.Clone the relevant branch of [buildout.coredev](https://github.com/plone/buildout.coredev) corresponding to the Plone version you want to update.
18
20
19
-
2. Initialize the buildout.
21
+
2.Initialize the buildout.
20
22
21
-
```bash
22
-
./bootstraph.sh
23
-
```
23
+
```shell
24
+
./bootstraph.sh
25
+
```
24
26
25
-
3. Run buildout using the `experimental/i18n.cfg` file:
27
+
3. Run buildout using the `experimental/i18n.cfg` file:
26
28
27
-
```bash
28
-
./bin/buildout -c experimental/i18n.cfg
29
-
```
29
+
```shell
30
+
./bin/buildout -c experimental/i18n.cfg
31
+
```
30
32
31
-
4. Run the `i18n-update-all` script:
33
+
4. Run the `i18n-update-all` script:
32
34
33
-
```bash
34
-
./bin/i18n-update-all
35
-
```
35
+
```shell
36
+
./bin/i18n-update-all
37
+
```
36
38
37
-
The script will go through Plone source code and will update all `pot` and `po` files in the plone.app.locales package.
39
+
The script will go through Plone source code and will update all `pot` and `po` files in the `plone.app.locales` package.
38
40
39
-
5. Commit the changes and push back to GitHub:
41
+
5. Commit the changes and push back to GitHub:
40
42
41
-
```bash
42
-
cd src/plone.app.locales
43
-
git add plone
44
-
git commit -m "Update translation files"
45
-
git push origin
46
-
```
43
+
```shell
44
+
cd src/plone.app.locales
45
+
git add plone
46
+
git commit -m "Update translation files"
47
+
git push origin
48
+
```
47
49
48
-
## Create a new plone.app.locales release
49
50
50
-
Translators will take care of translating `po` files into their languages. When the release manager requests to create a newplone.app.localesrelease, the procedure is the following:
51
+
(create-new-plone.app.locales-release-label)=
51
52
52
-
1. Create a virtualenv with zest.releaser and zest.pocompile installed:
53
+
## Create a new `plone.app.locales` release
53
54
54
-
```bash
55
-
`which python3.8` -m venv .
56
-
./bin/pip install zest.releaser zest.pocompile
57
-
source bin/activate
58
-
```
55
+
Translators will take care of translating `po` files into their languages.
56
+
When the release manager requests to create a new `plone.app.locales` release, the procedure is the following:
59
57
60
-
2. Go to plone.app.locales directory and pull the changes:
58
+
1. Create a virtualenv with `zest.releaser` and `zest.pocompile` installed:
61
59
62
-
```bash
63
-
cd src/plone.app.locales
64
-
git pull
65
-
```
60
+
```shell
61
+
`which python3.10` -m venv .
62
+
./bin/pip install zest.releaser zest.pocompile
63
+
source bin/activate
64
+
```
66
65
67
-
3. Verify there is a changelog entry for each change, add any missing entries if necessary.
66
+
2. Go to the `plone.app.locales` directory and pull the changes:
68
67
68
+
```shell
69
+
cd src/plone.app.locales
70
+
git pull
71
+
```
69
72
70
-
4.Verify there is no errors in the po files:
73
+
3. Verify there is a changelog entry for each change, adding any missing entries if necessary.
You can ignore the errors `'msgid' and 'msgstr' entries do not both end with '\n'`.
82
+
If there are other errors, please fix them.
79
83
80
-
```bash
81
-
fullrelease
82
-
```
84
+
5. Release.
85
+
86
+
```shell
87
+
fullrelease
88
+
```
89
+
90
+
6. Check that the release is published on PyPI at https://pypi.org/project/plone.app.locales/.
83
91
84
-
6. Check that the release is published on pypi: https://pypi.org/project/plone.app.locales/
92
+
7. Inform the release manager about the new version.
85
93
86
-
7. Inform the release manager about the new version
87
94
88
-
## Resync of translations in Volto
95
+
(resync-translations-volto-label)=
89
96
90
-
In Volto, the GitHub test setup warns a developer when her new bits require regenerating the translation file. This is done running a yarn script as follows:
97
+
## Resync translations in Volto
91
98
92
-
```bash
99
+
In Volto, the GitHub test setup warns a developer when their new contributions require regenerating the translation file.
100
+
This is done by running a yarn script as follows:
101
+
102
+
```shell
93
103
yarn i18n
94
104
```
95
105
96
-
This will update the po files and will leave them ready to be translated by translators.
106
+
This will update the PO files and will leave them ready to be translated by translators.
107
+
108
+
109
+
(create-release-volto-translations)=
97
110
98
-
## Create a new release of Volto with the new translations
111
+
## Create a release of Volto with the new translations
99
112
100
-
The Volto release process requires running the same yarn script as in the previous step to convert the translations in po files to the JSON files that Volto uses to render the user interface.
113
+
The Volto release process requires running the same yarn script as in the previous step.
114
+
It will convert the translations in PO files to the JSON files that Volto uses to render the user interface.
0 commit comments