New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
titleize the model name on default submit buttons #22764
titleize the model name on default submit buttons #22764
Conversation
Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @rafaelfranca (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
See #791 (comment) |
Has this issue been resolved? |
I think it's the wrong approach to titleise the model. The text on the button is an imperative, an instruction to the user. As such it's a very short, but complete, sentence and only the first word should be capitalised: i.e. "Create ticket type". So downcasing would be most appropriate. |
I'm agree with @surreymagpie. I just don't like the inconsistency of "Create Ticket type". I've made the changes needed so it reads "Create ticket type" |
Seems good. Could you squash your commits? |
…fault_submit_button_value titleize the model name on default submit buttons
I might definitely be missing something, but how should one change the button value to Many languages need the model name (being a noun) to be capitalized. Additionally, the model name may come first and thus should be capitalized. It seemed reasonable to have i18n handle that scenario instead of having to pass in something to I'm just trying the rails 5 beta and now all my features fail because the buttons are all downcased even though I have specific capitalized model names defined via i18n. EDIT: I elaborated a little more with an example on the issue. |
Reverted in ddf4c95 |
…e_for_default_submit_button_value" This reverts commit 4158974, reversing changes made to 3d590ad. Reason: This break i18n in some languages. See #791 (comment)
pull request implementing lighthouse's diff to titleize the model names on submit buttons. So, for a model
TicketType
, the submit button would read "Create Ticket Type", rather than "Create Ticket type". References issue 791