localized menu - #178
Merged
Merged
Conversation
Copies Oqtane's Menu/MenuItems control chain into the theme and localizes page names via IStringLocalizer keyed by Page.Name, with fallback to the raw database name when no resource exists. Includes neutral and ts-ZA (Xitsonga) resources reusing reviewed Home tile translations; "Kaya" (Home) is new and needs translation review. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Implements a localized navigation menu for TenTreesTheme by replacing the default Oqtane menu with a set of copied menu components that localize Page.Name via IStringLocalizer, backed by new .resx resource files (English + Xitsonga).
Changes:
- Added
LocalizedMenu*Blazor components andLocalizedMenuBaseto localize menu item text usingPage.Nameas the resource key. - Wired the theme to use
<LocalizedMenu Orientation="Horizontal" />instead of the default<Menu ... />. - Added
LocalizedMenu.resxandLocalizedMenu.ts-ZA.resxwith navigation translation entries (and a hand-off doc file).
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| HANDOFF.md | Added a session hand-off document describing implementation/testing notes. |
| Client/Themes/TenTreesTheme/Theme.razor | Swapped the theme’s menu component to LocalizedMenu. |
| Client/Themes/TenTreesTheme/LocalizedMenu.razor | Orientation dispatcher for horizontal vs vertical localized menu rendering. |
| Client/Themes/TenTreesTheme/LocalizedMenuBase.cs | Base class that injects IStringLocalizer and maps Page.Name → localized string. |
| Client/Themes/TenTreesTheme/LocalizedMenuHorizontal.razor | Horizontal menu wrapper using the localized items component. |
| Client/Themes/TenTreesTheme/LocalizedMenuVertical.razor | Vertical menu wrapper using the localized items component. |
| Client/Themes/TenTreesTheme/LocalizedMenuItemsHorizontal.razor | Localized version of horizontal menu items (renders LocalizeName(childPage)). |
| Client/Themes/TenTreesTheme/LocalizedMenuItemsVertical.razor | Localized version of vertical menu items (renders LocalizeName(childPage)). |
| Client/Resources/OpenEug.TenTrees.Theme.TenTreesTheme/LocalizedMenu.resx | Base (English) resource keys for nav item names. |
| Client/Resources/OpenEug.TenTrees.Theme.TenTreesTheme/LocalizedMenu.ts-ZA.resx | Xitsonga resource keys for nav item names. |
| # Hand-off: Localized Navigation Menu (feature/localized-menu) | ||
|
|
||
| Session hand-off for continuing work on another machine. Written 2026-07-15. | ||
| Delete this file before merging the branch. |
| } | ||
| else | ||
| { | ||
| <ul class="navbar-nav mr-auto"> |
Comment on lines
+19
to
+22
| <span class="w-100" data-bs-toggle="collapse" data-bs-target=".navbar-collapse.show"> | ||
| <span class="@childPage.Icon" aria-hidden="true" /> | ||
| @LocalizeName(childPage) <span class="visually-hidden-focusable">(current)</span> | ||
| </span> |
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.
PR Classification
New feature: Implements a localized navigation menu system for the TenTreesTheme in Oqtane.
PR Summary
Introduces new Blazor components to provide a localized navigation menu, replacing the default menu in the theme and supporting English and Xitsonga translations.
LocalizedMenu.razorand related components to duplicate and localize the Oqtane menu structure usingIStringLocalizer.LocalizedMenu.resxandLocalizedMenu.ts-ZA.resxresource files for English and Xitsonga navigation item translations.Theme.razorto use the newLocalizedMenucomponent instead of the default menu.HANDOFF.mddocumenting implementation details, test status, and known issues.