Skip to content
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

Merged
merged 1 commit into from
Aug 29, 2017
Merged

Capitalize event buttons in OrdersHelper #2177

merged 1 commit into from
Aug 29, 2017

Conversation

swcraig
Copy link
Contributor

@swcraig swcraig commented Aug 22, 2017

lowercase-order-buttons

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.

@@ -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,
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@swcraig swcraig changed the title Capitalize event buttons in OrdersHelper WIP: Capitalize event buttons in OrdersHelper Aug 22, 2017
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.
@swcraig swcraig changed the title WIP: Capitalize event buttons in OrdersHelper Capitalize event buttons in OrdersHelper Aug 23, 2017
Copy link
Contributor

@jhawthorn jhawthorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you

Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

Copy link
Contributor

@mamhoff mamhoff left a 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!

@cbrunsdon cbrunsdon merged commit 300af5f into solidusio:master Aug 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants