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/community/project-management.md
-58Lines changed: 0 additions & 58 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,11 +51,6 @@ The following template should be used for the description of the issue, and serv
51
51
Release manager is @***.
52
52
Pull request is #***.
53
53
54
-
During development cycle:
55
-
56
-
- [ ] Upload the new content to be translated to [transifex](https://www.django-rest-framework.org/topics/project-management/#translations).
57
-
58
-
59
54
Checklist:
60
55
61
56
- [ ] Create pull request for [release notes](https://github.com/encode/django-rest-framework/blob/mains/docs/topics/release-notes.md) based on the [*.*.* milestone](https://github.com/encode/django-rest-framework/milestones/***).
@@ -64,7 +59,6 @@ The following template should be used for the description of the issue, and serv
64
59
- [ ] `pyproject.toml` Python & Django version trove classifiers
65
60
- [ ] `README` Python & Django versions
66
61
- [ ] `docs` Python & Django versions
67
-
- [ ] Update the translations from [transifex](https://www.django-rest-framework.org/topics/project-management/#translations).
68
62
- [ ] Ensure the pull request increments the version to `*.*.*` in [`restframework/__init__.py`](https://github.com/encode/django-rest-framework/blob/main/rest_framework/__init__.py).
69
63
- [ ] Ensure documentation validates
70
64
- Build and serve docs `mkdocs serve`
@@ -87,55 +81,6 @@ When pushing the release to PyPI ensure that your environment has been installed
87
81
88
82
---
89
83
90
-
## Translations
91
-
92
-
The maintenance team are responsible for managing the translation packs include in REST framework. Translating the source strings into multiple languages is managed through the [transifex service][transifex-project].
93
-
94
-
### Managing Transifex
95
-
96
-
The [official Transifex client][transifex-client] is used to upload and download translations to Transifex. The client is installed using pip:
97
-
98
-
pip install transifex-client
99
-
100
-
To use it you'll need a login to Transifex which has a password, and you'll need to have administrative access to the Transifex project. You'll need to create a `~/.transifexrc` file which contains your credentials.
101
-
102
-
[https://www.transifex.com]
103
-
username = ***
104
-
token = ***
105
-
password = ***
106
-
hostname = https://www.transifex.com
107
-
108
-
### Upload new source files
109
-
110
-
When any user visible strings are changed, they should be uploaded to Transifex so that the translators can start to translate them. To do this, just run:
111
-
112
-
# 1. Update the source django.po file, which is the US English version.
113
-
cd rest_framework
114
-
django-admin makemessages -l en_US
115
-
# 2. Push the source django.po file to Transifex.
116
-
cd ..
117
-
tx push -s
118
-
119
-
When pushing source files, Transifex will update the source strings of a resource to match those from the new source file.
120
-
121
-
Here's how differences between the old and new source files will be handled:
122
-
123
-
* New strings will be added.
124
-
* Modified strings will be added as well.
125
-
* Strings which do not exist in the new source file will be removed from the database, along with their translations. If that source strings gets re-added later then [Transifex Translation Memory][translation-memory] will automatically include the translation string.
126
-
127
-
### Download translations
128
-
129
-
When a translator has finished translating their work needs to be downloaded from Transifex into the REST framework repository. To do this, run:
130
-
131
-
# 3. Pull the translated django.po files from Transifex.
132
-
tx pull -a --minimum-perc 10
133
-
cd rest_framework
134
-
# 4. Compile the binary .mo files for all supported languages.
135
-
django-admin compilemessages
136
-
137
-
---
138
-
139
84
## Project requirements
140
85
141
86
All our test requirements are pinned to exact versions, in order to ensure that our test runs are reproducible. We maintain the requirements in the `requirements` directory. The requirements files are referenced from the `tox.ini` configuration file, ensuring we have a single source of truth for package versions used in testing.
@@ -160,7 +105,4 @@ The following issues still need to be addressed:
Copy file name to clipboardExpand all lines: docs/topics/internationalization.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,11 +60,12 @@ If you only wish to support a subset of the available languages, use Django's st
60
60
61
61
## Adding new translations
62
62
63
-
REST framework translations are managed online using [Transifex][transifex-project]. You can use the Transifex service to add new translation languages. The maintenance team will then ensure that these translation strings are included in the REST framework package.
63
+
REST framework translations are managed on GitHub. You can contribute new translation languages or update existing ones
64
+
by following the guidelines in the [Contributing to REST Framework] section and submitting a pull request.
64
65
65
66
Sometimes you may need to add translation strings to your project locally. You may need to do this if:
66
67
67
-
* You want to use REST Framework in a language which has not been translated yet on Transifex.
68
+
* You want to use REST Framework in a language which is not supported by the project.
68
69
* Your project includes custom error messages, which are not part of REST framework's default translation strings.
69
70
70
71
#### Translating a new language locally
@@ -103,9 +104,9 @@ You can find more information on how the language preference is determined in th
103
104
For API clients the most appropriate of these will typically be to use the `Accept-Language` header; Sessions and cookies will not be available unless using session authentication, and generally better practice to prefer an `Accept-Language` header for API clients rather than using language URL prefixes.
104
105
105
106
[cite]: https://youtu.be/Wa0VfS2q94Y
107
+
[Contributing to REST Framework]: ../community/contributing.md#development
0 commit comments