Skip to content

i18n.localeConfigs.translate isn't accepted by validation #11451

@trofim24

Description

@trofim24

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

Problems with i18n.localeConfigs.translate option.

[ERROR] Error: These field(s) ("i18n.localeConfigs.en.translate",) are not recognized in docusaurus.config.ts.
If you still want these fields to be in your configuration, put them in the "customFields" field.

Reproducible demo

No response

Steps to reproduce

  1. Create a new Docusaurus site with npx create-docusaurus@latest my-website classic -t command from instruction
  2. Add option i18n.localeConfigs.translate to docusaurus.config.ts like
i18n: {
    defaultLocale: 'en',
    locales: ['en'],
    localeConfigs: {
      en: {
        translate: true,
      }
    }
  },
  1. Run build use npm run build command from instruction

Expected behavior

The build is OK

Actual behavior

[ERROR] Error: These field(s) ("i18n.localeConfigs.en.translate",) are not recognized in docusaurus.config.ts.
If you still want these fields to be in your configuration, put them in the "customFields" field.
See https://docusaurus.io/docs/api/docusaurus-config/#customfields

Your environment

  • Docusaurus version used: 3.9.1
  • Environment name and version (e.g. Chrome 89, Node.js 16.4): Node version: v20.18.2
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS): MacOS Sonoma Version 14.8.1 (23J30)

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executionstatus: accepting prThis issue has been accepted, and we are looking for community contributors to implement this

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions