-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Use Crowdin action for translation sync #30054
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
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0478c0f
use crowdin action for translation sync
denyskon ff784d6
Merge branch 'main' into crowdin-action
denyskon b03bed7
Merge branch 'main' into crowdin-action
denyskon 5815013
Merge branch 'main' into crowdin-action
GiteaBot 33559a7
Merge branch 'main' into crowdin-action
GiteaBot 03c9975
Update .github/workflows/cron-translations.yml
denyskon 78278de
Update .github/workflows/cron-translations.yml
techknowlogick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,21 +4,28 @@ on: | |
schedule: | ||
- cron: "7 0 * * *" # every day at 00:07 UTC | ||
workflow_dispatch: | ||
push: | ||
branches: ["main"] | ||
techknowlogick marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
jobs: | ||
crowdin-pull: | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'go-gitea/gitea' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: download from crowdin | ||
uses: docker://jonasfranz/crowdin | ||
- uses: crowdin/github-action@v1 | ||
with: | ||
upload_sources: true | ||
upload_translations: false | ||
download_sources: false | ||
download_translations: true | ||
push_translations: false | ||
push_sources: false | ||
create_pull_request: false | ||
config: crowdin.yml | ||
env: | ||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} | ||
CROWDIN_KEY: ${{ secrets.CROWDIN_KEY }} | ||
PLUGIN_DOWNLOAD: true | ||
PLUGIN_EXPORT_DIR: options/locale/ | ||
PLUGIN_IGNORE_BRANCH: true | ||
PLUGIN_PROJECT_IDENTIFIER: gitea | ||
- name: update locales | ||
run: ./build/update-locales.sh | ||
- name: push translations to repo | ||
|
@@ -31,19 +38,3 @@ jobs: | |
commit_message: "[skip ci] Updated translations via Crowdin" | ||
remote: "[email protected]:go-gitea/gitea.git" | ||
ssh_key: ${{ secrets.DEPLOY_KEY }} | ||
crowdin-push: | ||
runs-on: ubuntu-latest | ||
if: github.repository == 'go-gitea/gitea' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: push translations to crowdin | ||
uses: docker://jonasfranz/crowdin | ||
env: | ||
CROWDIN_KEY: ${{ secrets.CROWDIN_KEY }} | ||
PLUGIN_UPLOAD: true | ||
PLUGIN_EXPORT_DIR: options/locale/ | ||
PLUGIN_IGNORE_BRANCH: true | ||
PLUGIN_PROJECT_IDENTIFIER: gitea | ||
PLUGIN_FILES: | | ||
locale_en-US.ini: options/locale/locale_en-US.ini | ||
PLUGIN_BRANCH: main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
project_id_env: CROWDIN_PROJECT_ID | ||
api_token_env: CROWDIN_KEY | ||
base_path: "." | ||
base_url: "https://api.crowdin.com" | ||
preserve_hierarchy: true | ||
files: | ||
- source: "/options/locale/locale_en-US.ini" | ||
translation: "/options/locale/locale_%locale%.ini" | ||
type: "ini" | ||
skip_untranslated_strings: true | ||
export_only_approved: true | ||
update_option: "update_as_unapproved" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.