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
@@ -35,7 +35,7 @@ creating a separate repository for the translations under
35
35
https://github.com/scientific-python-translations. To get you started with the project
36
36
repository we provide a [translations-cookiecutter](https://github.com/Scientific-Python-Translations/translations-cookiecutter) template.
37
37
38
-
This template includes the necessary workflows that will run periodically to keep the infrastructure in sync. See [](#automations) for more details.
38
+
This template includes the necessary workflows that will run periodically to keep the infrastructure in sync. See [](#automation-details) for more information.
39
39
40
40
### Announce your project to potential translators
41
41
@@ -49,28 +49,15 @@ later.
49
49
You can find potential translators by reaching out in the `#translation` channel
50
50
on the [Scientific Python Discord server](https://discord.com/invite/vur45CbwMz).
51
51
52
-
## Automation details
53
-
54
-
Once a GitHub repository has been synced to Crowdin using the Scientific Python
When prompted, enter the details for your project (e.g. project name, organization, base branch). The structure will include necessary metadata, content folders, and pre-commit configuration. See the [Cookiecutter repository](https://github.com/Scientific-Python-Translations/translations-cookiecutter) for more information.
84
+
85
+
### Sync Content from the Source Repo
86
+
87
+
The `sync_content.yml` github workflow is in charge of keeping the **original source content** in sync with the translations repository within the Scientific Python Translations organization.
88
+
89
+
This workflow uses the `content-sync`[Github action](https://github.com/Scientific-Python-Translations/content-sync).
# These are provided by the Scientific Python Project and allow
113
+
# automation with bots
114
+
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
115
+
passphrase: ${{ secrets.PASSPHRASE }}
116
+
token: ${{ secrets.TOKEN }}
117
+
```
118
+
119
+
This ensures your translation repo always has the latest source material in English. If the source content has changed since the latest workflow run,
120
+
the translations bot will automatically create a Pull Request, with signed commits, and merge it automatically.
121
+
122
+
### Pull Translations from Crowdin
123
+
124
+
The `sync_tarnslations.yml` github workflow is in charge of keeping the **translated content** in sync with the translations repository within the Scientific Python Translations organization.
125
+
126
+
This workflow uses the `translations-sync` [Github action](https://github.com/Scientific-Python-Translations/translations-sync).
Everytime this workflow runs, the translations bot will check for the available languages and check if they meet the translation percentage (90% by default) and approval percentage (0% by default). For every language that passes the criteria, which can be defined by the project mainatiners, a new Pull Request with signed commits will be created in the translations repository and the source repository.
163
+
164
+
To gather information on translators, an additional Pull Request will be created on the translations repository with a `translators.yml` file that lists the details such as username, fullname and avatar from the crowdin site.
165
+
166
+
All Pull Requests created by the Automations Bot on the translation repositories, will be automatically merged.
167
+
168
+
### Cleaning up
169
+
170
+
After merging the translations PR, the Crowdin service branch (by default, named `l10n_main`) may have merge conflicts with `main`. To fix this, delete the Crowdin service branch. Crowdin will automatically recreate the service branch with merge conflicts resolved. This same process can also be used to resolve merge conflicts if translations are updated outside of Crowdin.
171
+
172
+
### The Translations Bot
173
+
174
+
All automations and pull requests are performed by:
This work is in progress - follow (issue #) for details.
@@ -100,41 +201,3 @@ Translations may not always be up to date for items such as news items and
100
201
release announcements. In this case, your project can decide what to do with
101
202
these items (for example, keep them in English or hide them from the deployed
102
203
site.)
103
-
104
-
105
-
106
-
107
-
----
108
-
109
-
110
-
### Merging translations
111
-
112
-
As translators work on the Crowdin platform, a Pull Request is automatically
113
-
created in the project repository. This PR **should not** be merged, as it
114
-
contains all translations for all languages (see
115
-
[Scientific-Python-Translations/scipy.org-translations#187](https://github.com/Scientific-Python-Translations/scipy.org-translations/pull/187) for an
116
-
example). If your website is set up through the Scientific Python Translations
117
-
org, this PR will should have the `do-not-merge` label applied to it to ensure the PR
118
-
will not be merged accidentally.
119
-
120
-
After translations for a language are completed and ready to be deployed, you
121
-
should:
122
-
123
-
1. Go to the repository corresponding to your project's sources under
124
-
https://github.com/Scientific-Python-Translations
125
-
2. Go to the Actions tab
126
-
3. Manually trigger the "Create translations PR" workflow, with the language
127
-
code for your language of interest as input.
128
-
129
-
<center><imgalt="Screenshot of the Actions tab from GitHub, with the Create translations PR workflow highlighted."src="../images/create_translations.png"width=800/></center>
130
-
131
-
<center><imgalt="Screenshot of the Run workflow dialog from GitHub, with an input field labeled Crowding language code for the language of interest"src="../images/run_workflow.png"width=800/></center>
132
-
133
-
After these steps, a PR will be created to your website repo with the
134
-
translations for the language you selected (see
135
-
[numpy/numpy.org#774](https://github.com/numpy/numpy.org/pull/774) for an example.) This PR should be
136
-
merged when you are ready to publish the translations.
137
-
138
-
### Cleaning up
139
-
140
-
After merging the translations PR, the Crowdin service branch (by default, named `l10n_main`) will have merge conflicts with `main`. To fix this, delete the Crowdin service branch. Crowdin will automatically recreate the service branch with merge conflicts resolved. This same process can also be used to resolve merge conflicts if translations are updated outside of Crowdin.
0 commit comments