From f3a0fecc4b0ae8fab1aee418e15020cd44dda04b Mon Sep 17 00:00:00 2001 From: Takeshi Hamasaki Date: Sat, 18 Sep 2021 17:55:47 +0900 Subject: [PATCH 1/4] Added Japanese Translations --- .../document/molecules/localized-content-note/index.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/client/src/document/molecules/localized-content-note/index.tsx b/client/src/document/molecules/localized-content-note/index.tsx index 21bbc6cb5d78..d1e9bc9bb090 100644 --- a/client/src/document/molecules/localized-content-note/index.tsx +++ b/client/src/document/molecules/localized-content-note/index.tsx @@ -16,6 +16,10 @@ export function LocalizedContentNote({ linkText: "Cette page a été traduite à partir de l'anglais par la communauté. Vous pouvez également contribuer en rejoignant la communauté francophone sur MDN Web Docs.", }, + "ja": { + linkText: + "このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。", + }, ko: { linkText: "이 페이지는 영어로부터 커뮤니티에 의하여 번역되었습니다. MDN Web Docs에서 한국 커뮤니티에 가입하여 자세히 알아보세요.", @@ -38,6 +42,10 @@ export function LocalizedContentNote({ linkText: "Esta página fue traducida del inglés por la comunidad, pero no se mantiene activamente, por lo que puede estar desactualizada. Si desea ayudar a mantenerlo, descubra cómo activar las configuraciones regionales inactivas.", }, + "ja": { + linkText: + "このページはコミュニティーによって英語から翻訳されましたが、その後更新されておらず、原文から遅れた内容かもしれません。訳を更新するための方法は、こちらから学べます。", + }, }; const linkText = isActive From 2ce2dfec1ce54db082cdafcc4d289c8e7e4372f8 Mon Sep 17 00:00:00 2001 From: Takeshi HAMASAKI Date: Sat, 20 Nov 2021 14:26:46 +0900 Subject: [PATCH 2/4] Update client/src/document/molecules/localized-content-note/index.tsx I understand this phrase is not for ja locale. Sorry for my slow response. Co-authored-by: Ryan Johnson --- .../src/document/molecules/localized-content-note/index.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/client/src/document/molecules/localized-content-note/index.tsx b/client/src/document/molecules/localized-content-note/index.tsx index d1e9bc9bb090..7693a62d09e0 100644 --- a/client/src/document/molecules/localized-content-note/index.tsx +++ b/client/src/document/molecules/localized-content-note/index.tsx @@ -42,10 +42,6 @@ export function LocalizedContentNote({ linkText: "Esta página fue traducida del inglés por la comunidad, pero no se mantiene activamente, por lo que puede estar desactualizada. Si desea ayudar a mantenerlo, descubra cómo activar las configuraciones regionales inactivas.", }, - "ja": { - linkText: - "このページはコミュニティーによって英語から翻訳されましたが、その後更新されておらず、原文から遅れた内容かもしれません。訳を更新するための方法は、こちらから学べます。", - }, }; const linkText = isActive From f22210ec31b58a4ae7f12e771922834264fd4762 Mon Sep 17 00:00:00 2001 From: Schalk Neethling Date: Wed, 19 Jan 2022 12:07:09 +0200 Subject: [PATCH 3/4] Update index.tsx Ran prettier --- .../src/document/molecules/localized-content-note/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/document/molecules/localized-content-note/index.tsx b/client/src/document/molecules/localized-content-note/index.tsx index 7693a62d09e0..8bf6e35a4a2d 100644 --- a/client/src/document/molecules/localized-content-note/index.tsx +++ b/client/src/document/molecules/localized-content-note/index.tsx @@ -4,8 +4,8 @@ export function LocalizedContentNote({ isActive, locale, }: { - isActive: boolean; - locale: string; + isActive: boolean, + locale: string, }) { const activeLocaleNoteContent = { "en-US": { @@ -16,7 +16,7 @@ export function LocalizedContentNote({ linkText: "Cette page a été traduite à partir de l'anglais par la communauté. Vous pouvez également contribuer en rejoignant la communauté francophone sur MDN Web Docs.", }, - "ja": { + ja: { linkText: "このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。", }, From 9a558e04d6354353792cadec1b0a1bf4cbb7328e Mon Sep 17 00:00:00 2001 From: Schalk Neethling Date: Wed, 19 Jan 2022 12:11:41 +0200 Subject: [PATCH 4/4] prettier formatted --- .../molecules/localized-content-note/index.tsx | 4 ++-- markdown/h2m/h.ts | 14 ++++++-------- package.json | 6 +++--- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/client/src/document/molecules/localized-content-note/index.tsx b/client/src/document/molecules/localized-content-note/index.tsx index 8bf6e35a4a2d..cb7dee5af836 100644 --- a/client/src/document/molecules/localized-content-note/index.tsx +++ b/client/src/document/molecules/localized-content-note/index.tsx @@ -4,8 +4,8 @@ export function LocalizedContentNote({ isActive, locale, }: { - isActive: boolean, - locale: string, + isActive: boolean; + locale: string; }) { const activeLocaleNoteContent = { "en-US": { diff --git a/markdown/h2m/h.ts b/markdown/h2m/h.ts index 0d1f205516dd..fc6861103c24 100644 --- a/markdown/h2m/h.ts +++ b/markdown/h2m/h.ts @@ -68,14 +68,12 @@ const CONTENT: Content["type"][] = [ type MDNodesWithChildren = Extract; -const CHILDREN_TYPES: Partial< - { - [Type in MDNodesWithChildren["type"]]: Extract< - MDNodesWithChildren, - { type: Type } - >["children"][0]["type"][]; - } -> = { +const CHILDREN_TYPES: Partial<{ + [Type in MDNodesWithChildren["type"]]: Extract< + MDNodesWithChildren, + { type: Type } + >["children"][0]["type"][]; +}> = { paragraph: PHRASING_CONTENT, heading: PHRASING_CONTENT, blockquote: BLOCK_CONTENT, diff --git a/package.json b/package.json index cc19f25cb578..2cba17c7b722 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "fiori:build": "cd client && build-storybook", "fiori:start": "cd client && start-storybook -p 6006", "md": "ts-node markdown/cli.ts", + "prepare": "husky install", "prepare-build": "yarn build:client && yarn build:ssr && yarn tool optimize-client-build && yarn tool google-analytics-code && yarn tool spas && yarn tool gather-git-history && yarn tool build-robots-txt && yarn tool popularities", "prettier-check": "prettier --check .", "prettier-format": "prettier --write .", @@ -26,13 +27,12 @@ "test": "yarn prettier-check && yarn test:client && yarn test:kumascript && yarn test:content && yarn test:testing", "test:client": "cd client && tsc --noEmit && react-scripts test --env=jest-environment-jsdom-sixteen", "test:content": "jest content", - "test:headless": "playwright test headless", "test:developing": "playwright test developing", + "test:headless": "playwright test headless", "test:kumascript": "jest kumascript --env=node", "test:testing": "jest --rootDir testing", "tool": "node tool/cli.js", - "watch:ssr": "cd ssr && webpack --mode=production --watch", - "prepare": "husky install" + "watch:ssr": "cd ssr && webpack --mode=production --watch" }, "jest": { "testPathIgnorePatterns": [