Skip to content

Commit

Permalink
Merge branch 'main/develop' into main/master
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/locales/ko-kr.json
#	src/locales/zh.json
  • Loading branch information
meteyou committed Jun 21, 2022
2 parents 5029f4d + 229a675 commit 8a000e3
Show file tree
Hide file tree
Showing 36 changed files with 485 additions and 558 deletions.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ body:
[Discord](https://discord.gg/mainsail)
---
- type: input
id: version
attributes:
label: 'Mainsail Version:'
description: Mainsail version where the issue occurs
placeholder: <your current mainsail version>
validations:
required: true
- type: dropdown
id: browser
attributes:
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/check_locale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Check Translations
on:
pull_request_target:
types: [synchronize, opened]
paths:
- 'src/locales/**'

jobs:
check_translations:
runs-on: ubuntu-latest
steps:
- name: Install jq
run: sudo apt install -y jq

- name: Fetch repo
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Install node
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install dependencies
run: npm ci

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v23
with:
sha: ${{ github.event.pull_request.head.sha }}
files: 'src/locales/*.json'

- name: Run i18n-extract on changed locale files
id: i18n-extract
env:
OUTPUT: ''
run: |
mkdir ./i18n-extract
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
npm run i18n-extract -- --languageFiles=src/locales/${file##*/} --output=i18n-extract/${file##*/}
MISSING=$(cat i18n-extract/${file##*/} | jq '.missingKeys | length')
UNUSED=$(cat i18n-extract/${file##*/} | jq '.unusedKeys | length')
echo "::set-output name=$file::|${file##*/}|${MISSING}|${UNUSED}|"
done
- name: Comment PR
uses: thollander/actions-comment-pull-request@v1
with:
message: |
Language file analysis report:
|File|Missing Keys|Unused Keys|
|:---|---:|---:|
${{join(steps.i18n-extract.outputs.*, '
')}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19 changes: 19 additions & 0 deletions .github/workflows/issues-no-response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: No Response

# Both `issue_comment` and `scheduled` event types are required for this Action
# to work properly.
on:
issue_comment:
types: [created]
schedule:
- cron: '5 * * * *'

jobs:
noResponse:
runs-on: ubuntu-latest
steps:
- uses: lee-dohm/no-response@v0.5.0
with:
token: ${{ github.token }}
daysUntilClose: 7
responseRequiredLabel: ❔ User Input
157 changes: 78 additions & 79 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"vite-plugin-pwa": "^0.11.13",
"vite-plugin-vue2": "^1.9.3",
"vue-debounce-decorator": "^1.0.1",
"vue-i18n-extract": "^1.2.3",
"vue-i18n-extract": "^2.0.7",
"vue-router": "^3.5.2",
"vue-template-compiler": "^2.6.14",
"workbox-core": "^6.4.2"
Expand Down
3 changes: 2 additions & 1 deletion src/components/.i18nignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ $t('App.TopCornerMenu.ConfirmationDialog.Description.ServiceStart')
$t('App.TopCornerMenu.ConfirmationDialog.Description.ServiceRestart')
$t('App.TopCornerMenu.ConfirmationDialog.Description.ServiceStop')
$t('App.TopCornerMenu.ConfirmationDialog.Description.HostReboot')
$t('App.TopCornerMenu.ConfirmationDialog.Description.HostShutdown')
$t('App.TopCornerMenu.ConfirmationDialog.Description.HostShutdown')
$t('Editor.Uploading')
Loading

0 comments on commit 8a000e3

Please sign in to comment.