Skip to content

Add Crowdin action #13007

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
(
startsWith(github.event.pull_request.title, '[Bot] ') ||
startsWith(github.event.pull_request.title, 'Bump ') ||
startsWith(github.event.pull_request.title, 'New Crowdin updates') ||
startsWith(github.event.pull_request.title, 'New Crowdin Translations') ||
startsWith(github.event.pull_request.title, 'Update Gradle Wrapper from')
)
)
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/crowdin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Crowdin Action

on:
push:
branches:
- use-crowdin-action
schedule:
# run on each Wednesday
- cron: '2 3 * * 3'
workflow_dispatch:

jobs:
synchronize-with-crowdin:
if: github.repository == 'JabRef/jabref'
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: crowdin action
uses: crowdin/github-action@v2
with:
upload_sources: true
upload_translations: false
upload_language: de
download_translations: true
localization_branch_name: l10n_crowdin_translations
create_pull_request: true
pull_request_title: 'New Crowdin Translations'
pull_request_body: 'New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)'
pull_request_base_branch_name: 'main'
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_JABREF_MACHINE_PR_APPROVE }}

# A numeric ID, found at https://crowdin.com/project/<projectName>/tools/api
CROWDIN_PROJECT_ID: 294858

# Visit https://crowdin.com/settings#api-key to create this token
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/on-pr-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
(
startsWith(github.event.pull_request.title, '[Bot] ') ||
startsWith(github.event.pull_request.title, 'Bump ') ||
startsWith(github.event.pull_request.title, 'New Crowdin updates') ||
startsWith(github.event.pull_request.title, 'New Crowdin Translations') ||
startsWith(github.event.pull_request.title, 'Update Gradle Wrapper from')
)
)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/on-pr-opened-updated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
(
startsWith(github.event.pull_request.title, '[Bot] ') ||
startsWith(github.event.pull_request.title, 'Bump ') ||
startsWith(github.event.pull_request.title, 'New Crowdin updates') ||
startsWith(github.event.pull_request.title, 'New Crowdin Translations') ||
startsWith(github.event.pull_request.title, 'Update Gradle Wrapper from')
)
)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ jobs:
(
startsWith(github.event.pull_request.title, '[Bot] ') ||
startsWith(github.event.pull_request.title, 'Bump ') ||
startsWith(github.event.pull_request.title, 'New Crowdin updates') ||
startsWith(github.event.pull_request.title, 'New Crowdin Translations') ||
startsWith(github.event.pull_request.title, 'Update Gradle Wrapper from')
)
)
Expand Down Expand Up @@ -367,7 +367,7 @@ jobs:
(
startsWith(github.event.pull_request.title, '[Bot] ') ||
startsWith(github.event.pull_request.title, 'Bump ') ||
startsWith(github.event.pull_request.title, 'New Crowdin updates') ||
startsWith(github.event.pull_request.title, 'New Crowdin Translations') ||
startsWith(github.event.pull_request.title, 'Update Gradle Wrapper from')
)
)
Expand Down
4 changes: 2 additions & 2 deletions crowdin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
files:
- source: /src/main/resources/l10n/JabRef_en.properties
translation: /src/main/resources/l10n/JabRef_%two_letters_code%.properties
- source: /jablib/src/main/resources/l10n/JabRef_en.properties
translation: /jablib/src/main/resources/l10n/JabRef_%two_letters_code%.properties
languages_mapping:
two_letters_code:
pt-BR: pt_BR
Expand Down