feat: translate sample app to EN/DE (#105)#114
Merged
Conversation
Final step of #105 — translates AndreGoepel.AppFoundation.Sample itself: App.razor's html lang attribute and Home.razor (heading, body copy, three button labels). Follows the marten-identity sample's reference pattern rather than LocalizedComponentBase: the sample is a host app, not a library that needs to render without localization registered, so Home.razor injects IStringLocalizer<Strings> directly. New Resources/Strings.cs marker type + Strings.resx/Strings.de.resx, kept separate from the RCL's AppFoundationStrings — the host translates its own content independently of the identity/foundation UI it consumes. No behavior change: every English default value is byte-identical to the hardcoded string it replaces, so AppPagesTests.cs's document-title assertion ("AppFoundation Sample", sourced from AppFoundationLayoutOptions. BrandName, not Home.PageTitle) keeps passing unchanged. Verification: - dotnet build -c Release: 0 errors - dotnet csharpier check .: clean, 91 files - Unit tests: 33/33 (MailService) + 68/68 (AppFoundation, unchanged — the sample has no dedicated unit/bUnit coverage, only E2E) - E2E (Playwright + Aspire, full suite): 26/26 This completes the app-foundation#105 translation series.
andregoepel
added a commit
that referenced
this pull request
Jul 21, 2026
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.
Final step of #105 — translates
AndreGoepel.AppFoundation.Sampleitself:App.razor'shtml langattribute andHome.razor(heading, body copy, three button labels).Approach
Follows the marten-identity sample's reference pattern rather than
LocalizedComponentBase: the sample is a host app, not a library that needs to render without localization registered, soHome.razorinjectsIStringLocalizer<Strings>directly. NewResources/Strings.csmarker type +Strings.resx/Strings.de.resx, kept separate from the RCL'sAppFoundationStrings— the host translates its own content independently of the identity/foundation UI it consumes.No behavior change
Every English default value is byte-identical to the hardcoded string it replaces, so
AppPagesTests.cs's document-title assertion ("AppFoundation Sample", sourced fromAppFoundationLayoutOptions.BrandName, notHome.PageTitle) keeps passing unchanged.Verification
dotnet build -c Releasedotnet csharpier check .This completes the translation work for app-foundation#105.
Closes #105