Skip to content
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

Crowdin stuff, pt 2 #52

Merged
merged 34 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
6750548
add: Crowdin Actions integration
KTrain5169 Jul 22, 2024
9f0f941
change: adjust translation workflow to run every 3h
KTrain5169 Jul 22, 2024
e58a1ba
fix: prettier
KTrain5169 Jul 22, 2024
5f6865b
fix: prettier, readme & crowdin.yml don't exist
KTrain5169 Jul 22, 2024
f3ee780
fix: fallback lang didn't work lol
KTrain5169 Jul 22, 2024
8ae9a32
Merge branch 'main' into crowdin-stuff
KTrain5169 Jul 22, 2024
44bf25a
Merge branch 'main' into crowdin-stuff
KTrain5169 Jul 22, 2024
5cb121a
adfix: giving pull-requests: write permission just in case
KTrain5169 Jul 22, 2024
5be4981
fix: I forgor to checkout the repo
KTrain5169 Jul 22, 2024
6fbd4a5
Merge branch 'main' into crowdin-stuff
KTrain5169 Jul 22, 2024
a20338d
fix: prettier translation workflow
KTrain5169 Jul 22, 2024
114ed3c
fix: first contrib workflow
KTrain5169 Jul 22, 2024
ec51de3
please help me
KTrain5169 Jul 22, 2024
07b50e7
testing workflow on main
KTrain5169 Jul 22, 2024
4807b06
fix?: 500 on /aalternatives
KTrain5169 Jul 22, 2024
def095f
fix?: 500 error on /alternatives
KTrain5169 Jul 27, 2024
9a0b258
fix: ...
KTrain5169 Jul 27, 2024
2c401bd
fix: ONE MORE i18n FIX
KTrain5169 Aug 15, 2024
eab0bfa
fix: adjust cron schedule
KTrain5169 Aug 15, 2024
9fba661
fix: prettier workflow
KTrain5169 Aug 15, 2024
50974f1
Fix conflicts for #37
KTrain5169 Aug 27, 2024
d6b224e
final workflow fixes, move crowdin.yml
KTrain5169 Aug 29, 2024
b568870
make it update every push too, why not
KTrain5169 Aug 29, 2024
cc69ab9
Update Crowdin translation progress badge
actions-user Aug 29, 2024
3a57752
remove crowdin config setting & update action
KTrain5169 Aug 29, 2024
3ecc899
move crowdin.yml back to root
KTrain5169 Aug 29, 2024
2eca0ba
fix path error in crowding config
KTrain5169 Aug 29, 2024
08c9696
switch to no-crowdin.yml mode
KTrain5169 Aug 29, 2024
c3f5c84
remove skip untranslated files
KTrain5169 Aug 29, 2024
5be08ab
New Crowdin translations by GitHub Action
crowdin-bot Aug 29, 2024
644ebfc
set export_only_approved to false
KTrain5169 Aug 29, 2024
c6302e5
test!: skip_untranslated_strings to false
KTrain5169 Aug 29, 2024
2a4ed28
set PR base branch to main
KTrain5169 Aug 29, 2024
0e78497
prettier on branch
KTrain5169 Aug 29, 2024
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
4 changes: 0 additions & 4 deletions .github/config.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .github/labels.yml

This file was deleted.

71 changes: 71 additions & 0 deletions .github/workflows/translations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Update Crowdin strings bi-directionally

run-name: Update from Crowdin

on:
schedule:
- cron: "30 */3 * * *"
push:
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
crowdin-translations-progress:
name: Crowdin translations progress updater
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Generate Crowdin translations progress markdown
uses: benjaminjonard/[email protected]
with:
languages_per_row: 10
minimum_completion_percent: 80
file: README.md # Maybe change later?
env:
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

- name: Push changes
uses: actions-go/push@v1
with:
author-name: Actionsbot
author-email: [email protected]
commit-message: "Update Crowdin translation progress badge"
remote: origin

update-from-crowdin:
name: Update strings from Crowdin
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Grab strings from Crowdin
uses: crowdin/[email protected]
with: # This part can be a little fragile, be careful!
upload_sources: true
upload_translations: false
upload_language: en
download_sources: false
download_translations: true
skip_untranslated_strings: false
source: i18n/lang/en-US.json
translation: i18n/lang/%locale%.json
export_only_approved: false
localization_branch_name: i18n-crowdin-translations
create_pull_request: true
pull_request_title: (Crowdin Action) New translation strings
pull_request_body: New translated strings are now available!
pull_request_labels: crowdin
pull_request_base_branch_name: "main"
github_user_name: Crowdin Bot (Actions)
github_user_email: [email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ logs
.env
.env.*
!.env.example

# Default Crowdin config file
crowdin.yml
5 changes: 4 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
package.json
pnpm-lock.yaml
.vscode/issue-query.github-issues
/i18n/**
README.md
crowdin.yml
/i18n/**
.github/labels.yml
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,10 @@ Review our contributing guidelines at [CONTRIBUTING.md](./CONTRIBUTING.md)
Original text is licensed under the CC-BY-SA 4.0 license. You may find it on our repository [here](TEXT_LICENSE).

Website code is licensed under the GPL v3 license. You may find it on our repository [here](LICENSE).

## Translation progress

Only useful to maintainers and translators.
<!-- CROWDIN-TRANSLATIONS-PROGRESS-ACTION-START -->

<!-- CROWDIN-TRANSLATIONS-PROGRESS-ACTION-END -->
163 changes: 163 additions & 0 deletions i18n/lang/ar-SA.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
{
"layout": {
"nav": {
"alternatives": ""
},
"footer": {
"disclaimer": "",
"open_source": "",
"about": "",
"credit_creator": "",
"credit_designed": "",
"interact": "",
"resources": "",
"contributing": "",
"experiments": ""
}
},
"landing": {
"hero": "",
"reason": "",
"buttons": {
"alternatives": ""
}
},
"experiments": {
"hero": "",
"subtitle": ""
},
"contributing": {
"hero": "",
"subhero": "",
"welcome": "",
"end": "",
"titles": {
"translating": "",
"coding": "",
"alternatives": ""
},
"subtitles": {
"translating": "",
"coding": "",
"alternatives": ""
},
"guidelines": {
"translating": [
"",
"",
"",
""
],
"coding": [
"",
"",
"",
""
],
"alternatives": [
"",
"",
"",
"",
""
]
}
},
"alternatives": {
"hero": "",
"reason": "",
"nudge_for_contributing": "",
"texts": {
"modpacks": {
"section_name": "",
"vital": [
"",
"",
""
]
},
"multiplayer": {
"section_name": "",
"world_host": [
"",
"",
"",
""
],
"e4mc": [
"",
"",
""
]
},
"cosmetics": {
"section_name": "",
"cosmetica": [
"",
"",
""
],
"ears": [
"",
""
],
"capes": [
"",
""
],
"customizable_player_models": [
"",
"",
"",
""
],
"figura": [
"",
"",
""
],
"skin_shuffle": [
"",
"",
""
],
"emotecraft": [
"",
""
]
},
"misc": {
"section_name": "",
"screencapper": [
"",
""
],
"screenshot_viewer": [
"",
""
],
"snapper": [
"",
""
],
"auth_me": [
"",
""
],
"in_game_account_switcher": [
"",
"",
""
],
"craftpresence": [
"",
""
],
"zume": [
"",
""
]
}
}
}
}
Loading
Loading