Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
guesung committed Jul 27, 2023
2 parents 588858a + 48bc9e2 commit 5f53830
Show file tree
Hide file tree
Showing 1,437 changed files with 21,246 additions and 14,502 deletions.
7 changes: 7 additions & 0 deletions .autocorrectignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# AutoCorrect Link ignore rules.
# https://github.com/huacnlee/autocorrect
#
# Like `.gitignore`, this file to tell AutoCorrect which files need to check, some need to ignore.
files/
docs/
!files/zh-cn/
4 changes: 4 additions & 0 deletions .autocorrectrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
textRules:
一二三,四五六.七八九: 0
一二三,四五六,七八九,一二三,四五六,七八九: 0
9.9亿: 0
44 changes: 44 additions & 0 deletions .github/workflows/autocorrect-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# This workflow to use AutoCorrect tool for checking the copywriting, correct spaces and punctuations for CJK contents.
#
# For example:
#
# - incorrect: "欢迎阅读MDN文档."
# - correct: "欢迎阅读 MDN 文档。"
#
# - incorrect: "Welcome,this is MDN Web Docs。"
# - correct: "Welcome, to read MDN Web Docs."
#
# More details:
# https://github.com/huacnlee/autocorrect
name: AutoCorrect Lint
on:
pull_request:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Get changed files
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
# Use the GitHub API to get the list of changed files
# documenation: https://docs.github.com/rest/commits/commits#compare-two-commits
DIFF_DOCUMENTS=$(gh api repos/{owner}/{repo}/compare/${{ env.BASE_SHA }}...${{ env.HEAD_SHA }} \
--jq '.files | .[] | select(.status|IN("added", "modified", "renamed", "copied", "changed")) | .filename')
# filter out files that are not markdown
DIFF_DOCUMENTS=$(echo "${DIFF_DOCUMENTS}" | egrep -i "^files/zh-cn/" | xargs)
echo "DIFF_DOCUMENTS=${DIFF_DOCUMENTS}" >> $GITHUB_ENV
- name: AutoCorrect changed content
if: ${{ env.DIFF_DOCUMENTS }}
uses: huacnlee/[email protected]
with:
args: ${{ env.DIFF_DOCUMENTS }} --lint --no-diff-bg-color
8 changes: 4 additions & 4 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ build/
/files/fr/glossary/grid_lines/index.md
/files/fr/glossary/main_axis/index.md
/files/fr/learn/server-side/django/forms/index.md
/files/fr/web/css/align-self/index.md
/files/fr/web/css/justify-content/index.md
/files/fr/web/css/place-items/index.md
/files/fr/web/css/place-self/index.md
/files/pt-br/learn/server-side/django/forms/index.md
/files/ru/learn/server-side/django/forms/index.md
/files/ru/learn/server-side/django/introduction/index.md
Expand All @@ -35,10 +39,6 @@ build/
/files/es/web/javascript/reference/**/*.md

# fr
/files/fr/mozilla/add-ons/webextensions/api/**/*.md
/files/fr/web/api/**/*.md
/files/fr/web/css/**/*.md
/files/fr/web/html/**/*.md
/files/fr/web/javascript/**/*.md

# ja
Expand Down
Loading

0 comments on commit 5f53830

Please sign in to comment.