LoginForm: IStringLocalizer<LoginForm> injection is required in practice, breaks apps without AddLocalization() #35
Labels
No labels
breaking-change
bug
documentation
duplicate
enhancement
good first issue
help wanted
performance
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Grandiras/ATProto.NET#35
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
v0.4.0 release notes describe the new
IStringLocalizer<LoginForm>support as optional ("when registered … default copy is resolved by parameter name"). In practice, rendering<LoginForm />in an app that has not calledservices.AddLocalization()throws:Hit while upgrading Updraft.Kanban from 0.3.0 → 0.4.0: the /login page 500s. Explicit
ButtonText/HandlePlaceholdervalues don't avoid it — the failure is at property-injection time, before parameters apply.Expected: the localizer should be optional as documented. Suggested fix: resolve via
IServiceProvider.GetService<IStringLocalizer<LoginForm>>()or an optional injection.Workaround for consumers:
builder.Services.AddLocalization();