Skip to content

feat(i18n): ✨ Add i18n management scripts for locale creation and deletion#727

Merged
aXenDeveloper merged 4 commits into
canaryfrom
feat(i18n)--Add-i18n-management-scripts-for-locale-creation-and-deletion
Jul 25, 2026
Merged

feat(i18n): ✨ Add i18n management scripts for locale creation and deletion#727
aXenDeveloper merged 4 commits into
canaryfrom
feat(i18n)--Add-i18n-management-scripts-for-locale-creation-and-deletion

Conversation

@aXenDeveloper

Copy link
Copy Markdown
Owner

Improving Documentation

Description

What?

Why?

@vercel

vercel Bot commented Jul 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vitnode-docs Ready Ready Preview, Comment Jul 25, 2026 8:07pm

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 99ac1bb1fa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/api/src/i18n.ts
Comment thread packages/vitnode/scripts/i18n-create.ts Outdated
Comment thread packages/vitnode/scripts/i18n-delete.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14c06ca21c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vitnode/scripts/i18n-shared.ts
Comment thread packages/vitnode/scripts/i18n-delete.ts
Comment thread packages/vitnode/scripts/i18n-update.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5040a40a9b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/vitnode/scripts/i18n-create.ts Outdated
Comment thread packages/vitnode/scripts/i18n-create.ts Outdated
Comment thread package.json Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2cb1008a8d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +16 to +18
const enabled = React.useMemo(
() => languages.filter(language => language.enabled !== false),
[languages],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Filter disabled locales from the language switchers

When a locale has enabled: false, this only removes it from the context used by multilingual form fields. The site and admin headers pass the unfiltered vitNodeConfig.i18n.locales directly to LanguageSwitcher, which maps every locale into a selectable menu item, so users can still select a language that configuration says is disabled. Filter the shared locale configuration or make LanguageSwitcher exclude disabled entries as well.

Useful? React with 👍 / 👎.

Comment on lines +243 to +245
if (
content.includes("defaultLocale") &&
/locales\s*:\s*\[/.test(content)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Recognize partial API i18n configurations

When an API-only app declares i18n: { locales, messages } but relies on the supported implicit defaultLocale: "en", this predicate rejects the actual config source because it lacks the literal defaultLocale. As a result, i18n:delete deletes the locale JSON files but skips unwiring the config when sourceFile is null, leaving message loaders that import missing files while reporting that the language was removed. Detect the actual i18n/locales block without requiring an explicit default.

Useful? React with 👍 / 👎.

@aXenDeveloper
aXenDeveloper merged commit e187c09 into canary Jul 25, 2026
4 checks passed
@aXenDeveloper
aXenDeveloper deleted the feat(i18n)--Add-i18n-management-scripts-for-locale-creation-and-deletion branch July 25, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💡 Feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant