Skip to content

Translation workflow unclear #8703

Open
@Zenahr

Description

Have you read the Contributing Guidelines on issues?

Description

The docs on translation: https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-docs#i18n
are a bit unclear on what to do with markdown files.

Reading through it, you'd expect that docusaurus write-translations generates not just JSON translation files, but also copy/paste Markdown files into the corresponding locale folder under /i18n.

EDIT: just found the relevant piece but only after having it pointed out to me: https://docusaurus.io/docs/i18n/tutorial#translate-markdown-files

At least for me this happened because when reading the translation docs top to bottom, you'd assume the command yarn write-translations --locale fr doesn't just create translations for code, but also markdown. Neither the command name (think something like write-translations-json) nor the docs at that point state that you need to run a separate command to handle markdown files.

Two suggestions:

  1. Add a How-To Guide for previewing and generating translations for a language, strictly showcasing the steps needed to take. If we take the the https://diataxis.fr/ framework as reference, a guide lists the steps to take, whereas a tutorial educates a reader through a scenario, which IMO the current tutorial does really well

  2. Add a callout right after the yarn write-translations --locale fr command is mentioned here: https://docusaurus.io/docs/i18n/tutorial#translate-plugin-data, stating something like: "This only creates JSON translation files. To handle Markdown, keep reading."

And I know that it should be understood just based on the heading "Translate plugin data". When I read that however, in my head I was thinking "docs plugin data... of course this entails markdown too!".

I'll gladly take this upon myself and create a PR if this is something that you're not entirely opposed to.
The Guide would be small in size, meaning it would add only little maintenance costs for both updating and translation.

Self-service

  • I'd be willing to address this documentation request myself.

Metadata

Assignees

No one assigned

    Labels

    documentationThe issue is related to the documentation of Docusaurus

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions