Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
josielrocha authored Oct 7, 2023
2 parents 6e67152 + ada5d2b commit cb1c3e5
Show file tree
Hide file tree
Showing 25,961 changed files with 503,227 additions and 526,873 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 8 additions & 0 deletions .autocorrectignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# 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/
_wikihistory.json
3 changes: 3 additions & 0 deletions .autocorrectrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
textRules:
# sorted by `LC_ALL=C sort` command
一二三,四五六.七八九: 0
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,6 @@
/.github/ @mdn/core-dev
/* @mdn/core-dev
/*.md @mdn/core-dev @mdn/core-yari-content
/CONTRIBUTING.md @mdn/core-yari-content
/PEERS_GUIDELINES.md @mdn/core-yari-content
/.prettierignore
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/new-content-suggestion.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ title: "Content suggestion: <TITLE OF SUGGESTION>"
---

## What is the new suggestion?

<!-- include a short description of the content work suggestion -->

## Why is it important or useful?

<!-- Tell us why the idea is important or useful. Include any information you
can think of that would be useful, for example:
Expand Down
40 changes: 20 additions & 20 deletions .github/ISSUE_TEMPLATE/page-report-fr.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
name: "[via des pages MDN uniquement // fr]"
description: Issue filed via le lien "Report a problem with this content on GitHub" sur des pages MDN.
description: Tickets rapportés via le lien "Report a problem with this content on GitHub" sur des pages MDN.
labels: ["l10n-fr", "needs triage"]
body:
- type: markdown
attributes:
value: |
### Before you start
### Avant toute chose
**Want to change this page yourself?** This content is open source!
Go back and use the _Edit on GitHub_ link on the page.
**Vous souhaitez éditer cette page vous-même ?** Le contenu est open source !
Revenez sur la page et cliquez sur le lien _Edit on GitHub_ en bas de la page.
**Is your issue about the browser compatibility table?**
Go back and use the _Report problems with this compatibility data on GitHub_ link on the page.
**Est-ce que le problème porte sur le tableau de compatibilité des navigateurs ?**
Revenez sur la page et cliquez sur le lien _Report problems with this compatibility data on GitHub_ en bas de la page.
**Need help with a browser?**
🙋 To get help with [Firefox](https://support.mozilla.org/en-US/kb/file-bug-report-or-feature-request-mozilla), [Chrome](https://support.google.com/chrome/answer/95315?hl=en-GB&ref_topic=7439544), [Safari](https://www.apple.com/feedback/safari.html), or another browser, check the browser's support site.
**Vous avez besoin d'aide avec votre navigateur ?**
Consultez le site d'aide du navigateur (https://support.mozilla.org/fr/products/firefox pour Firefox, https://support.apple.com/fr-fr/safari pour Safari, https://support.google.com/chrome/?hl=fr#topic=7439538 pour Chrome, https://support.microsoft.com/fr-fr/microsoft-edge pour Edge).
---
- type: input
id: mdn-url
attributes:
label: MDN URL
description: Set automatically. Do not modify.
label: URL MDN
description: Cette information est ajoutée automatiquement. Veuillez ne pas la modifier.
validations:
required: true
- type: input
id: section
attributes:
label: What specific section or headline is this issue about?
label: Sur quelle section/titre porte ce problème ?
- type: textarea
id: problem
attributes:
label: What information was incorrect, unhelpful, or incomplete?
label: Quelle information était incorrecte, inutile ou incomplète ?
validations:
required: true
- type: textarea
id: expected
attributes:
label: What did you expect to see?
label: Que vous attendiez-vous à voir ?
validations:
required: true
- type: textarea
id: references
attributes:
label: Do you have any supporting links, references, or citations?
description: Link to information that helps us confirm your issue.
label: Avez-vous des liens, références ou citations sur ce sujet ?
description: Des liens vers des informations qui pourront nous aider à confirmer le problème.
- type: textarea
id: more-info
attributes:
label: Do you have anything more you want to share?
description: For example, steps to reproduce a bug, screenshots, screen recordings, or sample code
label: Souhaitez-vous ajouter autre chose ?
description: Cela peut être des étapes de reproduction du bogue, des captures ou enregistrements d'écran, un fragment de code.
- type: markdown
attributes:
value: |
---
You're finished! The following fields are prefilled. Please click **Submit new issue**.
Et voilà, c'est terminé ! Les champs suivants sont remplis automatiquement. Vous pouvez cliquer sur **Submit new issue**.
- type: textarea
id: metadata
attributes:
label: MDN metadata
description: Set automatically. Do not modify.
label: Métadonnées MDN
description: Remplies automatiquement. Ne pas modifier.
9 changes: 7 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# For more ideas, see https://github.com/actions/labeler#common-examples

system:
- package.json
- yarn.lock
- .github/**/*
- .husky/**/*
- .vscode/**/*
- .*
- front-matter-config.json

l10n-de:
- files/de/**/*
Expand All @@ -17,6 +21,7 @@ l10n-fr:

l10n-ja:
- files/ja/**/*
- docs/ja/**/*
- /.github/ISSUE_TEMPLATE/page-report-ja.yml

l10n-ko:
Expand Down
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@v4

- 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
33 changes: 28 additions & 5 deletions .github/workflows/markdown-lint-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- zh-cn
- zh-tw
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v3
Expand All @@ -31,14 +31,37 @@ jobs:
cache: yarn

- name: Install all yarn packages
env:
HUSKY: 0
run: |
yarn --frozen-lockfile
env:
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HUSKY: 0

- uses: actions/checkout@v4
with:
repository: mdn/content
path: mdn/content

- name: Setup Node.js environment for mdn/content
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: "yarn"
cache-dependency-path: mdn/content/yarn.lock

- name: Install all yarn packages for mdn/content
working-directory: ${{ github.workspace }}/mdn/content
run: yarn --frozen-lockfile
env:
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Lint markdown files
- name: Lint Markdown files
run: |
yarn markdownlint-cli2-fix "**/${{ matrix.lang }}/**/*.md"
yarn markdownlint-cli2 --fix "**/${{ matrix.lang }}/**/*.md"
yarn prettier -w "**/${{ matrix.lang }}/**/*.md"
cd ${{ github.workspace }}/mdn/content && yarn fix:fm --config-file ${{ github.workspace }}/front-matter-config.json "${{ github.workspace }}/files/${{ matrix.lang }}"
- name: Create PR with only fixable issues
if: success()
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/markdown-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@ on:
paths:
- .nvmrc
- .markdownlint-cli2.jsonc
- "**/.markdownlint.jsonc"
- package.json
- yarn.lock
- .github/workflows/markdown-lint.yml
- .github/workflows/markdownlint-problem-matcher.json

jobs:
docs:
# do not run on forks
if: github.repository == 'mdn/translated-content'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v3
Expand All @@ -28,6 +31,9 @@ jobs:
- name: Install all yarn packages
run: |
yarn --frozen-lockfile
env:
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Lint markdown files
run: |
Expand Down
Loading

0 comments on commit cb1c3e5

Please sign in to comment.