Skip to content

Only downcase first letter of each auth key, not the entire string#5822

Merged
carlosantoniodasilva merged 3 commits intomainfrom
ca-humanize-fix
Feb 13, 2026
Merged

Only downcase first letter of each auth key, not the entire string#5822
carlosantoniodasilva merged 3 commits intomainfrom
ca-humanize-fix

Conversation

@carlosantoniodasilva
Copy link
Copy Markdown
Member

A previous change #4834 introduced a downcase call to each attribute, so that it'd fix an invalid grammar issue on some languages like English that were showing Email in the middle of flash message sentences.

However, it caused a bug with German which uses the word E-Mail and at the beginning of the sentence, causing it to be converted to E-mail incorrectly.

The fix here will only downcase the first char of each word, and convert it back to upcase at the beginning of the sentence, which should work for both the original fix (English message), and for the new bug (German
message)

If we end up running into any more of these edge cases with the message, we might roll it all back and provide a different set of interpolation values for the original vs downcased translations, so people can use what makes the most sense for each language without us having to manually massage these strings.

Fixes #5820

@carlosantoniodasilva carlosantoniodasilva self-assigned this Feb 13, 2026
A previous change #4834 introduced a downcase call to each attribute, so
that it'd fix an invalid grammar issue on some languages like English
that were showing `Email` in the middle of flash message sentences.

However, it caused a bug with German which uses the word `E-Mail` and at
the beginning of the sentence, causing it to be converted to `E-mail`
incorrectly.

The fix here will only downcase the first char of each word, and convert
it back to upcase at the beginning of the sentence, which should work
for both the original fix (English message), and for the new bug (German
 message)

If we end up running into any more of these edge cases with the message,
we might roll it all back and provide a different set of interpolation
values for the original vs downcased translations, so people can use
what makes the most sense for each language without us having to
manually massage these strings.

Fixes #5820
@carlosantoniodasilva carlosantoniodasilva merged commit 03c419e into main Feb 13, 2026
120 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Devise 5.0 breaks spelling for E-Mail in German

1 participant