Skip to content

The open alternative to Salesforce, designed for AI.

Iterations on i18n CI (#10093)

Félix Malfaitf8c653f15365
diff --git a/.github/workflows/i18n-force-pull.yml b/.github/workflows/i18n-force-pull.yml
index 457264194e2..5801938b094 100644
--- a/.github/workflows/i18n-force-pull.yml
+++ b/.github/workflows/i18n-force-pull.yml
@@ -25,10 +25,16 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
+ with:
+ token: ${{ github.token }}
+ ref: ${{ github.head_ref || github.ref_name }}
- name: Install dependencies
uses: ./.github/workflows/actions/yarn-install
+ - name: Build twenty-shared
+ run: npx nx build twenty-shared
+
- name: Pull translations from Crowdin
uses: crowdin/github-action@v2
with:
@@ -39,13 +45,14 @@ jobs:
localization_branch_name: chore/translations
commit_message: 'chore: add translations'
pull_request_title: 'chore: add translations'
+ base_url: 'https://twenty.api.crowdin.com'
env:
# A classic GitHub Personal Access Token with the 'repo' scope selected (the user should have write access to the repository).
GITHUB_TOKEN: ${{ github.token }}
# A numeric ID, found at https://crowdin.com/project/<projectName>/tools/api
- CROWDIN_PROJECT_ID: 1
+ CROWDIN_PROJECT_ID: '1'
# Visit https://crowdin.com/settings#api-key to create this token
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
\ No newline at end of file
diff --git a/.github/workflows/i18n-pull.yaml b/.github/workflows/i18n-pull.yaml
index 8a9eef4eaea..e9a5b9401cf 100644
--- a/.github/workflows/i18n-pull.yaml
+++ b/.github/workflows/i18n-pull.yaml
@@ -23,16 +23,23 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
+ with:
+ token: ${{ github.token }}
+ ref: ${{ github.head_ref || github.ref_name }}
- name: Install dependencies
uses: ./.github/workflows/actions/yarn-install
+ - name: Build twenty-shared
+ run: npx nx build twenty-shared
+
+ # Strict mode fails if there are missing translations.
- name: Compile translations
id: compile_translations
run: |
- npx nx run twenty-server:lingui:compile
- npx nx run twenty-emails:lingui:compile
- npx nx run twenty-front:lingui:compile
+ npx nx run twenty-server:lingui:compile --strict
+ npx nx run twenty-emails:lingui:compile --strict
+ npx nx run twenty-front:lingui:compile --strict
continue-on-error: true
- name: Pull translations from Crowdin
@@ -46,13 +53,22 @@ jobs:
localization_branch_name: chore/translations
commit_message: 'chore: add translations'
pull_request_title: 'chore: add translations'
+ base_url: 'https://twenty.api.crowdin.com'
+ auto_approve_imported: false
+ import_eq_suggestions: false
+ download_sources: false
+ push_sources: true
+ skip_untranslated_strings: false
+ skip_untranslated_files: false
+ push_translations: true
+ create_pull_request: true
+ skip_ref_checkout: false
+ dryrun_action: false
+ github_base_url: 'github.com'
+ github_user_name: 'Crowdin Bot'
+ github_user_email: '[email protected]'
env:
- # A classic GitHub Personal Access Token with the 'repo' scope selected (the user should have write access to the repository).
GITHUB_TOKEN: ${{ github.token }}
-
- # A numeric ID, found at https://crowdin.com/project/<projectName>/tools/api
- CROWDIN_PROJECT_ID: 1
-
- # Visit https://crowdin.com/settings#api-key to create this token
+ CROWDIN_PROJECT_ID: '1'
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
\ No newline at end of file
diff --git a/.github/workflows/i18n-upload.yml b/.github/workflows/i18n-upload.yml
index 8e6ebfc3d48..c6d31b361c5 100644
--- a/.github/workflows/i18n-upload.yml
+++ b/.github/workflows/i18n-upload.yml
@@ -21,10 +21,14 @@ jobs:
uses: actions/checkout@v4
with:
token: ${{ github.token }}
+ ref: ${{ github.head_ref || github.ref_name }}
- name: Install dependencies
uses: ./.github/workflows/actions/yarn-install
+ - name: Build dependencies
+ run: npx nx build twenty-shared
+
- name: Extract translations
run: |
npx nx run twenty-server:lingui:extract
@@ -36,7 +40,10 @@ jobs:
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git add .
- git diff --staged --quiet --exit-code || (git commit -m "chore: extract translations" && git push)
+ if ! git diff --staged --quiet --exit-code; then
+ git commit -m "chore: extract translations"
+ git push origin HEAD:${{ github.head_ref || github.ref_name }}
+ fi
- name: Compile translations
id: compile_translations
@@ -54,6 +61,7 @@ jobs:
upload_translations: true
download_translations: false
localization_branch_name: chore/translations
+ base_url: 'https://twenty.api.crowdin.com'
env:
# A numeric ID, found at https://crowdin.com/project/<projectName>/tools/api
CROWDIN_PROJECT_ID: 1
diff --git a/packages/twenty-server/src/engine/core-modules/i18n/locales/de-DE.po b/packages/twenty-server/src/engine/core-modules/i18n/locales/de-DE.po
index 7615065665a..bc8f167d573 100644
--- a/packages/twenty-server/src/engine/core-modules/i18n/locales/de-DE.po
+++ b/packages/twenty-server/src/engine/core-modules/i18n/locales/de-DE.po
@@ -2245,4 +2245,3 @@ msgstr "X"
#: src/modules/company/standard-objects/company.workspace-entity.ts:177
msgid "Your team member responsible for managing the company account"
msgstr "Ihr Teammitglied, das für die Verwaltung des Unternehmenskontos verantwortlich ist"
-
diff --git a/packages/twenty-server/src/engine/core-modules/i18n/locales/es-ES.po b/packages/twenty-server/src/engine/core-modules/i18n/locales/es-ES.po
index 04298339ef3..7358ef6ee2d 100644
--- a/packages/twenty-server/src/engine/core-modules/i18n/locales/es-ES.po
+++ b/packages/twenty-server/src/engine/core-modules/i18n/locales/es-ES.po
@@ -2245,4 +2245,3 @@ msgstr "X"
#: src/modules/company/standard-objects/company.workspace-entity.ts:177
msgid "Your team member responsible for managing the company account"
msgstr "Miembro de su equipo responsable de gestionar la cuenta de la empresa"
-
diff --git a/packages/twenty-server/src/engine/core-modules/i18n/locales/fr-FR.po b/packages/twenty-server/src/engine/core-modules/i18n/locales/fr-FR.po
index 8d929ce5c1e..77cb7555280 100644
--- a/packages/twenty-server/src/engine/core-modules/i18n/locales/fr-FR.po
+++ b/packages/twenty-server/src/engine/core-modules/i18n/locales/fr-FR.po
@@ -2245,4 +2245,3 @@ msgstr "X"
#: src/modules/company/standard-objects/company.workspace-entity.ts:177
msgid "Your team member responsible for managing the company account"
msgstr "Le membre de votre équipe responsable de la gestion du compte entreprise"
-
diff --git a/packages/twenty-server/src/engine/core-modules/i18n/locales/it-IT.po b/packages/twenty-server/src/engine/core-modules/i18n/locales/it-IT.po
index 2a2cdba8a7f..6f1033a67f9 100644
--- a/packages/twenty-server/src/engine/core-modules/i18n/locales/it-IT.po
+++ b/packages/twenty-server/src/engine/core-modules/i18n/locales/it-IT.po
@@ -2245,4 +2245,3 @@ msgstr "X"
#: src/modules/company/standard-objects/company.workspace-entity.ts:177
msgid "Your team member responsible for managing the company account"
msgstr "Il membro del team responsabile della gestione dell'account aziendale"
-
diff --git a/packages/twenty-server/src/engine/core-modules/i18n/locales/ja-JP.po b/packages/twenty-server/src/engine/core-modules/i18n/locales/ja-JP.po
index ec6a7b208ed..fd6fb738fe9 100644
--- a/packages/twenty-server/src/engine/core-modules/i18n/locales/ja-JP.po
+++ b/packages/twenty-server/src/engine/core-modules/i18n/locales/ja-JP.po
@@ -2245,4 +2245,3 @@ msgstr ""
#: src/modules/company/standard-objects/company.workspace-entity.ts:177
msgid "Your team member responsible for managing the company account"
msgstr ""
-
diff --git a/packages/twenty-server/src/engine/core-modules/i18n/locales/ko-KR.po b/packages/twenty-server/src/engine/core-modules/i18n/locales/ko-KR.po
index 105522e3f0f..46436754ae7 100644
--- a/packages/twenty-server/src/engine/core-modules/i18n/locales/ko-KR.po
+++ b/packages/twenty-server/src/engine/core-modules/i18n/locales/ko-KR.po
@@ -2245,4 +2245,3 @@ msgstr "X"
#: src/modules/company/standard-objects/company.workspace-entity.ts:177
msgid "Your team member responsible for managing the company account"
msgstr "회사 계정을 관리하는 팀원"
-
diff --git a/packages/twenty-server/src/engine/core-modules/i18n/locales/pt-br.po b/packages/twenty-server/src/engine/core-modules/i18n/locales/pt-br.po
index 633a3b0f16c..da994aa0d84 100644
--- a/packages/twenty-server/src/engine/core-modules/i18n/locales/pt-br.po
+++ b/packages/twenty-server/src/engine/core-modules/i18n/locales/pt-br.po
@@ -2245,4 +2245,3 @@ msgstr "X"
#: src/modules/company/standard-objects/company.workspace-entity.ts:177
msgid "Your team member responsible for managing the company account"
msgstr "Seu membro da equipe responsável por gerenciar a conta da empresa"
-
diff --git a/packages/twenty-server/src/engine/core-modules/i18n/locales/pt-pt.po b/packages/twenty-server/src/engine/core-modules/i18n/locales/pt-pt.po
index 3f15e3d3c12..9c6011fac33 100644
--- a/packages/twenty-server/src/engine/core-modules/i18n/locales/pt-pt.po
+++ b/packages/twenty-server/src/engine/core-modules/i18n/locales/pt-pt.po
@@ -2245,4 +2245,3 @@ msgstr "X"
#: src/modules/company/standard-objects/company.workspace-entity.ts:177
msgid "Your team member responsible for managing the company account"
msgstr "O membro da sua equipa responsável pela gestão da conta da empresa"
-
diff --git a/packages/twenty-server/src/engine/core-modules/i18n/locales/zh-CN.po b/packages/twenty-server/src/engine/core-modules/i18n/locales/zh-CN.po
index 0da8a1ad6a7..16817dbdac9 100644
--- a/packages/twenty-server/src/engine/core-modules/i18n/locales/zh-CN.po
+++ b/packages/twenty-server/src/engine/core-modules/i18n/locales/zh-CN.po
@@ -2245,4 +2245,3 @@ msgstr "X"
#: src/modules/company/standard-objects/company.workspace-entity.ts:177
msgid "Your team member responsible for managing the company account"
msgstr "负责管理公司账户的团队成员"
-
diff --git a/packages/twenty-server/src/engine/core-modules/i18n/locales/zh-TW.po b/packages/twenty-server/src/engine/core-modules/i18n/locales/zh-TW.po
index fa633ccea5e..180b1611718 100644
--- a/packages/twenty-server/src/engine/core-modules/i18n/locales/zh-TW.po
+++ b/packages/twenty-server/src/engine/core-modules/i18n/locales/zh-TW.po
@@ -2245,4 +2245,3 @@ msgstr "X"
#: src/modules/company/standard-objects/company.workspace-entity.ts:177
msgid "Your team member responsible for managing the company account"
msgstr "負責管理公司帳戶的團隊成員"
-