Open
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
Adds a new
create-plugin add i18ncommand 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-ESWhich 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