From 42e842d0ff11f74a8e1f3ccb7b0b57c98fed97f2 Mon Sep 17 00:00:00 2001 From: "Queen Vinyl Da.i'gyu-Kazotetsu" <vinyldarkscratch@gmail.com> Date: Tue, 15 Aug 2023 15:04:48 -0700 Subject: [PATCH] Enable linting rules to prevent smart quotes (#14223) --- .markdownlint.jsonc | 33 +++++++++---------- CONTRIBUTING.md | 2 +- README.md | 2 +- .../aria/aria_live_regions/index.md | 2 +- files/ko/web/html/element/img/index.md | 2 +- 5 files changed, 20 insertions(+), 21 deletions(-) diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc index 5f31b4be52a..975a576551d 100644 --- a/.markdownlint.jsonc +++ b/.markdownlint.jsonc @@ -140,23 +140,22 @@ // https://github.com/OnkarRuikar/markdownlint-rule-search-replace "search-replace": { "rules": [ - // XXX Many instances still found in translated content - // { - // // Does not apply to zh-cn - // "name": "curly-double-quotes", - // "message": "Don't use curly double quotes", - // "searchPattern": "/“|”/g", - // "replace": "\"", - // "searchScope": "text" - // }, - // { - // // Does not apply to zh-cn - // "name": "curly-single-quotes", - // "message": "Don't use curly single quotes", - // "searchPattern": "/‘|’/g", - // "replace": "'", - // "searchScope": "text" - // }, + { + // Does not apply to zh-cn + "name": "curly-double-quotes", + "message": "Don't use curly double quotes", + "searchPattern": "/“|”/g", + "replace": "\"", + "searchScope": "text" + }, + { + // Does not apply to zh-cn + "name": "curly-single-quotes", + "message": "Don't use curly single quotes", + "searchPattern": "/‘|’/g", + "replace": "'", + "searchScope": "text" + }, { "name": "nbsp", "message": "Don't use no-break spaces", diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2b13dd4fb67..8568bf43771 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -63,7 +63,7 @@ Once that is done, you will also need to fork and clone this repository by follo cd /path/to/content ``` -2. Next, define an environment variable in a `.env` file called `CONTENT_TRANSLATED_ROOT` containing the path to the _translated-content_ repo’s `files` directory: +2. Next, define an environment variable in a `.env` file called `CONTENT_TRANSLATED_ROOT` containing the path to the _translated-content_ repo's `files` directory: ```bash echo CONTENT_TRANSLATED_ROOT=/path/to/translated-content/files >> .env diff --git a/README.md b/README.md index 869cab36545..e2cf17782fc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Contributing to the translated content of MDN Web Docs -:tada: First of all, thanks for taking the time to contribute to [MDN Web Docs](https://developer.mozilla.org)’ translated content! :tada: +:tada: First of all, thanks for taking the time to contribute to [MDN Web Docs](https://developer.mozilla.org)' translated content! :tada: The following is a set of guidelines for contributing to the [translated content of MDN Web Docs](https://github.com/mdn/translated-content), which is hosted within the [MDN Organization](https://github.com/mdn) on GitHub. diff --git a/files/fr/web/accessibility/aria/aria_live_regions/index.md b/files/fr/web/accessibility/aria/aria_live_regions/index.md index 62483c961d1..0c0db91e974 100644 --- a/files/fr/web/accessibility/aria/aria_live_regions/index.md +++ b/files/fr/web/accessibility/aria/aria_live_regions/index.md @@ -75,7 +75,7 @@ Un site de chat voudrait afficher la liste des utilisateurs actuellement connect </ul> ``` -#### Détails des propriétés « live » d’ARIA +#### Détails des propriétés « live » d'ARIA - L'attribut `aria-live="polite"` indique au lecteur d'écran qu'il doit attendre que l'utilisateur soit inactif avant de lui présenter une mise à jour. C'est la valeur la plus communément utilisée, car interrompre l'utilisateur avec la valeur `assertive` briserait son flux de lecture. - L'attribut `aria-atomic` n'est pas défini (`false` par défaut), ainsi seuls les utilisateurs ajoutés ou supprimés devraient être lus et non l'intégralité de la liste, à chaque mise à jour. diff --git a/files/ko/web/html/element/img/index.md b/files/ko/web/html/element/img/index.md index d28df333913..d602150f260 100644 --- a/files/ko/web/html/element/img/index.md +++ b/files/ko/web/html/element/img/index.md @@ -90,7 +90,7 @@ HTML 표준은 지원해야 하는 이미지 형식을 명시하고 있지 않 - {{htmlattrdef("intrinsicsize")}} {{deprecated_inline}} - - This attribute tells the browser to ignore the actual intrinsic size of the image and pretend it’s the size specified in the attribute. Specifically, the image would raster at these dimensions and `naturalWidth`/`naturalHeight` on images would return the values specified in this attribute. [Explainer](https://github.com/ojanvafai/intrinsicsize-attribute), [examples](https://googlechrome.github.io/samples/intrinsic-size/index.html) + - This attribute tells the browser to ignore the actual intrinsic size of the image and pretend it's the size specified in the attribute. Specifically, the image would raster at these dimensions and `naturalWidth`/`naturalHeight` on images would return the values specified in this attribute. [Explainer](https://github.com/ojanvafai/intrinsicsize-attribute), [examples](https://googlechrome.github.io/samples/intrinsic-size/index.html) - {{htmlattrdef("ismap")}} -- GitLab