Skip to content

Add localization support and preview to Initializr (bundles, UI, generator)#4573

Merged
shai-almog merged 10 commits intomasterfrom
codex/add-localization-support-to-initializr-app
Feb 26, 2026
Merged

Add localization support and preview to Initializr (bundles, UI, generator)#4573
shai-almog merged 10 commits intomasterfrom
codex/add-localization-support-to-initializr-app

Conversation

@shai-almog
Copy link
Collaborator

Motivation

  • Provide built-in i18n support for generated starter projects by including message bundles and bootstrapping code for Barebones/Kotlin templates.
  • Allow users to enable/disable inclusion of resource bundles and choose a preview language from the Initializr UI for live previews.
  • Ensure the embedded live preview renders localized strings and that generated zips contain the correct resource files and bootstrap code.

Description

  • Add PreviewLanguage enum and two fields to ProjectOptions: includeLocalizationBundles and previewLanguage, and wire them into defaults.
  • Add a "Localization" panel to Initializr with a CheckBox to include bundles and a Picker to choose preview language, and pass those options through to the preview and generator.
  • Update TemplatePreviewPanel to install the selected localization bundle into UIManager for live previews and to look up L10N resources by language suffix (with fallback for region variants).
  • Update GeneratorModel to include messages*.properties files in the generated zip for Barebones templates (and only when enabled), and inject Java/Kotlin bootstrap code into the main source to load the messages bundle at runtime.
  • Add localized messages.properties resource files for multiple languages (including RTL markers for Arabic/Hebrew) and update the summary and validation UI to reflect localization options.
  • Update GeneratorModelMatrixTest to assert presence (or absence) of localization bundles in generated outputs for the relevant templates.

Testing

  • Ran the module unit tests including the updated GeneratorModelMatrixTest which validates generated zip contents; tests passed.
  • Built the initializr common module and executed the preview code path manually to confirm UIManager bundle installation and that generated zips contain common/src/main/resources/messages*.properties and injected bootstrap code in Barebones/Kotlin mains.

Codex Task

@github-actions
Copy link

Cloudflare Preview

@shai-almog shai-almog merged commit d7df89f into master Feb 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant