Skip to content

Create Plugin: i18n addition script#2320

Open
sunker wants to merge 23 commits intomainfrom
create-plugin/i18n-addition
Open

Create Plugin: i18n addition script#2320
sunker wants to merge 23 commits intomainfrom
create-plugin/i18n-addition

Conversation

@sunker
Copy link
Copy Markdown
Contributor

@sunker sunker commented Nov 24, 2025

What this PR does / why we need it:

Adds a new create-plugin add i18n command that sets up internationalization infrastructure for Grafana plugins. This automates the configuration of files, dependencies and settings needed for i18n support, making it easier for plugin developers to add translation capabilities.

The addition uses a defensive approach and it therefore safe to run multiple times. It performs early validation to ensure React 18+ and Grafana 11.0.0+ are being used, with clear error messages if requirements aren't met. For Grafana 11.x plugins, it automatically sets up backward compatibility with custom resource loading, while Grafana 12.1.0+ plugins use the simpler automatic resource loading approach.

Example usage:
npx @grafana/create-plugin add i18n --locales=en-US,sv-SE,es-ES

Which issue(s) this PR fixes:

Fixes #[issue-number]

Fixes #2346

Special notes for your reviewer:

📦 Published PR as canary version: Canary Versions

✨ Test out this PR locally via:

npm install @grafana/create-plugin@6.5.0-canary.2320.20268447181.0
# or 
yarn add @grafana/create-plugin@6.5.0-canary.2320.20268447181.0

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Increment the minor version when merged release Create a release when this pr is merged stale

Projects

Status: 🔬 In review

Development

Successfully merging this pull request may close these issues.

Feat: Create add cmd script to add i18n support

2 participants