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

Improve I18n in variant views #856

Merged
merged 1 commit into from
Feb 15, 2016

Conversation

Murph33
Copy link
Contributor

@Murph33 Murph33 commented Feb 12, 2016

Use model name and model attribute translation.

I had considered changing the form to not use the label-block class so that then I could use model attribute translation on the track_inventory checkbox but decided against it as it changed the spacing of all the labels too much.

This is part of an ongoing effort to improve I18n usage as discussed in #735.

@Murph33 Murph33 force-pushed the improve_i18n_variant branch 2 times, most recently from 048c808 to a4f85d6 Compare February 12, 2016 19:56
@jhawthorn
Copy link
Contributor

👍

<%= f.text_field :cost_price, :value => number_to_currency(@variant.cost_price, :unit => ''), :class => 'fullwidth' %>
</div>

<div class="field" data-hook="tax_category">
<%= f.label :tax_category_id, Spree.t(:tax_category) %>
<%= f.label :tax_category_id %>
Copy link
Member

Choose a reason for hiding this comment

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

Better use Spree::TaxCategory.model_name.human here

Use model name and model attribute translation.
jhawthorn added a commit that referenced this pull request Feb 15, 2016
@jhawthorn jhawthorn merged commit 99f19d4 into solidusio:master Feb 15, 2016
@Murph33 Murph33 deleted the improve_i18n_variant branch February 18, 2016 17:15
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.

None yet

3 participants