Skip to content

Commit a78b6a4

Browse files
committed
Free contributors from i18n data sync responsibility
1 parent 6c3c864 commit a78b6a4

File tree

7 files changed

+16
-107
lines changed

7 files changed

+16
-107
lines changed

.github/workflows/check-i18n-task.yml

-74
This file was deleted.

.github/workflows/i18n-nightly-push.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
repo-token: ${{ secrets.GITHUB_TOKEN }}
2727
version: 3.x
2828

29+
- name: Run task i18n:update
30+
run: task i18n:update
31+
2932
- name: Run task i18n:push
3033
run: task i18n:push
3134
env:

.github/workflows/i18n-weekly-pull.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
schedule:
55
# run every monday at 2AM
66
- cron: "0 2 * * 1"
7+
workflow_dispatch:
8+
repository_dispatch:
79

810
jobs:
911
pull-from-transifex:

.github/workflows/release-go-task.yml

+11-6
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ jobs:
2525
with:
2626
fetch-depth: 0
2727

28+
- name: Install Task
29+
uses: arduino/setup-task@v1
30+
with:
31+
repo-token: ${{ secrets.GITHUB_TOKEN }}
32+
version: 3.x
33+
34+
- name: Check i18n source file is up to date
35+
run:
36+
- task i18n:update
37+
- task i18n:check
38+
2839
- name: Create changelog
2940
uses: arduino/create-changelog@v1
3041
with:
@@ -33,12 +44,6 @@ jobs:
3344
case-insensitive-regex: true
3445
changelog-file-path: "${{ env.DIST_DIR }}/CHANGELOG.md"
3546

36-
- name: Install Task
37-
uses: arduino/setup-task@v1
38-
with:
39-
repo-token: ${{ secrets.GITHUB_TOKEN }}
40-
version: 3.x
41-
4247
- name: Build
4348
run: task dist:all
4449

Taskfile.yml

-8
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,11 @@ tasks:
261261
desc: Updates i18n files
262262
cmds:
263263
- go run ./i18n/cmd/main.go catalog generate . > ./i18n/data/en.po
264-
- task: i18n:generate
265264

266265
i18n:pull:
267266
desc: Pull i18n files from transifex
268267
cmds:
269268
- go run ./i18n/cmd/main.go transifex pull ./i18n/data
270-
- task: i18n:generate
271269

272270
i18n:push:
273271
desc: Push i18n files to transifex
@@ -281,12 +279,6 @@ tasks:
281279
- git add -N ./i18n/data
282280
- git diff --exit-code ./i18n/data
283281

284-
i18n:generate:
285-
desc: Generate embedded i18n catalog files
286-
cmds:
287-
- git add -N ./i18n/data
288-
- git diff --exit-code ./i18n/data &> /dev/null
289-
290282
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/check-mkdocs-task/Taskfile.yml
291283
website:check:
292284
desc: Check whether the MkDocs-based website will build

docs/CONTRIBUTING.md

-16
Original file line numberDiff line numberDiff line change
@@ -322,22 +322,6 @@ In order to support i18n in the CLI, any messages that are intended to be transl
322322
`i18n.Tr`. This call allows us to build a catalog of translatable strings, replacing the reference string at runtime
323323
with the localized value.
324324

325-
Adding or modifying these messages requires an i18n update, as this process creates the reference catalog that is shared
326-
with translators. For that reason, the `task check` command will fail if the catalog was not updated to sync with
327-
changes to the source code.
328-
329-
To update the catalog, execute the following command and commit the changes.
330-
331-
```shell
332-
task i18n:update
333-
```
334-
335-
To verify that the catalog is up-to-date, you may execute the command:
336-
337-
```shell
338-
task i18n:check
339-
```
340-
341325
Example usage:
342326

343327
```golang

i18n/cmd/commands/transifex/pull_transifex.go

-3
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ func getLanguages() []string {
7070

7171
var langs []string
7272
for key := range jsonResp {
73-
if key == "en" {
74-
continue
75-
}
7673
langs = append(langs, key)
7774
}
7875

0 commit comments

Comments
 (0)