Skip to content

feat: translate sample app to EN/DE (#105)#114

Merged
andregoepel merged 1 commit into
mainfrom
feat/translate-sample-app
Jul 21, 2026
Merged

feat: translate sample app to EN/DE (#105)#114
andregoepel merged 1 commit into
mainfrom
feat/translate-sample-app

Conversation

@andregoepel

Copy link
Copy Markdown
Owner

Final step of #105 — translates AndreGoepel.AppFoundation.Sample itself: App.razor's html lang attribute and Home.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, 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

Check Result
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 translation work for app-foundation#105.

Closes #105

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
andregoepel merged commit 716e9be into main Jul 21, 2026
4 checks passed
@andregoepel
andregoepel deleted the feat/translate-sample-app branch July 21, 2026 09:00
andregoepel added a commit that referenced this pull request Jul 21, 2026
Multi-language support for the management frontend (#105, PRs #107-#114)
is merged. Latest published tag is v1.3.0 (predates this series — it was
cut right after #106 merged), so this is the next minor release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: Translate app-foundation (EN/DE)

1 participant