mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-22 05:27:00 +02:00
feat(theme-classic): toggle code wrap button (#7036)
Co-authored-by: Sébastien Lorber <slorber@users.noreply.github.com> Co-authored-by: sebastienlorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
c3add31ebf
commit
4e4aa6add7
33 changed files with 204 additions and 24 deletions
|
@ -165,6 +165,7 @@ declare module '@theme/CodeBlock' {
|
||||||
declare module '@theme/CodeBlock/CopyButton' {
|
declare module '@theme/CodeBlock/CopyButton' {
|
||||||
export interface Props {
|
export interface Props {
|
||||||
readonly code: string;
|
readonly code: string;
|
||||||
|
readonly className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function CopyButton(props: Props): JSX.Element;
|
export default function CopyButton(props: Props): JSX.Element;
|
||||||
|
@ -220,6 +221,16 @@ declare module '@theme/CodeBlock/Line' {
|
||||||
export default function CodeBlockLine(props: Props): JSX.Element;
|
export default function CodeBlockLine(props: Props): JSX.Element;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declare module '@theme/CodeBlock/WordWrapButton' {
|
||||||
|
export interface Props {
|
||||||
|
readonly className?: string;
|
||||||
|
readonly onClick: React.MouseEventHandler;
|
||||||
|
readonly isEnabled: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function WordWrapButton(props: Props): JSX.Element;
|
||||||
|
}
|
||||||
|
|
||||||
declare module '@theme/DocCard' {
|
declare module '@theme/DocCard' {
|
||||||
import type {PropSidebarItem} from '@docusaurus/plugin-content-docs';
|
import type {PropSidebarItem} from '@docusaurus/plugin-content-docs';
|
||||||
|
|
||||||
|
|
|
@ -13,11 +13,13 @@ import {
|
||||||
parseLines,
|
parseLines,
|
||||||
containsLineNumbers,
|
containsLineNumbers,
|
||||||
usePrismTheme,
|
usePrismTheme,
|
||||||
|
useCodeWordWrap,
|
||||||
} from '@docusaurus/theme-common';
|
} from '@docusaurus/theme-common';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import Highlight, {defaultProps, type Language} from 'prism-react-renderer';
|
import Highlight, {defaultProps, type Language} from 'prism-react-renderer';
|
||||||
import Line from '@theme/CodeBlock/Line';
|
import Line from '@theme/CodeBlock/Line';
|
||||||
import CopyButton from '@theme/CodeBlock/CopyButton';
|
import CopyButton from '@theme/CodeBlock/CopyButton';
|
||||||
|
import WordWrapButton from '@theme/CodeBlock/WordWrapButton';
|
||||||
import Container from '@theme/CodeBlock/Container';
|
import Container from '@theme/CodeBlock/Container';
|
||||||
import type {Props} from '@theme/CodeBlock/Content/String';
|
import type {Props} from '@theme/CodeBlock/Content/String';
|
||||||
|
|
||||||
|
@ -37,6 +39,7 @@ export default function CodeBlockString({
|
||||||
const language =
|
const language =
|
||||||
languageProp ?? parseLanguage(blockClassName) ?? defaultLanguage;
|
languageProp ?? parseLanguage(blockClassName) ?? defaultLanguage;
|
||||||
const prismTheme = usePrismTheme();
|
const prismTheme = usePrismTheme();
|
||||||
|
const wordWrap = useCodeWordWrap();
|
||||||
|
|
||||||
// We still parse the metastring in case we want to support more syntax in the
|
// We still parse the metastring in case we want to support more syntax in the
|
||||||
// future. Note that MDX doesn't strip quotes when parsing metastring:
|
// future. Note that MDX doesn't strip quotes when parsing metastring:
|
||||||
|
@ -67,6 +70,7 @@ export default function CodeBlockString({
|
||||||
<pre
|
<pre
|
||||||
/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */
|
/* eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex */
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
|
ref={wordWrap.codeBlockRef}
|
||||||
className={clsx(className, styles.codeBlock, 'thin-scrollbar')}>
|
className={clsx(className, styles.codeBlock, 'thin-scrollbar')}>
|
||||||
<code
|
<code
|
||||||
className={clsx(
|
className={clsx(
|
||||||
|
@ -87,7 +91,16 @@ export default function CodeBlockString({
|
||||||
</pre>
|
</pre>
|
||||||
)}
|
)}
|
||||||
</Highlight>
|
</Highlight>
|
||||||
<CopyButton code={code} />
|
<div className={styles.buttonGroup}>
|
||||||
|
{(wordWrap.isEnabled || wordWrap.isCodeScrollable) && (
|
||||||
|
<WordWrapButton
|
||||||
|
className={styles.codeButton}
|
||||||
|
onClick={() => wordWrap.toggle()}
|
||||||
|
isEnabled={wordWrap.isEnabled}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<CopyButton className={styles.codeButton} code={code} />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
|
|
|
@ -54,3 +54,33 @@
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.buttonGroup {
|
||||||
|
display: flex;
|
||||||
|
column-gap: 0.2rem;
|
||||||
|
position: absolute;
|
||||||
|
right: calc(var(--ifm-pre-padding) / 2);
|
||||||
|
top: calc(var(--ifm-pre-padding) / 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.buttonGroup button {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background: var(--prism-background-color);
|
||||||
|
color: var(--prism-color);
|
||||||
|
border: 1px solid var(--ifm-color-emphasis-300);
|
||||||
|
border-radius: var(--ifm-global-radius);
|
||||||
|
padding: 0.4rem;
|
||||||
|
line-height: 0;
|
||||||
|
transition: opacity 200ms ease-in-out;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.buttonGroup button:focus-visible,
|
||||||
|
.buttonGroup button:hover {
|
||||||
|
opacity: 1 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
:global(.theme-code-block:hover) .buttonGroup button {
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@ import type {Props} from '@theme/CodeBlock/CopyButton';
|
||||||
|
|
||||||
import styles from './styles.module.css';
|
import styles from './styles.module.css';
|
||||||
|
|
||||||
export default function CopyButton({code}: Props): JSX.Element {
|
export default function CopyButton({code, className}: Props): JSX.Element {
|
||||||
const [isCopied, setIsCopied] = useState(false);
|
const [isCopied, setIsCopied] = useState(false);
|
||||||
const copyTimeout = useRef<number | undefined>(undefined);
|
const copyTimeout = useRef<number | undefined>(undefined);
|
||||||
const handleCopyCode = useCallback(() => {
|
const handleCopyCode = useCallback(() => {
|
||||||
|
@ -48,8 +48,9 @@ export default function CopyButton({code}: Props): JSX.Element {
|
||||||
description: 'The copy button label on code blocks',
|
description: 'The copy button label on code blocks',
|
||||||
})}
|
})}
|
||||||
className={clsx(
|
className={clsx(
|
||||||
styles.copyButton,
|
|
||||||
'clean-btn',
|
'clean-btn',
|
||||||
|
className,
|
||||||
|
styles.copyButton,
|
||||||
isCopied && styles.copyButtonCopied,
|
isCopied && styles.copyButtonCopied,
|
||||||
)}
|
)}
|
||||||
onClick={handleCopyCode}>
|
onClick={handleCopyCode}>
|
||||||
|
|
|
@ -5,31 +5,10 @@
|
||||||
* LICENSE file in the root directory of this source tree.
|
* LICENSE file in the root directory of this source tree.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.copyButton {
|
|
||||||
display: flex;
|
|
||||||
/* TODO: move to base button styling */
|
|
||||||
background: var(--prism-background-color);
|
|
||||||
color: var(--prism-color);
|
|
||||||
border: 1px solid var(--ifm-color-emphasis-300);
|
|
||||||
border-radius: var(--ifm-global-radius);
|
|
||||||
padding: 0.4rem;
|
|
||||||
position: absolute;
|
|
||||||
right: calc(var(--ifm-pre-padding) / 2);
|
|
||||||
top: calc(var(--ifm-pre-padding) / 2);
|
|
||||||
transition: opacity 200ms ease-in-out;
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.copyButton:focus-visible,
|
|
||||||
.copyButton:hover,
|
|
||||||
:global(.theme-code-block:hover) .copyButtonCopied {
|
:global(.theme-code-block:hover) .copyButtonCopied {
|
||||||
opacity: 1 !important;
|
opacity: 1 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
:global(.theme-code-block:hover) .copyButton:not(.copyButtonCopied) {
|
|
||||||
opacity: 0.4;
|
|
||||||
}
|
|
||||||
|
|
||||||
.copyButtonIcons {
|
.copyButtonIcons {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 1.125rem;
|
width: 1.125rem;
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
/**
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
import clsx from 'clsx';
|
||||||
|
import {translate} from '@docusaurus/Translate';
|
||||||
|
import type {Props} from '@theme/CodeBlock/WordWrapButton';
|
||||||
|
|
||||||
|
import styles from './styles.module.css';
|
||||||
|
|
||||||
|
export default function WordWrapButton({
|
||||||
|
className,
|
||||||
|
onClick,
|
||||||
|
isEnabled,
|
||||||
|
}: Props): JSX.Element | null {
|
||||||
|
const title = translate({
|
||||||
|
id: 'theme.CodeBlock.wordWrapToggle',
|
||||||
|
message: 'Toggle word wrap',
|
||||||
|
description:
|
||||||
|
'The title attribute for toggle word wrapping button of code block lines',
|
||||||
|
});
|
||||||
|
|
||||||
|
return (
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={onClick}
|
||||||
|
className={clsx(
|
||||||
|
'clean-btn',
|
||||||
|
className,
|
||||||
|
isEnabled && styles.wordWrapButtonEnabled,
|
||||||
|
)}
|
||||||
|
aria-label={title}
|
||||||
|
title={title}>
|
||||||
|
<svg
|
||||||
|
className={styles.wordWrapButtonIcon}
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
aria-hidden="true">
|
||||||
|
<path
|
||||||
|
fill="currentColor"
|
||||||
|
d="M4 19h6v-2H4v2zM20 5H4v2h16V5zm-3 6H4v2h13.25c1.1 0 2 .9 2 2s-.9 2-2 2H15v-2l-3 3l3 3v-2h2c2.21 0 4-1.79 4-4s-1.79-4-4-4z"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
);
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
/**
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
.wordWrapButtonIcon {
|
||||||
|
width: 1.2rem;
|
||||||
|
height: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wordWrapButtonEnabled .wordWrapButtonIcon {
|
||||||
|
color: var(--ifm-color-primary);
|
||||||
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
/**
|
||||||
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the MIT license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import type {RefObject} from 'react';
|
||||||
|
import {useState, useCallback, useEffect, useRef} from 'react';
|
||||||
|
|
||||||
|
export function useCodeWordWrap(): {
|
||||||
|
readonly codeBlockRef: RefObject<HTMLPreElement>;
|
||||||
|
readonly isEnabled: boolean;
|
||||||
|
readonly isCodeScrollable: boolean;
|
||||||
|
readonly toggle: () => void;
|
||||||
|
} {
|
||||||
|
const [isEnabled, setIsEnabled] = useState(false);
|
||||||
|
const [isCodeScrollable, setIsCodeScrollable] = useState<boolean>(false);
|
||||||
|
const codeBlockRef = useRef<HTMLPreElement>(null);
|
||||||
|
|
||||||
|
const toggle = useCallback(() => {
|
||||||
|
const codeElement = codeBlockRef.current!.querySelector('code')!;
|
||||||
|
|
||||||
|
if (isEnabled) {
|
||||||
|
codeElement.removeAttribute('style');
|
||||||
|
} else {
|
||||||
|
codeElement.style.whiteSpace = 'pre-wrap';
|
||||||
|
}
|
||||||
|
|
||||||
|
setIsEnabled((value) => !value);
|
||||||
|
}, [codeBlockRef, isEnabled]);
|
||||||
|
|
||||||
|
const updateCodeIsScrollable = useCallback(() => {
|
||||||
|
const {scrollWidth, clientWidth} = codeBlockRef.current!;
|
||||||
|
const isScrollable =
|
||||||
|
scrollWidth > clientWidth ||
|
||||||
|
codeBlockRef.current!.querySelector('code')!.hasAttribute('style');
|
||||||
|
setIsCodeScrollable(isScrollable);
|
||||||
|
}, [codeBlockRef]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
updateCodeIsScrollable();
|
||||||
|
}, [isEnabled, updateCodeIsScrollable]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
window.addEventListener('resize', updateCodeIsScrollable, {
|
||||||
|
passive: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
window.removeEventListener('resize', updateCodeIsScrollable);
|
||||||
|
};
|
||||||
|
}, [updateCodeIsScrollable]);
|
||||||
|
|
||||||
|
return {codeBlockRef, isEnabled, isCodeScrollable, toggle};
|
||||||
|
}
|
|
@ -158,3 +158,4 @@ export {usePrismTheme} from './hooks/usePrismTheme';
|
||||||
export {useLockBodyScroll} from './hooks/useLockBodyScroll';
|
export {useLockBodyScroll} from './hooks/useLockBodyScroll';
|
||||||
export {useWindowSize} from './hooks/useWindowSize';
|
export {useWindowSize} from './hooks/useWindowSize';
|
||||||
export {useSearchPage} from './hooks/useSearchPage';
|
export {useSearchPage} from './hooks/useSearchPage';
|
||||||
|
export {useCodeWordWrap} from './hooks/useCodeWordWrap';
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "تم النسخ",
|
"theme.CodeBlock.copied": "تم النسخ",
|
||||||
"theme.CodeBlock.copy": "نسخ",
|
"theme.CodeBlock.copy": "نسخ",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "نسخ الرمز إلى الحافظة",
|
"theme.CodeBlock.copyButtonAriaLabel": "نسخ الرمز إلى الحافظة",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
||||||
"theme.ErrorPageContent.title": "This page crashed.",
|
"theme.ErrorPageContent.title": "This page crashed.",
|
||||||
"theme.ErrorPageContent.tryAgain": "Try again",
|
"theme.ErrorPageContent.tryAgain": "Try again",
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
"theme.CodeBlock.copy___DESCRIPTION": "The copy button label on code blocks",
|
"theme.CodeBlock.copy___DESCRIPTION": "The copy button label on code blocks",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "Copy code to clipboard",
|
"theme.CodeBlock.copyButtonAriaLabel": "Copy code to clipboard",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel___DESCRIPTION": "The ARIA label for copy code blocks button",
|
"theme.CodeBlock.copyButtonAriaLabel___DESCRIPTION": "The ARIA label for copy code blocks button",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
|
"theme.CodeBlock.wordWrapToggle___DESCRIPTION": "The title attribute for toggle word wrapping button of code block lines",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel___DESCRIPTION": "The ARIA label to toggle the collapsible sidebar category",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel___DESCRIPTION": "The ARIA label to toggle the collapsible sidebar category",
|
||||||
"theme.ErrorPageContent.title": "This page crashed.",
|
"theme.ErrorPageContent.title": "This page crashed.",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "কপিড",
|
"theme.CodeBlock.copied": "কপিড",
|
||||||
"theme.CodeBlock.copy": "কপি",
|
"theme.CodeBlock.copy": "কপি",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "ক্লিপবোর্ডে কোড কপি করুন",
|
"theme.CodeBlock.copyButtonAriaLabel": "ক্লিপবোর্ডে কোড কপি করুন",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
||||||
"theme.ErrorPageContent.title": "This page crashed.",
|
"theme.ErrorPageContent.title": "This page crashed.",
|
||||||
"theme.ErrorPageContent.tryAgain": "Try again",
|
"theme.ErrorPageContent.tryAgain": "Try again",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "Zkopírováno",
|
"theme.CodeBlock.copied": "Zkopírováno",
|
||||||
"theme.CodeBlock.copy": "Zkopírovat",
|
"theme.CodeBlock.copy": "Zkopírovat",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "Zkopírovat kód do schránky",
|
"theme.CodeBlock.copyButtonAriaLabel": "Zkopírovat kód do schránky",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
||||||
"theme.ErrorPageContent.title": "This page crashed.",
|
"theme.ErrorPageContent.title": "This page crashed.",
|
||||||
"theme.ErrorPageContent.tryAgain": "Try again",
|
"theme.ErrorPageContent.tryAgain": "Try again",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "Kopieret",
|
"theme.CodeBlock.copied": "Kopieret",
|
||||||
"theme.CodeBlock.copy": "Kopier",
|
"theme.CodeBlock.copy": "Kopier",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "Kopier kode til udklipsholder",
|
"theme.CodeBlock.copyButtonAriaLabel": "Kopier kode til udklipsholder",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
||||||
"theme.ErrorPageContent.title": "This page crashed.",
|
"theme.ErrorPageContent.title": "This page crashed.",
|
||||||
"theme.ErrorPageContent.tryAgain": "Try again",
|
"theme.ErrorPageContent.tryAgain": "Try again",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "Kopiert",
|
"theme.CodeBlock.copied": "Kopiert",
|
||||||
"theme.CodeBlock.copy": "Kopieren",
|
"theme.CodeBlock.copy": "Kopieren",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "In die Zwischenablage kopieren",
|
"theme.CodeBlock.copyButtonAriaLabel": "In die Zwischenablage kopieren",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Umschalten der Seitenleiste mit einklappbarer Kategorie '{label}'",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Umschalten der Seitenleiste mit einklappbarer Kategorie '{label}'",
|
||||||
"theme.ErrorPageContent.title": "Die Seite ist abgestürzt.",
|
"theme.ErrorPageContent.title": "Die Seite ist abgestürzt.",
|
||||||
"theme.ErrorPageContent.tryAgain": "Nochmal versuchen",
|
"theme.ErrorPageContent.tryAgain": "Nochmal versuchen",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "Copiado",
|
"theme.CodeBlock.copied": "Copiado",
|
||||||
"theme.CodeBlock.copy": "Copiar",
|
"theme.CodeBlock.copy": "Copiar",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "Copiar código al portapapeles",
|
"theme.CodeBlock.copyButtonAriaLabel": "Copiar código al portapapeles",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
||||||
"theme.ErrorPageContent.title": "This page crashed.",
|
"theme.ErrorPageContent.title": "This page crashed.",
|
||||||
"theme.ErrorPageContent.tryAgain": "Try again",
|
"theme.ErrorPageContent.tryAgain": "Try again",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "کپی شد",
|
"theme.CodeBlock.copied": "کپی شد",
|
||||||
"theme.CodeBlock.copy": "کپی",
|
"theme.CodeBlock.copy": "کپی",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "کپی به کلیپ بورد",
|
"theme.CodeBlock.copyButtonAriaLabel": "کپی به کلیپ بورد",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
||||||
"theme.ErrorPageContent.title": "This page crashed.",
|
"theme.ErrorPageContent.title": "This page crashed.",
|
||||||
"theme.ErrorPageContent.tryAgain": "Try again",
|
"theme.ErrorPageContent.tryAgain": "Try again",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "Kinopya",
|
"theme.CodeBlock.copied": "Kinopya",
|
||||||
"theme.CodeBlock.copy": "Kopyahin",
|
"theme.CodeBlock.copy": "Kopyahin",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "Kopyahin ang code sa clipboard",
|
"theme.CodeBlock.copyButtonAriaLabel": "Kopyahin ang code sa clipboard",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
||||||
"theme.ErrorPageContent.title": "This page crashed.",
|
"theme.ErrorPageContent.title": "This page crashed.",
|
||||||
"theme.ErrorPageContent.tryAgain": "Try again",
|
"theme.ErrorPageContent.tryAgain": "Try again",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "Copié",
|
"theme.CodeBlock.copied": "Copié",
|
||||||
"theme.CodeBlock.copy": "Copier",
|
"theme.CodeBlock.copy": "Copier",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "Copier le code",
|
"theme.CodeBlock.copyButtonAriaLabel": "Copier le code",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Basculer le retour à la ligne",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
||||||
"theme.ErrorPageContent.title": "Cette page a planté.",
|
"theme.ErrorPageContent.title": "Cette page a planté.",
|
||||||
"theme.ErrorPageContent.tryAgain": "Réessayer",
|
"theme.ErrorPageContent.tryAgain": "Réessayer",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "הועתק",
|
"theme.CodeBlock.copied": "הועתק",
|
||||||
"theme.CodeBlock.copy": "העתק",
|
"theme.CodeBlock.copy": "העתק",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "העתק קוד ללוח העריכה",
|
"theme.CodeBlock.copyButtonAriaLabel": "העתק קוד ללוח העריכה",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
||||||
"theme.ErrorPageContent.title": "This page crashed.",
|
"theme.ErrorPageContent.title": "This page crashed.",
|
||||||
"theme.ErrorPageContent.tryAgain": "Try again",
|
"theme.ErrorPageContent.tryAgain": "Try again",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "कॉपीड",
|
"theme.CodeBlock.copied": "कॉपीड",
|
||||||
"theme.CodeBlock.copy": "कॉपी",
|
"theme.CodeBlock.copy": "कॉपी",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "क्लिपबोर्ड पर कोड कॉपी करें",
|
"theme.CodeBlock.copyButtonAriaLabel": "क्लिपबोर्ड पर कोड कॉपी करें",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
||||||
"theme.ErrorPageContent.title": "This page crashed.",
|
"theme.ErrorPageContent.title": "This page crashed.",
|
||||||
"theme.ErrorPageContent.tryAgain": "Try again",
|
"theme.ErrorPageContent.tryAgain": "Try again",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "Copiato",
|
"theme.CodeBlock.copied": "Copiato",
|
||||||
"theme.CodeBlock.copy": "Copia",
|
"theme.CodeBlock.copy": "Copia",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "Copia il codice negli appunti",
|
"theme.CodeBlock.copyButtonAriaLabel": "Copia il codice negli appunti",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Attiva/disattiva la categoria '{label}' della barra laterale collassabile",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Attiva/disattiva la categoria '{label}' della barra laterale collassabile",
|
||||||
"theme.ErrorPageContent.title": "Questa pagina è andata in crash.",
|
"theme.ErrorPageContent.title": "Questa pagina è andata in crash.",
|
||||||
"theme.ErrorPageContent.tryAgain": "Prova di nuovo",
|
"theme.ErrorPageContent.tryAgain": "Prova di nuovo",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "コピーしました",
|
"theme.CodeBlock.copied": "コピーしました",
|
||||||
"theme.CodeBlock.copy": "コピー",
|
"theme.CodeBlock.copy": "コピー",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "クリップボードにコードをコピー",
|
"theme.CodeBlock.copyButtonAriaLabel": "クリップボードにコードをコピー",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
||||||
"theme.ErrorPageContent.title": "This page crashed.",
|
"theme.ErrorPageContent.title": "This page crashed.",
|
||||||
"theme.ErrorPageContent.tryAgain": "Try again",
|
"theme.ErrorPageContent.tryAgain": "Try again",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "복사했습니다",
|
"theme.CodeBlock.copied": "복사했습니다",
|
||||||
"theme.CodeBlock.copy": "복사",
|
"theme.CodeBlock.copy": "복사",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "클립보드에 코드 복사",
|
"theme.CodeBlock.copyButtonAriaLabel": "클립보드에 코드 복사",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "접을 수 있는 사이드바 분류 '{label}' 접기(펼치기)",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "접을 수 있는 사이드바 분류 '{label}' 접기(펼치기)",
|
||||||
"theme.ErrorPageContent.title": "페이지에 오류가 발생하였습니다.",
|
"theme.ErrorPageContent.title": "페이지에 오류가 발생하였습니다.",
|
||||||
"theme.ErrorPageContent.tryAgain": "다시 시도해 보세요",
|
"theme.ErrorPageContent.tryAgain": "다시 시도해 보세요",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "Skopiowano!",
|
"theme.CodeBlock.copied": "Skopiowano!",
|
||||||
"theme.CodeBlock.copy": "Kopiuj",
|
"theme.CodeBlock.copy": "Kopiuj",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "Kopiuj do schowka",
|
"theme.CodeBlock.copyButtonAriaLabel": "Kopiuj do schowka",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Przełącz zwijalną kategorię panelu bocznego '{label}'",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Przełącz zwijalną kategorię panelu bocznego '{label}'",
|
||||||
"theme.ErrorPageContent.title": "Ta strona uległa awarii.",
|
"theme.ErrorPageContent.title": "Ta strona uległa awarii.",
|
||||||
"theme.ErrorPageContent.tryAgain": "Spróbuj ponownie",
|
"theme.ErrorPageContent.tryAgain": "Spróbuj ponownie",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "Copiado",
|
"theme.CodeBlock.copied": "Copiado",
|
||||||
"theme.CodeBlock.copy": "Copiar",
|
"theme.CodeBlock.copy": "Copiar",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "Copiar código para a área de transferência",
|
"theme.CodeBlock.copyButtonAriaLabel": "Copiar código para a área de transferência",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
||||||
"theme.ErrorPageContent.title": "This page crashed.",
|
"theme.ErrorPageContent.title": "This page crashed.",
|
||||||
"theme.ErrorPageContent.tryAgain": "Try again",
|
"theme.ErrorPageContent.tryAgain": "Try again",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "Copiado",
|
"theme.CodeBlock.copied": "Copiado",
|
||||||
"theme.CodeBlock.copy": "Copiar",
|
"theme.CodeBlock.copy": "Copiar",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "Copiar código para a área de transferência",
|
"theme.CodeBlock.copyButtonAriaLabel": "Copiar código para a área de transferência",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
||||||
"theme.ErrorPageContent.title": "This page crashed.",
|
"theme.ErrorPageContent.title": "This page crashed.",
|
||||||
"theme.ErrorPageContent.tryAgain": "Try again",
|
"theme.ErrorPageContent.tryAgain": "Try again",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "Скопировано",
|
"theme.CodeBlock.copied": "Скопировано",
|
||||||
"theme.CodeBlock.copy": "Скопировать",
|
"theme.CodeBlock.copy": "Скопировать",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "Скопировать в буфер обмена",
|
"theme.CodeBlock.copyButtonAriaLabel": "Скопировать в буфер обмена",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Свернуть/развернуть категорию '{label}'",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Свернуть/развернуть категорию '{label}'",
|
||||||
"theme.ErrorPageContent.title": "На странице произошёл сбой.",
|
"theme.ErrorPageContent.title": "На странице произошёл сбой.",
|
||||||
"theme.ErrorPageContent.tryAgain": "Попробуйте ещё раз",
|
"theme.ErrorPageContent.tryAgain": "Попробуйте ещё раз",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "Копирано",
|
"theme.CodeBlock.copied": "Копирано",
|
||||||
"theme.CodeBlock.copy": "Копирај",
|
"theme.CodeBlock.copy": "Копирај",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "Копирај код у меморију",
|
"theme.CodeBlock.copyButtonAriaLabel": "Копирај код у меморију",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
||||||
"theme.ErrorPageContent.title": "This page crashed.",
|
"theme.ErrorPageContent.title": "This page crashed.",
|
||||||
"theme.ErrorPageContent.tryAgain": "Try again",
|
"theme.ErrorPageContent.tryAgain": "Try again",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "Kopyalandı",
|
"theme.CodeBlock.copied": "Kopyalandı",
|
||||||
"theme.CodeBlock.copy": "Kopyala",
|
"theme.CodeBlock.copy": "Kopyala",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "Kodu panoya kopyala",
|
"theme.CodeBlock.copyButtonAriaLabel": "Kodu panoya kopyala",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Toggle the collapsible sidebar category '{label}'",
|
||||||
"theme.ErrorPageContent.title": "This page crashed.",
|
"theme.ErrorPageContent.title": "This page crashed.",
|
||||||
"theme.ErrorPageContent.tryAgain": "Try again",
|
"theme.ErrorPageContent.tryAgain": "Try again",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "Đã sao chép",
|
"theme.CodeBlock.copied": "Đã sao chép",
|
||||||
"theme.CodeBlock.copy": "Sao chép",
|
"theme.CodeBlock.copy": "Sao chép",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "Sao chép code vào bộ nhớ tạm",
|
"theme.CodeBlock.copyButtonAriaLabel": "Sao chép code vào bộ nhớ tạm",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Chuyển đổi danh mục thanh bên có thể thu gọn '{label}'",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "Chuyển đổi danh mục thanh bên có thể thu gọn '{label}'",
|
||||||
"theme.ErrorPageContent.title": "Trang này đã bị lỗi.",
|
"theme.ErrorPageContent.title": "Trang này đã bị lỗi.",
|
||||||
"theme.ErrorPageContent.tryAgain": "Thử lại",
|
"theme.ErrorPageContent.tryAgain": "Thử lại",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "复制成功",
|
"theme.CodeBlock.copied": "复制成功",
|
||||||
"theme.CodeBlock.copy": "复制",
|
"theme.CodeBlock.copy": "复制",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "复制代码到剪贴板",
|
"theme.CodeBlock.copyButtonAriaLabel": "复制代码到剪贴板",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "打开/收起侧边栏菜单「{label}」",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "打开/收起侧边栏菜单「{label}」",
|
||||||
"theme.ErrorPageContent.title": "页面已崩溃。",
|
"theme.ErrorPageContent.title": "页面已崩溃。",
|
||||||
"theme.ErrorPageContent.tryAgain": "重试",
|
"theme.ErrorPageContent.tryAgain": "重试",
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
"theme.CodeBlock.copied": "複製成功",
|
"theme.CodeBlock.copied": "複製成功",
|
||||||
"theme.CodeBlock.copy": "複製",
|
"theme.CodeBlock.copy": "複製",
|
||||||
"theme.CodeBlock.copyButtonAriaLabel": "複製代碼至剪貼簿",
|
"theme.CodeBlock.copyButtonAriaLabel": "複製代碼至剪貼簿",
|
||||||
|
"theme.CodeBlock.wordWrapToggle": "Toggle word wrap",
|
||||||
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "打開/收起側邊欄選單「{label}」",
|
"theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": "打開/收起側邊欄選單「{label}」",
|
||||||
"theme.ErrorPageContent.title": "此頁已當機。",
|
"theme.ErrorPageContent.title": "此頁已當機。",
|
||||||
"theme.ErrorPageContent.tryAgain": "重試",
|
"theme.ErrorPageContent.tryAgain": "重試",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue