-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Capitalize event buttons in OrdersHelper
#2177
Capitalize event buttons in OrdersHelper
#2177
Conversation
@@ -6,7 +6,8 @@ def event_links | |||
links = [] | |||
@order_events.sort.each do |event| | |||
next unless @order.send("can_#{event}?") | |||
links << button_link_to(Spree.t(event), [event, :admin, @order], | |||
links << button_link_to(Spree.t(event).capitalize, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably don't want to do it like this. The choice to capitalize or not is language specific, so it should exist somewhere in translations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks John, I didn't even think about that. I'll get something else for this.
OrdersHelper
OrdersHelper
These seem to be the only buttons that are not capitalized in the backend. They look especially weird since they can sit beside the "Resend" button which is capitalized.
OrdersHelper
OrdersHelper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice and easy. Love it!
These seem to be the only buttons that are not capitalized in the
backend. They look especially weird since they can sit beside the
"Resend" button which is capitalized.
Edit: This only changes the translation values in
en.yml
. They don't appear to be used anywhere else. The one problem with this approach is that the alert text that is generated will have the order event capitalized (e.g "Are you sure you want to Cancel this order?"). I think having an "errant" capitalization in the alert text is more desirable than lowercase button text.