Skip to content

feat(core): optimize default value handling for options.locales#1676

Open
pengzhanbo wants to merge 4 commits intovuepress:mainfrom
pengzhanbo:fix-siteData-locales
Open

feat(core): optimize default value handling for options.locales#1676
pengzhanbo wants to merge 4 commits intovuepress:mainfrom
pengzhanbo:fix-siteData-locales

Conversation

@pengzhanbo
Copy link
Member

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Provide a description in this PR that addresses what the PR is solving. If this PR is going to solve an existing issue, please reference the issue (e.g. close #123).

What is the purpose of this pull request?

  • Bug fix
  • New feature
  • Documentation update
  • Other

Description

Screenshots

Before

After

@coveralls
Copy link

coveralls commented Feb 10, 2026

Pull Request Test Coverage Report for Build 21939083597

Details

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage decreased (-0.05%) to 73.993%

Files with Coverage Reduction New Missed Lines %
packages/shared/src/utils/routes/resolveLocalePath.ts 1 92.86%
Totals Coverage Status
Change from base Build 21831331239: -0.05%
Covered Lines: 700
Relevant Lines: 946

💛 - Coveralls

@pengzhanbo pengzhanbo changed the title feat(core): optimize default value handling for siteData locales feat(core): optimize default value handling for options.locales Feb 10, 2026
@Mister-Hope
Copy link
Member

Mister-Hope commented Feb 11, 2026

I think this is not what I mean.

In short, a / and /404.html shall exist. These belong to locale /, then locale / MUST exist.

A plugin can also choose to generate a /plugin.html.

The or should ensure to generate a locale /

Copy link
Member

@Mister-Hope Mister-Hope left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not what I mean.

In short, a / and /404.html shall exist. These belong to locale /, then locale / MUST exist.

A plugin can also choose to generate a /plugin.html.

The or should ensure to generate a locale /

@pengzhanbo
Copy link
Member Author

pengzhanbo commented Feb 11, 2026

Because the time interval is a bit long, what was the solution we discussed back then?
@Mister-Hope

@Mister-Hope
Copy link
Member

Locales object and its / key must exist, with a lang inferred from root lang if absent

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.

3 participants

Comments