about summary refs log tree commit diff
path: root/.github
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2025-02-11 13:47:46 -0800
committerGitHub <noreply@github.com>2025-02-11 13:47:46 -0800
commit3ab5c6a71f20f086d7238fb5dc59321d7b85d86b (patch)
treec5b855269388e3fc14bea795bcc157134a5d4a94 /.github
parentaccd1834b3ea24fd61b04defd7b8cfac53a5a146 (diff)
downloadvoidsky-3ab5c6a71f20f086d7238fb5dc59321d7b85d86b.tar.zst
More i18n process updates (#7720)
* Modify intl:extract to only target english, the source language

* Add github action to regularly update english .po file

* Update localization doc
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/nightly-update-source-languages.yaml36
1 files changed, 36 insertions, 0 deletions
diff --git a/.github/workflows/nightly-update-source-languages.yaml b/.github/workflows/nightly-update-source-languages.yaml
new file mode 100644
index 000000000..a2a0c842e
--- /dev/null
+++ b/.github/workflows/nightly-update-source-languages.yaml
@@ -0,0 +1,36 @@
+name: Nightly Update Source Languages
+on:
+  schedule:
+    - cron: '0 2 * * *' # run at 2 AM UTC
+  workflow_dispatch:
+
+jobs:
+  extract-languages:
+    name: Nightly Update Source Languages
+    runs-on: ubuntu-latest
+
+    permissions:
+      # Give the default GITHUB_TOKEN write permission to commit and push the
+      # added or changed files to the repository.
+      contents: write
+
+    steps:
+      - name: Check out Git repository
+        uses: actions/checkout@v3
+      - name: Install node
+        uses: actions/setup-node@v4
+        with:
+          node-version-file: .nvmrc
+      - name: Yarn install
+        uses: Wandalen/wretry.action@master
+        with:
+          command: yarn --frozen-lockfile
+          attempt_limit: 3
+          attempt_delay: 2000
+      - name: Extract language strings
+        run: yarn intl:extract
+      - name: Create commit
+        uses: stefanzweifel/git-auto-commit-action@v5
+        with:
+          commit_message: Nightly source-language update
+          file_pattern: /src/locale/locales/en/messages.po