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

Fixing translation report thread automatic comment #1113

Merged
merged 2 commits into from
Jan 5, 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
12 changes: 2 additions & 10 deletions .github/workflows/update-missing-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,12 @@ jobs:
- name: Write missing translation to file
run: |
python scripts/check_languages.py -output missing.md -report_summary -report_key_mismatch -report_missing_translations
- name: Get comment body
id: get-comment-body
run: |
body=$(cat missing.md)
body="${body//'%'/'%25'}"
body="${body//$'\n'/'%0A'}"
body="${body//$'\r'/'%0D'}"
echo "body=$body" >> $GITHUB_OUTPUT
- name: Update comment
uses: peter-evans/create-or-update-comment@v1
uses: peter-evans/create-or-update-comment@v4
with:
# Update the comment in issue 475
# https://github.com/TTLApp/time-to-leave/issues/475#issuecomment-808787273
comment-id: 808787273
edit-mode: replace
body: ${{ steps.get-comment-body.outputs.body }}
body-path: missing.md
reactions: hooray
2 changes: 1 addition & 1 deletion scripts/check_languages.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def get_count_total_string_with_link(locale : str, missing_translations : dict,

def get_progress_bar(total_strings_for_translation : int, missing_strings : dict) -> str:
percentage = percentage_translated(total_strings_for_translation, missing_strings)
return f'![Progress](https://progress-bar.dev/{floor(percentage)}/?width=200)'
return f'![Progress](https://progress-bar.xyz/{floor(percentage)}/?width=200)'

def get_new_issue_url(locale : str, missing_translations : dict) -> str:
language = get_locale_name(locale)
Expand Down