Skip to content

Conversation

UnsettledAverage73
Copy link

@UnsettledAverage73 UnsettledAverage73 commented Oct 2, 2025

Title : docs: add warning for cp -r globbing in i18n tutorial (#11158)

Pre-flight checklist

  • I have read the Contributing Guidelines on pull requests.
  • If this is a code change: I have written unit tests and/or added dogfooding pages to fully verify the new behavior.
  • If this is a new API or substantial change: the PR has an accompanying issue (closes #0000) and the maintainers have approved on my working plan.

Motivation

This PR addresses issue #11158, which describes an unexpected behavior when using cp -r docs/** i18n/fr/docusaurus-plugin-content-docs/current in the i18n tutorial. In some shell configurations (specifically those with globstar enabled), this command leads to duplicate files in the destination directory because the shell first globs all files and then recursively copies each one individually.

To help users understand and mitigate this issue, a warning message has been added to the i18n tutorial documentation.

Test Plan

To verify this change, you can:

  1. Set up a Docusaurus project with i18n configured, following the tutorial steps up to the "Translate Markdown Files" section.
  2. Navigate to the website/docs/i18n/i18n-tutorial.mdx file (or its rendered equivalent in the deploy preview).
  3. Observe that the warning message has been correctly inserted after the first cp -r command block under "Translate the docs" section.

Test links

Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/
(Once the Netlify deploy preview is available, please update this link to point to the i18n-tutorial.mdx page.)

Related issues/PRs

Closes #11158

Copy link

meta-cla bot commented Oct 2, 2025

Hi @UnsettledAverage73!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

Copy link

netlify bot commented Oct 2, 2025

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 8ff8841
🔍 Latest deploy log https://app.netlify.com/projects/docusaurus-2/deploys/68debbb2d0494200083f1c5c
😎 Deploy Preview https://deploy-preview-11450--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cp commands in i18n tutorial create duplicate file (recursing AND globbing)
1 participant