Skip to content

Commit 9d4f55a

Browse files
authored
Revise Crowdin GitHub integration instructions (#6185)
Updated the Crowdin integration documentation to recommend creating a GitHub workflow and removed legacy integration details.
1 parent b432905 commit 9d4f55a

File tree

1 file changed

+56
-56
lines changed

1 file changed

+56
-56
lines changed

Documentation/ApiOverview/Localization/TranslationServer/Crowdin/ExtensionIntegration.rst

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,62 @@ Step-by-step instructions for GitHub
7676
.. accordion::
7777
:name: crowdinConnectionAccordion
7878

79-
.. accordion-item:: Option A: Use the Crowdin <> GitHub integration
79+
.. accordion-item:: Option A: Create a GitHub workflow (recommended)
80+
:name: crowdinGitHubWorkflow
81+
:header-level: 4
82+
83+
When working with GitHub Actions, you can easily integrate the
84+
`Crowdin GitHub Action <https://github.com/marketplace/actions/crowdin-action>`__
85+
into your CI workflow.
86+
87+
.. rst-class:: bignums
88+
89+
1. Configure GitHub secrets
90+
91+
First, add the following GitHub secrets to your GitHub repository:
92+
93+
`CROWDIN_PROJECT_ID`
94+
Project ID, can be found in **project settings** when
95+
navigating to :guilabel:`Tools > API`.
96+
`CROWDIN_PERSONAL_TOKEN`
97+
API key used for authentication at Crowdin, can be
98+
generated in **personal settings** at
99+
:guilabel:`API > Personal Access Tokens`.
100+
101+
.. tip::
102+
When creating a personal access token in Crowdin, you will need to select some scopes.
103+
For this workflow, set at least the following basic `Project` scopes:
104+
105+
* **Projects (List, Get, Create, Edit)**: `Read Only`
106+
* **Translation Status**: `Read Only`
107+
* **Source files & strings**: `Read and Write`
108+
* **Translations**: `Read and Write`
109+
110+
2. Create GitHub workflow
111+
112+
Now create a new GitHub workflow :file:`crowdin.yaml`:
113+
114+
.. literalinclude:: _codesnippets/_crowdin.yaml
115+
:caption: EXT:my_extension/.github/workflows/crowdin.yaml
116+
117+
.. important::
118+
119+
Make sure to configure a Crowdin branch name using the
120+
`crowdin_branch_name` configuration option of the GitHub
121+
action. Otherwise, translations are delivered incomplete
122+
by TYPO3's Crowdin Bridge.
123+
124+
.. seealso::
125+
126+
For more information about available configuration options,
127+
consult the `official GitHub action documentation <https://github.com/marketplace/actions/crowdin-action>`__.
128+
129+
3. Push sources
130+
131+
For each push in your `main` branch, the workflow will now
132+
transfer all your translation sources to Crowdin.
133+
134+
.. accordion-item:: Option B: Use the Crowdin <> GitHub integration (legacy)
80135
:name: crowdinGitHubIntegration
81136
:header-level: 4
82137

@@ -142,61 +197,6 @@ Step-by-step instructions for GitHub
142197
``<source>`` and ``<target>`` elements. If the ``<source>`` elements are missing,
143198
Crowdin will not be able to match the translations with the original English labels.
144199

145-
.. accordion-item:: Option B: Create a GitHub workflow
146-
:name: crowdinGitHubWorkflow
147-
:header-level: 4
148-
149-
When working with GitHub Actions, you can easily integrate the
150-
`Crowdin GitHub Action <https://github.com/marketplace/actions/crowdin-action>`__
151-
into your CI workflow.
152-
153-
.. rst-class:: bignums
154-
155-
1. Configure GitHub secrets
156-
157-
First, add the following GitHub secrets to your GitHub repository:
158-
159-
`CROWDIN_PROJECT_ID`
160-
Project ID, can be found in **project settings** when
161-
navigating to :guilabel:`Tools > API`.
162-
`CROWDIN_PERSONAL_TOKEN`
163-
API key used for authentication at Crowdin, can be
164-
generated in **personal settings** at
165-
:guilabel:`API > Personal Access Tokens`.
166-
167-
.. tip::
168-
When creating a personal access token in Crowdin, you will need to select some scopes.
169-
For this workflow, set at least the following basic `Project` scopes:
170-
171-
* **Projects (List, Get, Create, Edit)**: `Read Only`
172-
* **Translation Status**: `Read Only`
173-
* **Source files & strings**: `Read and Write`
174-
* **Translations**: `Read and Write`
175-
176-
2. Create GitHub workflow
177-
178-
Now create a new GitHub workflow :file:`crowdin.yaml`:
179-
180-
.. literalinclude:: _codesnippets/_crowdin.yaml
181-
:caption: EXT:my_extension/.github/workflows/crowdin.yaml
182-
183-
.. important::
184-
185-
Make sure to configure a Crowdin branch name using the
186-
`crowdin_branch_name` configuration option of the GitHub
187-
action. Otherwise, translations are delivered incomplete
188-
by TYPO3's Crowdin Bridge.
189-
190-
.. seealso::
191-
192-
For more information about available configuration options,
193-
consult the `official GitHub action documentation <https://github.com/marketplace/actions/crowdin-action>`__.
194-
195-
3. Push sources
196-
197-
For each push in your `main` branch, the workflow will now
198-
transfer all your translation sources to Crowdin.
199-
200200
Happy translating!
201201

202202
.. tip::

0 commit comments

Comments
 (0)