The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
fix: always pull app and website translations on schedule (#24400)
Abdul Rahmanf415173adaa8
diff --git a/.github/workflows/i18n-pull.yaml b/.github/workflows/i18n-pull.yamlindex 9f0835881dd..09bc5ea0013 100644--- a/.github/workflows/i18n-pull.yaml+++ b/.github/workflows/i18n-pull.yaml@@ -1,5 +1,7 @@# Pull down translations from Crowdin every two hours or when triggered manually.-# When force_pull input is true, translations will be pulled regardless of compilation status.+# Schedule and workflow_dispatch always download. workflow_call downloads when+# force_pull is true. We cannot gate on `lingui compile --strict`: English is the+# fallback locale, so empty msgstr values compile successfully.name: 'Pull translations from Crowdin'@@ -11,16 +13,10 @@ on:schedule:- cron: '0 */2 * * *' # Every two hours.workflow_dispatch:- inputs:- force_pull:- description: 'Force pull translations regardless of compilation status'- required: false- type: boolean- default: falseworkflow_call:inputs:force_pull:- description: 'Force pull translations regardless of compilation status'+ description: 'Download translations even though the caller was not triggered by a schedule'required: falsetype: booleandefault: false@@ -33,6 +29,7 @@ jobs:pull_translations:name: Pull translationsruns-on: ubuntu-latest+ timeout-minutes: 60steps:- name: Checkoutuses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1@@ -51,15 +48,6 @@ jobs:- name: Build twenty-sharedrun: npx nx build twenty-shared- # Strict mode fails if there are missing translations.- - name: Compile translations- id: compile_translations_strict- run: |- 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: Stash any changes before pulling translationsrun: |git config --global user.name 'github-actions'@@ -68,7 +56,7 @@ jobs:git stash- name: Pull translations from Crowdin- if: inputs.force_pull || steps.compile_translations_strict.outcome == 'failure'+ if: inputs.force_pull == true || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'uses: crowdin/github-action@8868a33591d21088edfc398968173a3b98d51706 # v2with:upload_sources: false@@ -107,8 +95,6 @@ jobs:- name: Compile translationsid: compile_translations- # Because we have set English as a fallback locale, this condition does not work anymore- # if: inputs.force_pull || steps.compile_translations_strict.outcome == 'failure'run: |npx nx run twenty-server:lingui:compilenpx nx run twenty-emails:lingui:compilediff --git a/.github/workflows/website-i18n-pull.yaml b/.github/workflows/website-i18n-pull.yamlindex acf83252df7..bf5a4ab3d1e 100644--- a/.github/workflows/website-i18n-pull.yaml+++ b/.github/workflows/website-i18n-pull.yaml@@ -1,5 +1,7 @@# Pull down website translations from Crowdin every two hours or when triggered manually.-# When force_pull input is true, translations will be pulled regardless of compilation status.+# Schedule and workflow_dispatch always download. workflow_call downloads when+# force_pull is true. We cannot gate on `lingui compile --strict`: English is the+# fallback locale, so empty msgstr values compile successfully.name: 'Pull website translations from Crowdin'@@ -11,16 +13,10 @@ on:schedule:- cron: '0 */2 * * *' # Every two hours.workflow_dispatch:- inputs:- force_pull:- description: 'Force pull translations regardless of compilation status'- required: false- type: boolean- default: falseworkflow_call:inputs:force_pull:- description: 'Force pull translations regardless of compilation status'+ description: 'Download translations even though the caller was not triggered by a schedule'required: falsetype: booleandefault: false@@ -33,6 +29,7 @@ jobs:pull_website_translations:name: Pull website translationsruns-on: ubuntu-latest+ timeout-minutes: 60steps:- name: Checkoutuses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1@@ -51,12 +48,6 @@ jobs:- name: Build twenty-sharedrun: npx nx build twenty-shared- # Strict mode fails if there are missing website translations.- - name: Compile website translations- id: compile_translations_strict- run: npx nx run twenty-website:lingui:compile --strict- continue-on-error: true-- name: Stash any changes before pulling translationsrun: |git config --global user.name 'github-actions'@@ -65,7 +56,7 @@ jobs:git stash- name: Pull website translations from Crowdin- if: inputs.force_pull || steps.compile_translations_strict.outcome == 'failure'+ if: inputs.force_pull == true || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'uses: crowdin/github-action@8868a33591d21088edfc398968173a3b98d51706 # v2with:upload_sources: false