From 947ae85c8a31855d64f5ecce9a804615e11e8f5c Mon Sep 17 00:00:00 2001 From: Zenahr Barzani Date: Thu, 23 Feb 2023 12:40:09 +0100 Subject: [PATCH 1/4] Change command to backslash Change command to backslash so it works on both Linux and Windows machines. Trying to run the command as is results in a syntax error on Windows. --- website/docs/i18n/i18n-tutorial.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/docs/i18n/i18n-tutorial.mdx b/website/docs/i18n/i18n-tutorial.mdx index ab3c403286ab..b3db1449e150 100644 --- a/website/docs/i18n/i18n-tutorial.mdx +++ b/website/docs/i18n/i18n-tutorial.mdx @@ -391,8 +391,8 @@ Official Docusaurus content plugins extensively use Markdown/MDX files and allow Copy your docs Markdown files from `docs/` to `i18n/fr/docusaurus-plugin-content-docs/current`, and translate them: ```bash -mkdir -p i18n/fr/docusaurus-plugin-content-docs/current -cp -r docs/** i18n/fr/docusaurus-plugin-content-docs/current +mkdir -p i18n\fr\docusaurus-plugin-content-docs\current +cp -r docs\** i18n\fr\docusaurus-plugin-content-docs\current ``` :::info From 1a10cc40c6b92bf69835fa4ab07e8bf5965bb6b0 Mon Sep 17 00:00:00 2001 From: "zenahr.barzani" Date: Mon, 27 Feb 2023 09:26:50 +0100 Subject: [PATCH 2/4] add equivalent Windows command. show commands as Tabs. --- website/docs/i18n/i18n-tutorial.mdx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/website/docs/i18n/i18n-tutorial.mdx b/website/docs/i18n/i18n-tutorial.mdx index b3db1449e150..f2492cd1bcb7 100644 --- a/website/docs/i18n/i18n-tutorial.mdx +++ b/website/docs/i18n/i18n-tutorial.mdx @@ -390,11 +390,26 @@ Official Docusaurus content plugins extensively use Markdown/MDX files and allow Copy your docs Markdown files from `docs/` to `i18n/fr/docusaurus-plugin-content-docs/current`, and translate them: + + + ```bash mkdir -p i18n\fr\docusaurus-plugin-content-docs\current cp -r docs\** i18n\fr\docusaurus-plugin-content-docs\current ``` + + + + +```bat +mkdir i18n\fr\docusaurus-plugin-content-docs\current +Xcopy docs i18n\fr\docusaurus-plugin-content-docs\current /E /H /C /I +``` + + + + :::info Notice that the `docusaurus-plugin-content-docs` plugin always divides its content by versions. The data in `./docs` folder will be translated in the `current` subfolder and `current.json` file. See [the doc versioning guide](../guides/docs/versioning.mdx#terminology) for more information about what "current" means. From 6c90991eeccccb83a2b9d9ee218cdf319bf3dc04 Mon Sep 17 00:00:00 2001 From: "zenahr.barzani" Date: Mon, 27 Feb 2023 09:35:58 +0100 Subject: [PATCH 3/4] add flag table for windows command. --- website/docs/i18n/i18n-tutorial.mdx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/website/docs/i18n/i18n-tutorial.mdx b/website/docs/i18n/i18n-tutorial.mdx index f2492cd1bcb7..127e90d565a3 100644 --- a/website/docs/i18n/i18n-tutorial.mdx +++ b/website/docs/i18n/i18n-tutorial.mdx @@ -404,9 +404,20 @@ cp -r docs\** i18n\fr\docusaurus-plugin-content-docs\current ```bat mkdir i18n\fr\docusaurus-plugin-content-docs\current -Xcopy docs i18n\fr\docusaurus-plugin-content-docs\current /E /H /C /I +Xcopy docs i18n\fr\docusaurus-plugin-content-docs\current /E /C /I /D ``` +:::info + +| Flag | Effect | +| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| /E | Copies all subdirectories, even if they are empty. | +| /C | Ignores errors. | +| /I | If source is a directory or contains wildcards and destination does not exist, xcopy assumes destination specifies a directory name and creates a new directory. | +| /D | Only replaces the destination files with the source files if the source files are newer. | + +::: + From 4aeae34f1dd8f7ddcd3ca2acb857b5f69764f795 Mon Sep 17 00:00:00 2001 From: "zenahr.barzani" Date: Mon, 27 Feb 2023 10:30:40 +0100 Subject: [PATCH 4/4] add callout for Windows command. --- website/docs/i18n/i18n-tutorial.mdx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/website/docs/i18n/i18n-tutorial.mdx b/website/docs/i18n/i18n-tutorial.mdx index 127e90d565a3..c5a8b654a3bc 100644 --- a/website/docs/i18n/i18n-tutorial.mdx +++ b/website/docs/i18n/i18n-tutorial.mdx @@ -407,6 +407,12 @@ mkdir i18n\fr\docusaurus-plugin-content-docs\current Xcopy docs i18n\fr\docusaurus-plugin-content-docs\current /E /C /I /D ``` +:::caution + +The second command opens a prompt. Answer "No" to all. Otherwise, you'd get rid of existing translations. + +::: + :::info | Flag | Effect |