Add internationalization (i18n) support across all modules#60
Merged
antosubash merged 4 commits intomainfrom Apr 3, 2026
Merged
Add internationalization (i18n) support across all modules#60antosubash merged 4 commits intomainfrom
antosubash merged 4 commits intomainfrom
Conversation
- Create Locales/en.json with all user-visible strings for each module - Generate Locales/keys.ts with typed nested constants - Update all React page components to use useTranslation hook - Add EmbeddedResource to each module csproj to embed locale JSON Modules localized: Admin, AuditLogs, BackgroundJobs, Dashboard, FeatureFlags, FileStorage, Marketplace, OpenIddict, Orders, PageBuilder, Products, Settings, Tenants, Users
4bbc7ec to
fd22ba7
Compare
Deploying simplemodule-website with
|
| Latest commit: |
f30971b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2d836fa3.simplemodule-website.pages.dev |
| Branch Preview URL: | https://claude-add-page-localization.simplemodule-website.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Summary
This PR introduces comprehensive internationalization (i18n) support across the SimpleModule platform by adding translation keys and English locale files to all modules, along with integration of the
useTranslationhook throughout the UI components.Key Changes
Translation Infrastructure: Added
Locales/keys.tsfiles to all modules (Admin, AuditLogs, BackgroundJobs, Dashboard, FeatureFlags, FileStorage, Marketplace, OpenIddict, Orders, PageBuilder, Settings, Tenants, Users) that define typed translation key constants for each module's UI strings.English Locale Files: Created
Locales/en.jsonfiles for each module containing English translations for all UI strings, supporting parameterized strings (e.g.,{count},{displayName}) and plural forms (e.g.,_one,_other).Component Integration: Updated all UI components and pages to use the
useTranslationhook from@simplemodule/client/use-translation, replacing hardcoded strings with translation key references. This includes:Project Configuration: Updated all module
.csprojfiles to embed locale JSON files as resources, ensuring translations are packaged with the modules.Code Refactoring: Moved hardcoded strings from component definitions to translation keys, improving maintainability and enabling future language support. Refactored tab definitions and permission group definitions to use translation keys instead of static labels.
Notable Implementation Details
UsersEdit.TabDetails,Roles.DeleteDialog.Title) for better organization and discoverability.https://claude.ai/code/session_01Qeb6VZofPxGMHNEGfskwi9