Problem
createLoginPage() renders the heading from appLayerTranslations.<lang>.login.title, which is hardcoded to "Open CRM" for both en and de. Consumer apps (e.g. open-tasks, future open-elements apps) end up showing "Open CRM" as the login dialog title.
Source: src/translations/en.ts line 3, src/translations/de.ts line 3 in v0.2.0.
The README already lists this under deferred follow-up work ("Per-string translation overrides") — this issue is the concrete request for the login title specifically, which is the user-visible string that breaks branding for every consumer that isn't Open CRM.
Proposed API
Add an appName prop to createLoginPage:
export default createLoginPage({
homeRoute: "/tasks",
appName: "Open Tasks", // overrides t.login.title when set
});
LoginClient then renders appName ?? t.login.title. No breaking change — existing callers (open-crm) keep working unchanged because appName is optional.
Alternative: drop the brand string from appLayerTranslations
Remove login.title from appLayerTranslations entirely. Make appName a required prop on createLoginPage. Cleaner long-term (no misleading default), at the cost of one breaking change in 0.3.0.
A wider, also-acceptable alternative is to accept an appLayerTranslationsOverride prop on OERootLayout that deep-merges into the bundled appLayerTranslations. That would also solve the same problem for any other strings consumers want to override (HTML <title> derivative, "Developed by" line, etc.). More work, more flexibility.
Workaround
pnpm patch @open-elements/nextjs-app-layer@0.2.0 to rewrite dist/translations/{en,de}.js locally. Committed in open-tasks as a temporary bridge — happy to remove the patch as soon as a release with this fix is published.
Context
Filed from open-tasks during the spec 009 migration (Open Tasks #13) which adopts @open-elements/nextjs-app-layer 0.2.0 1:1 from open-crm's setup.
Problem
createLoginPage()renders the heading fromappLayerTranslations.<lang>.login.title, which is hardcoded to"Open CRM"for bothenandde. Consumer apps (e.g. open-tasks, future open-elements apps) end up showing "Open CRM" as the login dialog title.Source:
src/translations/en.tsline 3,src/translations/de.tsline 3 in v0.2.0.The README already lists this under deferred follow-up work ("Per-string translation overrides") — this issue is the concrete request for the login title specifically, which is the user-visible string that breaks branding for every consumer that isn't Open CRM.
Proposed API
Add an
appNameprop tocreateLoginPage:LoginClientthen rendersappName ?? t.login.title. No breaking change — existing callers (open-crm) keep working unchanged becauseappNameis optional.Alternative: drop the brand string from
appLayerTranslationsRemove
login.titlefromappLayerTranslationsentirely. MakeappNamea required prop oncreateLoginPage. Cleaner long-term (no misleading default), at the cost of one breaking change in 0.3.0.A wider, also-acceptable alternative is to accept an
appLayerTranslationsOverrideprop onOERootLayoutthat deep-merges into the bundledappLayerTranslations. That would also solve the same problem for any other strings consumers want to override (HTML<title>derivative, "Developed by" line, etc.). More work, more flexibility.Workaround
pnpm patch @open-elements/nextjs-app-layer@0.2.0to rewritedist/translations/{en,de}.jslocally. Committed in open-tasks as a temporary bridge — happy to remove the patch as soon as a release with this fix is published.Context
Filed from open-tasks during the spec 009 migration (Open Tasks #13) which adopts
@open-elements/nextjs-app-layer 0.2.01:1 from open-crm's setup.