mirror of
https://github.com/heartcombo/devise.git
synced 2026-02-19 02:44:31 -05:00
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
18 KiB
18 KiB