mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
ci: Better locale coverage comment (#2616)
Co-authored-by: kbariotis <konmpar@gmail.com>
This commit is contained in:
parent
4ff8f3b006
commit
d3bebbc68d
3 changed files with 173 additions and 16 deletions
17
.github/workflows/locales-coverage.yml
vendored
17
.github/workflows/locales-coverage.yml
vendored
|
@ -49,22 +49,7 @@ jobs:
|
|||
- name: Construct comment body
|
||||
id: getCommentBody
|
||||
run: |
|
||||
locales_above_threshold=$(cat src/locales/percentages.json | jq -r 'to_entries[] | select(.value > 85) | "|\(.key)|\(.value)|"')
|
||||
locales_below_threshold=$(cat src/locales/percentages.json | jq -r 'to_entries[] | select(.value <= 85) | "|\(.key)|\(.value)|"')
|
||||
header=$(echo "
|
||||
## Languages check
|
||||
Our translations for every languages should be at least **85%** to appear on Excalidraw. Help us translate them in [Crowdin](https://crowdin.com/project/excalidraw).
|
||||
")
|
||||
comment_body=$(echo "$header
|
||||
### Languages over the threshold
|
||||
|Locale|%|
|
||||
|----|----|
|
||||
$locales_above_threshold
|
||||
### Languages below the threshold
|
||||
|Locale|%|
|
||||
|----|----|
|
||||
$locales_below_threshold
|
||||
")
|
||||
body=$(npm run locales-coverage:comment)
|
||||
comment_body="${comment_body//'%'/'%25'}"
|
||||
comment_body="${comment_body//$'\n'/'%0A'}"
|
||||
comment_body="${comment_body//$'\r'/'%0D'}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue