The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Stop showing lines on translation files (#10313)
Félix Malfait7f4b5795bf6f
diff --git a/.github/workflows/i18n-pull.yaml b/.github/workflows/i18n-pull.yamlindex 763d21885e6..25fb0aa4cf0 100644--- a/.github/workflows/i18n-pull.yaml+++ b/.github/workflows/i18n-pull.yaml@@ -76,7 +76,7 @@ jobs:download_translations: trueexport_only_approved: falselocalization_branch_name: i18n- commit_message: 'i18n - translations'+ commit_message: 'i18n - pull translations'pull_request_title: 'i18n - translations'base_url: 'https://twenty.api.crowdin.com'auto_approve_imported: falsediff --git a/.github/workflows/i18n-push.yaml b/.github/workflows/i18n-push.yamlindex a99ab018249..b65438f4bac 100644--- a/.github/workflows/i18n-push.yaml+++ b/.github/workflows/i18n-push.yaml@@ -40,31 +40,44 @@ jobs:npx nx run twenty-emails:lingui:extractnpx nx run twenty-front:lingui:extract+ - name: Check and commit extracted files+ id: check_extract_changes+ run: |+ git config --global user.name 'github-actions'+ git config --global user.email '[email protected]'+ git add .+ if ! git diff --staged --quiet --exit-code; then+ git commit -m "chore: extract translations"+ echo "changes_detected=true" >> $GITHUB_OUTPUT+ else+ echo "changes_detected=false" >> $GITHUB_OUTPUT+ fi+- name: Compile translationsrun: |npx nx run twenty-server:lingui:compilenpx nx run twenty-emails:lingui:compilenpx nx run twenty-front:lingui:compile- - name: Check and commit any files created- id: check_changes+ - name: Check and commit compiled files+ id: check_compile_changesrun: |git config --global user.name 'github-actions'git config --global user.email '[email protected]'git add .if ! git diff --staged --quiet --exit-code; then- git commit -m "chore: extract translations"+ git commit -m "chore: compile translations"echo "changes_detected=true" >> $GITHUB_OUTPUTelseecho "changes_detected=false" >> $GITHUB_OUTPUTfi- name: Push changes and create remote branch if needed- if: steps.check_changes.outputs.changes_detected == 'true'+ if: steps.check_extract_changes.outputs.changes_detected == 'true' || steps.check_compile_changes.outputs.changes_detected == 'true'run: git push origin HEAD:i18n- name: Upload missing translations- if: steps.check_changes.outputs.changes_detected == 'true'+ if: steps.check_extract_changes.outputs.changes_detected == 'true'uses: crowdin/github-action@v2with:upload_sources: true@@ -80,7 +93,7 @@ jobs:CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}- name: Create a pull request- if: steps.check_changes.outputs.changes_detected == 'true'+ if: steps.check_extract_changes.outputs.changes_detected == 'true' || steps.check_compile_changes.outputs.changes_detected == 'true'run: gh pr create -B main -H i18n --title 'i18n - translations' --body 'Created by Github action' || trueenv:GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}diff --git a/packages/twenty-emails/lingui.config.js b/packages/twenty-emails/lingui.config.jsindex ec41a75d727..bf8aa5793a0 100644--- a/packages/twenty-emails/lingui.config.js+++ b/packages/twenty-emails/lingui.config.js@@ -1,4 +1,5 @@import { defineConfig } from '@lingui/cli';+import { formatter } from '@lingui/format-po';import { APP_LOCALES } from 'twenty-shared';export default defineConfig({@@ -19,4 +20,5 @@ export default defineConfig({],catalogsMergePath: '<rootDir>/src/locales/generated/{locale}',compileNamespace: 'ts',+ format: formatter({ lineNumbers: false }),});diff --git a/packages/twenty-front/lingui.config.ts b/packages/twenty-front/lingui.config.tsindex 6b31ed6eee8..e3974088917 100644--- a/packages/twenty-front/lingui.config.ts+++ b/packages/twenty-front/lingui.config.ts@@ -1,4 +1,5 @@import { defineConfig } from '@lingui/cli';+import { formatter } from '@lingui/format-po';import { APP_LOCALES } from 'twenty-shared';export default defineConfig({@@ -16,4 +17,5 @@ export default defineConfig({],catalogsMergePath: '<rootDir>/src/locales/generated/{locale}',compileNamespace: 'ts',+ format: formatter({ lineNumbers: false }),});diff --git a/packages/twenty-server/lingui.config.js b/packages/twenty-server/lingui.config.jsindex 5bbfd1bc194..7dda417469d 100644--- a/packages/twenty-server/lingui.config.js+++ b/packages/twenty-server/lingui.config.js@@ -1,4 +1,5 @@import { defineConfig } from '@lingui/cli';+import { formatter } from '@lingui/format-po';import { APP_LOCALES } from 'twenty-shared';export default defineConfig({@@ -20,4 +21,5 @@ export default defineConfig({catalogsMergePath:'<rootDir>/src/engine/core-modules/i18n/locales/generated/{locale}',compileNamespace: 'ts',+ format: formatter({ lineNumbers: false }),});