Stop showing lines on translation files (#10313)
This commit is contained in:
2
.github/workflows/i18n-pull.yaml
vendored
2
.github/workflows/i18n-pull.yaml
vendored
@ -76,7 +76,7 @@ jobs:
|
|||||||
download_translations: true
|
download_translations: true
|
||||||
export_only_approved: false
|
export_only_approved: false
|
||||||
localization_branch_name: i18n
|
localization_branch_name: i18n
|
||||||
commit_message: 'i18n - translations'
|
commit_message: 'i18n - pull translations'
|
||||||
pull_request_title: 'i18n - translations'
|
pull_request_title: 'i18n - translations'
|
||||||
base_url: 'https://twenty.api.crowdin.com'
|
base_url: 'https://twenty.api.crowdin.com'
|
||||||
auto_approve_imported: false
|
auto_approve_imported: false
|
||||||
|
|||||||
35
.github/workflows/i18n-push.yaml
vendored
35
.github/workflows/i18n-push.yaml
vendored
@ -40,14 +40,8 @@ jobs:
|
|||||||
npx nx run twenty-emails:lingui:extract
|
npx nx run twenty-emails:lingui:extract
|
||||||
npx nx run twenty-front:lingui:extract
|
npx nx run twenty-front:lingui:extract
|
||||||
|
|
||||||
- name: Compile translations
|
- name: Check and commit extracted files
|
||||||
run: |
|
id: check_extract_changes
|
||||||
npx nx run twenty-server:lingui:compile
|
|
||||||
npx nx run twenty-emails:lingui:compile
|
|
||||||
npx nx run twenty-front:lingui:compile
|
|
||||||
|
|
||||||
- name: Check and commit any files created
|
|
||||||
id: check_changes
|
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name 'github-actions'
|
git config --global user.name 'github-actions'
|
||||||
git config --global user.email 'github-actions@twenty.com'
|
git config --global user.email 'github-actions@twenty.com'
|
||||||
@ -59,12 +53,31 @@ jobs:
|
|||||||
echo "changes_detected=false" >> $GITHUB_OUTPUT
|
echo "changes_detected=false" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
- name: Compile translations
|
||||||
|
run: |
|
||||||
|
npx nx run twenty-server:lingui:compile
|
||||||
|
npx nx run twenty-emails:lingui:compile
|
||||||
|
npx nx run twenty-front:lingui:compile
|
||||||
|
|
||||||
|
- name: Check and commit compiled files
|
||||||
|
id: check_compile_changes
|
||||||
|
run: |
|
||||||
|
git config --global user.name 'github-actions'
|
||||||
|
git config --global user.email 'github-actions@twenty.com'
|
||||||
|
git add .
|
||||||
|
if ! git diff --staged --quiet --exit-code; then
|
||||||
|
git commit -m "chore: compile translations"
|
||||||
|
echo "changes_detected=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "changes_detected=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Push changes and create remote branch if needed
|
- 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
|
run: git push origin HEAD:i18n
|
||||||
|
|
||||||
- name: Upload missing translations
|
- 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@v2
|
uses: crowdin/github-action@v2
|
||||||
with:
|
with:
|
||||||
upload_sources: true
|
upload_sources: true
|
||||||
@ -80,7 +93,7 @@ jobs:
|
|||||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||||
|
|
||||||
- name: Create a pull request
|
- 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' || true
|
run: gh pr create -B main -H i18n --title 'i18n - translations' --body 'Created by Github action' || true
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { defineConfig } from '@lingui/cli';
|
import { defineConfig } from '@lingui/cli';
|
||||||
|
import { formatter } from '@lingui/format-po';
|
||||||
import { APP_LOCALES } from 'twenty-shared';
|
import { APP_LOCALES } from 'twenty-shared';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
@ -19,4 +20,5 @@ export default defineConfig({
|
|||||||
],
|
],
|
||||||
catalogsMergePath: '<rootDir>/src/locales/generated/{locale}',
|
catalogsMergePath: '<rootDir>/src/locales/generated/{locale}',
|
||||||
compileNamespace: 'ts',
|
compileNamespace: 'ts',
|
||||||
|
format: formatter({ lineNumbers: false }),
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { defineConfig } from '@lingui/cli';
|
import { defineConfig } from '@lingui/cli';
|
||||||
|
import { formatter } from '@lingui/format-po';
|
||||||
import { APP_LOCALES } from 'twenty-shared';
|
import { APP_LOCALES } from 'twenty-shared';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
@ -16,4 +17,5 @@ export default defineConfig({
|
|||||||
],
|
],
|
||||||
catalogsMergePath: '<rootDir>/src/locales/generated/{locale}',
|
catalogsMergePath: '<rootDir>/src/locales/generated/{locale}',
|
||||||
compileNamespace: 'ts',
|
compileNamespace: 'ts',
|
||||||
|
format: formatter({ lineNumbers: false }),
|
||||||
});
|
});
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { defineConfig } from '@lingui/cli';
|
import { defineConfig } from '@lingui/cli';
|
||||||
|
import { formatter } from '@lingui/format-po';
|
||||||
import { APP_LOCALES } from 'twenty-shared';
|
import { APP_LOCALES } from 'twenty-shared';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
@ -20,4 +21,5 @@ export default defineConfig({
|
|||||||
catalogsMergePath:
|
catalogsMergePath:
|
||||||
'<rootDir>/src/engine/core-modules/i18n/locales/generated/{locale}',
|
'<rootDir>/src/engine/core-modules/i18n/locales/generated/{locale}',
|
||||||
compileNamespace: 'ts',
|
compileNamespace: 'ts',
|
||||||
|
format: formatter({ lineNumbers: false }),
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user