From bc03b6162c859c065d1657ae7254a505aa2507ed Mon Sep 17 00:00:00 2001 From: sebastienlorber Date: Fri, 3 Jun 2022 15:22:54 +0200 Subject: [PATCH 1/6] add admonition stable className --- .../src/theme/Admonition/index.tsx | 8 +++++++- .../docusaurus-theme-common/src/utils/ThemeClassNames.ts | 9 +++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/packages/docusaurus-theme-classic/src/theme/Admonition/index.tsx b/packages/docusaurus-theme-classic/src/theme/Admonition/index.tsx index 0d4fe1662139..71388a1e6fe4 100644 --- a/packages/docusaurus-theme-classic/src/theme/Admonition/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Admonition/index.tsx @@ -7,6 +7,7 @@ import React, {type ReactNode} from 'react'; import clsx from 'clsx'; +import {ThemeClassNames} from '@docusaurus/theme-common'; import type {Props} from '@theme/Admonition'; import styles from './styles.module.css'; @@ -154,7 +155,12 @@ export default function Admonition(props: Props): JSX.Element { const icon = iconProp ?? ; return (
+ className={clsx( + ThemeClassNames.common.admonition, + 'alert', + `alert--${infimaClassName}`, + styles.admonition, + )}>
{icon} {title} diff --git a/packages/docusaurus-theme-common/src/utils/ThemeClassNames.ts b/packages/docusaurus-theme-common/src/utils/ThemeClassNames.ts index ec3ffc11a969..85449f463359 100644 --- a/packages/docusaurus-theme-common/src/utils/ThemeClassNames.ts +++ b/packages/docusaurus-theme-common/src/utils/ThemeClassNames.ts @@ -31,19 +31,20 @@ export const ThemeClassNames = { docsPages: 'docs-wrapper', mdxPages: 'mdx-wrapper', }, - - /** - * Follows the naming convention "theme-{blog,doc,version,page}?-" - */ common: { editThisPage: 'theme-edit-this-page', lastUpdated: 'theme-last-updated', backToTopButton: 'theme-back-to-top-button', codeBlock: 'theme-code-block', + admonition: 'theme-admonition', }, layout: { // TODO add other stable classNames here }, + + /** + * Follows the naming convention "theme-{blog,doc,version,page}?-" + */ docs: { docVersionBanner: 'theme-doc-version-banner', docVersionBadge: 'theme-doc-version-badge', From fcc5451d80612d6f30f074ab9780a71b8b371dc9 Mon Sep 17 00:00:00 2001 From: sebastienlorber Date: Fri, 3 Jun 2022 15:50:02 +0200 Subject: [PATCH 2/6] add admonition default label translations --- .../src/theme/Admonition/index.tsx | 73 ++++++++++++++----- .../src/utils/ThemeClassNames.ts | 2 + 2 files changed, 58 insertions(+), 17 deletions(-) diff --git a/packages/docusaurus-theme-classic/src/theme/Admonition/index.tsx b/packages/docusaurus-theme-classic/src/theme/Admonition/index.tsx index 71388a1e6fe4..b1f9e8b2c31d 100644 --- a/packages/docusaurus-theme-classic/src/theme/Admonition/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Admonition/index.tsx @@ -8,6 +8,7 @@ import React, {type ReactNode} from 'react'; import clsx from 'clsx'; import {ThemeClassNames} from '@docusaurus/theme-common'; +import Translate from '@docusaurus/Translate'; import type {Props} from '@theme/Admonition'; import styles from './styles.module.css'; @@ -70,41 +71,82 @@ function CautionIcon() { type AdmonitionConfig = { iconComponent: React.ComponentType; infimaClassName: string; + label: ReactNode; }; -const AdmonitionConfigs: {[key: string]: AdmonitionConfig | string} = { +// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style +const AdmonitionConfigs: Record = { note: { infimaClassName: 'secondary', iconComponent: NoteIcon, + label: ( + + Note + + ), }, tip: { infimaClassName: 'success', iconComponent: TipIcon, + label: ( + + Tip + + ), }, danger: { infimaClassName: 'danger', iconComponent: DangerIcon, + label: ( + + Danger + + ), }, info: { infimaClassName: 'info', iconComponent: InfoIcon, + label: ( + + Danger + + ), }, caution: { infimaClassName: 'warning', iconComponent: CautionIcon, + label: ( + + Caution + + ), }, +}; + +// Legacy aliases, undocumented but kept for retro-compatibility +const aliases = { secondary: 'note', important: 'info', success: 'tip', warning: 'danger', -}; +} as const; -function getAdmonitionConfig(type: string): AdmonitionConfig { +function getAdmonitionConfig( + unsafeType: Props['type'] | keyof typeof aliases, +): AdmonitionConfig { + const type = aliases[unsafeType as keyof typeof aliases] ?? unsafeType; const config = AdmonitionConfigs[type]; if (config) { - if (typeof config === 'string') { - return AdmonitionConfigs[config] as AdmonitionConfig; - } return config; } console.warn( @@ -137,33 +179,30 @@ function processAdmonitionProps(props: Props): Props { const {mdxAdmonitionTitle, rest} = extractMDXAdmonitionTitle(props.children); return { ...props, - title: props.title ?? mdxAdmonitionTitle ?? props.type, + title: props.title ?? mdxAdmonitionTitle, children: rest, }; } export default function Admonition(props: Props): JSX.Element { - const { - children, - type, - title = type, - icon: iconProp, - } = processAdmonitionProps(props); + const {children, type, title, icon: iconProp} = processAdmonitionProps(props); - const config = getAdmonitionConfig(type); - const {infimaClassName, iconComponent: IconComponent} = config; + const typeConfig = getAdmonitionConfig(type); + const titleLabel = title ?? typeConfig.label; + const {iconComponent: IconComponent} = typeConfig; const icon = iconProp ?? ; return (
{icon} - {title} + {titleLabel}
{children}
diff --git a/packages/docusaurus-theme-common/src/utils/ThemeClassNames.ts b/packages/docusaurus-theme-common/src/utils/ThemeClassNames.ts index 85449f463359..9b4623214b6f 100644 --- a/packages/docusaurus-theme-common/src/utils/ThemeClassNames.ts +++ b/packages/docusaurus-theme-common/src/utils/ThemeClassNames.ts @@ -37,6 +37,8 @@ export const ThemeClassNames = { backToTopButton: 'theme-back-to-top-button', codeBlock: 'theme-code-block', admonition: 'theme-admonition', + admonitionType: (type: 'note' | 'tip' | 'danger' | 'info' | 'caution') => + `theme-admonition-${type}`, }, layout: { // TODO add other stable classNames here From 548ffdc92b7026f253dc0ab25061b7d26855fc3b Mon Sep 17 00:00:00 2001 From: sebastienlorber Date: Fri, 3 Jun 2022 15:51:20 +0200 Subject: [PATCH 3/6] typo --- .../src/theme/Admonition/index.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/docusaurus-theme-classic/src/theme/Admonition/index.tsx b/packages/docusaurus-theme-classic/src/theme/Admonition/index.tsx index b1f9e8b2c31d..eab72eda3d6e 100644 --- a/packages/docusaurus-theme-classic/src/theme/Admonition/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/Admonition/index.tsx @@ -83,7 +83,7 @@ const AdmonitionConfigs: Record = { - Note + note ), }, @@ -94,7 +94,7 @@ const AdmonitionConfigs: Record = { - Tip + tip ), }, @@ -105,7 +105,7 @@ const AdmonitionConfigs: Record = { - Danger + danger ), }, @@ -116,7 +116,7 @@ const AdmonitionConfigs: Record = { - Danger + info ), }, @@ -127,7 +127,7 @@ const AdmonitionConfigs: Record = { - Caution + caution ), }, From 37e399dd0e4ea9d6bd01d9b671a31b6dd6ebaea9 Mon Sep 17 00:00:00 2001 From: sebastienlorber Date: Fri, 3 Jun 2022 15:52:28 +0200 Subject: [PATCH 4/6] add default theme translations --- .../locales/ar/theme-common.json | 5 +++++ .../locales/base/theme-common.json | 10 ++++++++++ .../locales/bn/theme-common.json | 5 +++++ .../locales/cs/theme-common.json | 5 +++++ .../locales/da/theme-common.json | 5 +++++ .../locales/de/theme-common.json | 5 +++++ .../locales/es/theme-common.json | 5 +++++ .../locales/fa/theme-common.json | 5 +++++ .../locales/fil/theme-common.json | 5 +++++ .../locales/fr/theme-common.json | 5 +++++ .../locales/he/theme-common.json | 5 +++++ .../locales/hi/theme-common.json | 5 +++++ .../locales/it/theme-common.json | 5 +++++ .../locales/ja/theme-common.json | 5 +++++ .../locales/ko/theme-common.json | 5 +++++ .../locales/pl/theme-common.json | 5 +++++ .../locales/pt-BR/theme-common.json | 5 +++++ .../locales/pt-PT/theme-common.json | 5 +++++ .../locales/ru/theme-common.json | 5 +++++ .../locales/sr/theme-common.json | 5 +++++ .../locales/tr/theme-common.json | 5 +++++ .../locales/vi/theme-common.json | 5 +++++ .../locales/zh-Hans/theme-common.json | 5 +++++ .../locales/zh-Hant/theme-common.json | 5 +++++ 24 files changed, 125 insertions(+) diff --git a/packages/docusaurus-theme-translations/locales/ar/theme-common.json b/packages/docusaurus-theme-translations/locales/ar/theme-common.json index 521762273a79..17ec4d109128 100644 --- a/packages/docusaurus-theme-translations/locales/ar/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/ar/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "يرجى الاتصال بمالك الموقع الذي ربطك بعنوان URL الأصلي وإخباره بأن الارتباط الخاص به معطل.", "theme.NotFound.title": "الصفحة غير موجودة", "theme.TOCCollapsible.toggleButtonLabel": "محتويات هذه الصفحة", + "theme.admonition.caution": "caution", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "note", + "theme.admonition.tip": "tip", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", "theme.blog.paginator.navAriaLabel": "التنقل في صفحة قائمة المدونة", diff --git a/packages/docusaurus-theme-translations/locales/base/theme-common.json b/packages/docusaurus-theme-translations/locales/base/theme-common.json index ce9fc1ad1f04..95743ca04339 100644 --- a/packages/docusaurus-theme-translations/locales/base/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/base/theme-common.json @@ -25,6 +25,16 @@ "theme.NotFound.title___DESCRIPTION": "The title of the 404 page", "theme.TOCCollapsible.toggleButtonLabel": "On this page", "theme.TOCCollapsible.toggleButtonLabel___DESCRIPTION": "The label used by the button on the collapsible TOC component", + "theme.admonition.caution": "caution", + "theme.admonition.caution___DESCRIPTION": "The default label used for the Caution admonition (:::caution)", + "theme.admonition.danger": "danger", + "theme.admonition.danger___DESCRIPTION": "The default label used for the Danger admonition (:::danger)", + "theme.admonition.info": "info", + "theme.admonition.info___DESCRIPTION": "The default label used for the Info admonition (:::info)", + "theme.admonition.note": "note", + "theme.admonition.note___DESCRIPTION": "The default label used for the Note admonition (:::note)", + "theme.admonition.tip": "tip", + "theme.admonition.tip___DESCRIPTION": "The default label used for the Tip admonition (:::tip)", "theme.blog.archive.description": "Archive", "theme.blog.archive.description___DESCRIPTION": "The page & hero description of the blog archive page", "theme.blog.archive.title": "Archive", diff --git a/packages/docusaurus-theme-translations/locales/bn/theme-common.json b/packages/docusaurus-theme-translations/locales/bn/theme-common.json index cb95a3ab12ed..9db8b9de8c09 100644 --- a/packages/docusaurus-theme-translations/locales/bn/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/bn/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "দয়া করে সাইটের মালিকের সাথে যোগাযোগ করুন যা আপনাকে মূল URL এর সাথে যুক্ত করেছে এবং তাদের লিঙ্কটি ভাঙ্গা রয়েছে তা তাদের জানান।", "theme.NotFound.title": "পেজটি খুঁজে পাওয়া যায়নি", "theme.TOCCollapsible.toggleButtonLabel": "এই পেজ এ রয়েছে", + "theme.admonition.caution": "caution", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "note", + "theme.admonition.tip": "tip", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", "theme.blog.paginator.navAriaLabel": "ব্লগ তালিকা পেজ নেভিগেশন", diff --git a/packages/docusaurus-theme-translations/locales/cs/theme-common.json b/packages/docusaurus-theme-translations/locales/cs/theme-common.json index acf608eb62b0..2256473958d4 100644 --- a/packages/docusaurus-theme-translations/locales/cs/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/cs/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "Kontaktujte prosím vlastníka webu, který vás odkázal na původní URL a upozorněte ho, že jejich odkaz nefunguje.", "theme.NotFound.title": "Stránka nenalezena", "theme.TOCCollapsible.toggleButtonLabel": "Na této stránce", + "theme.admonition.caution": "caution", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "note", + "theme.admonition.tip": "tip", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", "theme.blog.paginator.navAriaLabel": "Stránkování článků na blogu", diff --git a/packages/docusaurus-theme-translations/locales/da/theme-common.json b/packages/docusaurus-theme-translations/locales/da/theme-common.json index f085952d1f13..a96ad330cde4 100644 --- a/packages/docusaurus-theme-translations/locales/da/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/da/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "Venligst kontakt ejeren til webstedet, som førte dig frem denne URL, og informer dem om at linket ikke virker.", "theme.NotFound.title": "Siden blev ikke fundet", "theme.TOCCollapsible.toggleButtonLabel": "On this page", + "theme.admonition.caution": "caution", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "note", + "theme.admonition.tip": "tip", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", "theme.blog.paginator.navAriaLabel": "Blogoversigt navigation", diff --git a/packages/docusaurus-theme-translations/locales/de/theme-common.json b/packages/docusaurus-theme-translations/locales/de/theme-common.json index 610211f625e2..d302ecd4a0f6 100644 --- a/packages/docusaurus-theme-translations/locales/de/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/de/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "Bitte kontaktieren Sie den Besitzer der Seite, die Sie mit der ursprünglichen URL verlinkt hat, und teilen Sie ihm mit, dass der Link nicht mehr funktioniert.", "theme.NotFound.title": "Seite nicht gefunden", "theme.TOCCollapsible.toggleButtonLabel": "Auf dieser Seite", + "theme.admonition.caution": "caution", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "note", + "theme.admonition.tip": "tip", "theme.blog.archive.description": "Archiv", "theme.blog.archive.title": "Archiv", "theme.blog.paginator.navAriaLabel": "Navigation der Blog-Listenseite", diff --git a/packages/docusaurus-theme-translations/locales/es/theme-common.json b/packages/docusaurus-theme-translations/locales/es/theme-common.json index a20306646f00..a90504a2e1b9 100644 --- a/packages/docusaurus-theme-translations/locales/es/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/es/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "Comuníquese con el dueño del sitio que lo vinculó a la URL original y hágale saber que su vínculo está roto.", "theme.NotFound.title": "Página No Encontrada", "theme.TOCCollapsible.toggleButtonLabel": "En esta página", + "theme.admonition.caution": "caution", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "note", + "theme.admonition.tip": "tip", "theme.blog.archive.description": "Archivo", "theme.blog.archive.title": "Archivo", "theme.blog.paginator.navAriaLabel": "Navegación por la página de la lista de blogs ", diff --git a/packages/docusaurus-theme-translations/locales/fa/theme-common.json b/packages/docusaurus-theme-translations/locales/fa/theme-common.json index 7a49fae6a45c..7f5783d75a4a 100644 --- a/packages/docusaurus-theme-translations/locales/fa/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/fa/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "لطفا با صاحب وبسایت تماس بگیرید و ایشان را از مشکل پیش آمده مطلع کنید.", "theme.NotFound.title": "صفحه ای که دنبال آن بودید پیدا نشد.", "theme.TOCCollapsible.toggleButtonLabel": "مطالب این صفحه", + "theme.admonition.caution": "caution", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "note", + "theme.admonition.tip": "tip", "theme.blog.archive.description": "آرشیو", "theme.blog.archive.title": "آرشیو", "theme.blog.paginator.navAriaLabel": "کنترل لیست مطالب وبلاگ", diff --git a/packages/docusaurus-theme-translations/locales/fil/theme-common.json b/packages/docusaurus-theme-translations/locales/fil/theme-common.json index b0394d752120..49cb94da5ac9 100644 --- a/packages/docusaurus-theme-translations/locales/fil/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/fil/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "Mangyaring makipag-ugnayan sa may-ari ng site na nag-link sa iyo sa orihinal na URL at sabihin sa kanila na ang kanilang link ay putol.", "theme.NotFound.title": "Hindi Nahanap ang Pahina", "theme.TOCCollapsible.toggleButtonLabel": "On this page", + "theme.admonition.caution": "caution", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "note", + "theme.admonition.tip": "tip", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", "theme.blog.paginator.navAriaLabel": "Nabegasyón para sa pahina na listahan ng blog", diff --git a/packages/docusaurus-theme-translations/locales/fr/theme-common.json b/packages/docusaurus-theme-translations/locales/fr/theme-common.json index 72038899c7ec..2154533905dd 100644 --- a/packages/docusaurus-theme-translations/locales/fr/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/fr/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "Veuillez contacter le propriétaire du site qui vous a lié à l'URL d'origine et leur faire savoir que leur lien est cassé.", "theme.NotFound.title": "Page introuvable", "theme.TOCCollapsible.toggleButtonLabel": "Sur cette page", + "theme.admonition.caution": "attention", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "remarque", + "theme.admonition.tip": "astuce", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", "theme.blog.paginator.navAriaLabel": "Pagination de la liste des articles du blog", diff --git a/packages/docusaurus-theme-translations/locales/he/theme-common.json b/packages/docusaurus-theme-translations/locales/he/theme-common.json index 343bfd9cb701..f658c83b6534 100644 --- a/packages/docusaurus-theme-translations/locales/he/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/he/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "הקישור אינו תקין, אנא פנה למנהל האתר ממנו קיבלת קישור זה.", "theme.NotFound.title": "דף לא נמצא", "theme.TOCCollapsible.toggleButtonLabel": "בעמוד זה", + "theme.admonition.caution": "caution", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "note", + "theme.admonition.tip": "tip", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", "theme.blog.paginator.navAriaLabel": "רשימת דפי הבלוג", diff --git a/packages/docusaurus-theme-translations/locales/hi/theme-common.json b/packages/docusaurus-theme-translations/locales/hi/theme-common.json index 0bdb5ea4f2f4..ff35a0df2af5 100644 --- a/packages/docusaurus-theme-translations/locales/hi/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/hi/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "कृपया उस साइट के मालिक से संपर्क करें जिसने आपको मूल URL से जोड़ा है और उन्हें बताएं कि उनका लिंक टूट गया है।", "theme.NotFound.title": "पेज नहीं मिला", "theme.TOCCollapsible.toggleButtonLabel": "इस पेज पर", + "theme.admonition.caution": "caution", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "note", + "theme.admonition.tip": "tip", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", "theme.blog.paginator.navAriaLabel": "ब्लॉग सूची पेज नेविगेशन", diff --git a/packages/docusaurus-theme-translations/locales/it/theme-common.json b/packages/docusaurus-theme-translations/locales/it/theme-common.json index 1e23d07651f7..4c69f66091fd 100644 --- a/packages/docusaurus-theme-translations/locales/it/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/it/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "Contatta il proprietario del sito che ti ha collegato all'URL originale e fagli sapere che il loro collegamento è interrotto.", "theme.NotFound.title": "Pagina non trovata", "theme.TOCCollapsible.toggleButtonLabel": "Su questa pagina", + "theme.admonition.caution": "caution", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "note", + "theme.admonition.tip": "tip", "theme.blog.archive.description": "Archivio", "theme.blog.archive.title": "Archivio", "theme.blog.paginator.navAriaLabel": "Navigazione nella pagina dei post del blog ", diff --git a/packages/docusaurus-theme-translations/locales/ja/theme-common.json b/packages/docusaurus-theme-translations/locales/ja/theme-common.json index 66f9309ce407..42a6a06af877 100644 --- a/packages/docusaurus-theme-translations/locales/ja/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/ja/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "このページにリンクしているサイトの所有者に連絡をしてリンクが壊れていることを伝えてください。", "theme.NotFound.title": "ページが見つかりません", "theme.TOCCollapsible.toggleButtonLabel": "On this page", + "theme.admonition.caution": "caution", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "note", + "theme.admonition.tip": "tip", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", "theme.blog.paginator.navAriaLabel": "ブログ記事一覧のナビゲーション", diff --git a/packages/docusaurus-theme-translations/locales/ko/theme-common.json b/packages/docusaurus-theme-translations/locales/ko/theme-common.json index 16ffecaeae75..13785e212ba2 100644 --- a/packages/docusaurus-theme-translations/locales/ko/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/ko/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "사이트 관리자에게 링크가 깨진 것을 알려주세요.", "theme.NotFound.title": "페이지를 찾을 수 없습니다.", "theme.TOCCollapsible.toggleButtonLabel": "이 페이지에서", + "theme.admonition.caution": "caution", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "note", + "theme.admonition.tip": "tip", "theme.blog.archive.description": "게시물 목록", "theme.blog.archive.title": "게시물 목록", "theme.blog.paginator.navAriaLabel": "블로그 게시물 목록 탐색", diff --git a/packages/docusaurus-theme-translations/locales/pl/theme-common.json b/packages/docusaurus-theme-translations/locales/pl/theme-common.json index 551d28dcc558..a28dedf0c9f5 100644 --- a/packages/docusaurus-theme-translations/locales/pl/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/pl/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "Proszę skontaktuj się z właścielem strony, z której link doprowadził Cię tutaj i poinformuj go, że link jest nieprawidłowy.", "theme.NotFound.title": "Strona nie została znaleziona", "theme.TOCCollapsible.toggleButtonLabel": "Na tej stronie", + "theme.admonition.caution": "caution", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "note", + "theme.admonition.tip": "tip", "theme.blog.archive.description": "Archiwum", "theme.blog.archive.title": "Archiwum", "theme.blog.paginator.navAriaLabel": "Nawigacja na stronie listy wpisów na blogu", diff --git a/packages/docusaurus-theme-translations/locales/pt-BR/theme-common.json b/packages/docusaurus-theme-translations/locales/pt-BR/theme-common.json index 1d106dc059b4..7f9ec716fedd 100644 --- a/packages/docusaurus-theme-translations/locales/pt-BR/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/pt-BR/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "Entre em contato com o proprietário do site que lhe trouxe para cá e lhe informe que o link está quebrado.", "theme.NotFound.title": "Página não encontrada", "theme.TOCCollapsible.toggleButtonLabel": "Nessa página", + "theme.admonition.caution": "caution", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "note", + "theme.admonition.tip": "tip", "theme.blog.archive.description": "Arquivo", "theme.blog.archive.title": "Arquivo", "theme.blog.paginator.navAriaLabel": "Navegação da página de listagem do blog", diff --git a/packages/docusaurus-theme-translations/locales/pt-PT/theme-common.json b/packages/docusaurus-theme-translations/locales/pt-PT/theme-common.json index e751770beb70..11788c591cb4 100644 --- a/packages/docusaurus-theme-translations/locales/pt-PT/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/pt-PT/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "Por favor, contacte o proprietário do site que o trouxe aqui e informe-lhe que o link está partido.", "theme.NotFound.title": "Página não encontrada", "theme.TOCCollapsible.toggleButtonLabel": "On this page", + "theme.admonition.caution": "caution", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "note", + "theme.admonition.tip": "tip", "theme.blog.archive.description": "Archive", "theme.blog.archive.title": "Archive", "theme.blog.paginator.navAriaLabel": "Navegação da página de listagem do blog", diff --git a/packages/docusaurus-theme-translations/locales/ru/theme-common.json b/packages/docusaurus-theme-translations/locales/ru/theme-common.json index 18fa1dd8b3db..97b38b8532dc 100644 --- a/packages/docusaurus-theme-translations/locales/ru/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/ru/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "Пожалуйста, обратитесь к владельцу сайта, с которого вы перешли на эту ссылку, чтобы сообщить ему, что ссылка не работает.", "theme.NotFound.title": "Страница не найдена", "theme.TOCCollapsible.toggleButtonLabel": "Содержание этой страницы", + "theme.admonition.caution": "caution", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "note", + "theme.admonition.tip": "tip", "theme.blog.archive.description": "Архив", "theme.blog.archive.title": "Архив", "theme.blog.paginator.navAriaLabel": "Навигация по странице списка блогов", diff --git a/packages/docusaurus-theme-translations/locales/sr/theme-common.json b/packages/docusaurus-theme-translations/locales/sr/theme-common.json index 4fe255281bf4..152b345efef0 100644 --- a/packages/docusaurus-theme-translations/locales/sr/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/sr/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "Молимо вас да контактирате власника сајта који вас је упутио овде и обавестите га да је њихова веза нетачна.", "theme.NotFound.title": "Страница није пронађена", "theme.TOCCollapsible.toggleButtonLabel": "На овој страници", + "theme.admonition.caution": "caution", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "note", + "theme.admonition.tip": "tip", "theme.blog.archive.description": "Архива", "theme.blog.archive.title": "Архива", "theme.blog.paginator.navAriaLabel": "Навигација за странице блога", diff --git a/packages/docusaurus-theme-translations/locales/tr/theme-common.json b/packages/docusaurus-theme-translations/locales/tr/theme-common.json index b397fc548346..2131b5f45bca 100644 --- a/packages/docusaurus-theme-translations/locales/tr/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/tr/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "Lütfen sizi orijinal URL'ye yönlendiren sitenin sahibiyle iletişime geçin ve bağlantısının bozuk olduğunu bildirin.", "theme.NotFound.title": "Sayfa Bulunamadı", "theme.TOCCollapsible.toggleButtonLabel": "Bu sayfada", + "theme.admonition.caution": "caution", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "note", + "theme.admonition.tip": "tip", "theme.blog.archive.description": "Arşiv", "theme.blog.archive.title": "Arşiv", "theme.blog.paginator.navAriaLabel": "Blog gönderi sayfası navigasyonu", diff --git a/packages/docusaurus-theme-translations/locales/vi/theme-common.json b/packages/docusaurus-theme-translations/locales/vi/theme-common.json index 82bc3e3a413d..b22334a7cc11 100644 --- a/packages/docusaurus-theme-translations/locales/vi/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/vi/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "Vui lòng liên hệ với trang web đã dẫn bạn tới đây và thông báo cho họ biết rằng đường dẫn này bị hỏng.", "theme.NotFound.title": "Không tìm thấy trang", "theme.TOCCollapsible.toggleButtonLabel": "Trên trang này", + "theme.admonition.caution": "caution", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "note", + "theme.admonition.tip": "tip", "theme.blog.archive.description": "Lưu trữ", "theme.blog.archive.title": "Lưu trữ", "theme.blog.paginator.navAriaLabel": "Thanh điều hướng của trang danh sách bài viết", diff --git a/packages/docusaurus-theme-translations/locales/zh-Hans/theme-common.json b/packages/docusaurus-theme-translations/locales/zh-Hans/theme-common.json index f2ed51faaed3..8fe941c0032e 100644 --- a/packages/docusaurus-theme-translations/locales/zh-Hans/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/zh-Hans/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "请联系原始链接来源网站的所有者,并告知他们链接已损坏。", "theme.NotFound.title": "找不到页面", "theme.TOCCollapsible.toggleButtonLabel": "本页总览", + "theme.admonition.caution": "caution", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "note", + "theme.admonition.tip": "tip", "theme.blog.archive.description": "历史博文", "theme.blog.archive.title": "历史博文", "theme.blog.paginator.navAriaLabel": "博文列表分页导航", diff --git a/packages/docusaurus-theme-translations/locales/zh-Hant/theme-common.json b/packages/docusaurus-theme-translations/locales/zh-Hant/theme-common.json index 835d08b21a6f..f3e9531e253e 100644 --- a/packages/docusaurus-theme-translations/locales/zh-Hant/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/zh-Hant/theme-common.json @@ -12,6 +12,11 @@ "theme.NotFound.p2": "請聯絡原始連結來源網站的所有者,並通知他們連結已毀損。", "theme.NotFound.title": "找不到頁面", "theme.TOCCollapsible.toggleButtonLabel": "本頁導覽", + "theme.admonition.caution": "caution", + "theme.admonition.danger": "danger", + "theme.admonition.info": "info", + "theme.admonition.note": "note", + "theme.admonition.tip": "tip", "theme.blog.archive.description": "歷史文章", "theme.blog.archive.title": "歷史文章", "theme.blog.paginator.navAriaLabel": "部落格文章列表分頁導覽", From ba7b4bcb5b3a8992ed32ab3eb75eb27ab6c40f5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lorber?= Date: Fri, 3 Jun 2022 16:24:15 +0200 Subject: [PATCH 5/6] zh-Hant translations Co-authored-by: Joshua Chen --- .../locales/zh-Hant/theme-common.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/docusaurus-theme-translations/locales/zh-Hant/theme-common.json b/packages/docusaurus-theme-translations/locales/zh-Hant/theme-common.json index f3e9531e253e..4f399a4a026c 100644 --- a/packages/docusaurus-theme-translations/locales/zh-Hant/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/zh-Hant/theme-common.json @@ -12,11 +12,11 @@ "theme.NotFound.p2": "請聯絡原始連結來源網站的所有者,並通知他們連結已毀損。", "theme.NotFound.title": "找不到頁面", "theme.TOCCollapsible.toggleButtonLabel": "本頁導覽", - "theme.admonition.caution": "caution", - "theme.admonition.danger": "danger", - "theme.admonition.info": "info", - "theme.admonition.note": "note", - "theme.admonition.tip": "tip", + "theme.admonition.caution": "警告", + "theme.admonition.danger": "危險", + "theme.admonition.info": "信息", + "theme.admonition.note": "注意", + "theme.admonition.tip": "提示", "theme.blog.archive.description": "歷史文章", "theme.blog.archive.title": "歷史文章", "theme.blog.paginator.navAriaLabel": "部落格文章列表分頁導覽", From 5d6bc1538ee1844c4a6b90d9971b5d5fff1a9f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lorber?= Date: Fri, 3 Jun 2022 16:24:30 +0200 Subject: [PATCH 6/6] zh-Hans translations Co-authored-by: Joshua Chen --- .../locales/zh-Hans/theme-common.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/docusaurus-theme-translations/locales/zh-Hans/theme-common.json b/packages/docusaurus-theme-translations/locales/zh-Hans/theme-common.json index 8fe941c0032e..33cb2c33e4d1 100644 --- a/packages/docusaurus-theme-translations/locales/zh-Hans/theme-common.json +++ b/packages/docusaurus-theme-translations/locales/zh-Hans/theme-common.json @@ -12,11 +12,11 @@ "theme.NotFound.p2": "请联系原始链接来源网站的所有者,并告知他们链接已损坏。", "theme.NotFound.title": "找不到页面", "theme.TOCCollapsible.toggleButtonLabel": "本页总览", - "theme.admonition.caution": "caution", - "theme.admonition.danger": "danger", - "theme.admonition.info": "info", - "theme.admonition.note": "note", - "theme.admonition.tip": "tip", + "theme.admonition.caution": "警告", + "theme.admonition.danger": "危险", + "theme.admonition.info": "信息", + "theme.admonition.note": "注意", + "theme.admonition.tip": "提示", "theme.blog.archive.description": "历史博文", "theme.blog.archive.title": "历史博文", "theme.blog.paginator.navAriaLabel": "博文列表分页导航",