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

Use model translations in adjustment_reason view #778

Conversation

Murph33
Copy link
Contributor

@Murph33 Murph33 commented Feb 1, 2016

The AdjustmentReason model is used in translations in the index view.

This is to make better use of I18n and to be nicer to non English speakers.

This is part of an ongoing issue being discussed in #735.

@@ -33,7 +33,7 @@
<%= adjustment_reason.name %>
</td>
<td class="align-center">
<%= Spree.t(adjustment_reason.active? ? :active : :inactive) %>
<%= Spree::AdjustmentReason.human_attribute_name(adjustment_reason.active? ? :active : :inactive) %>
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this is an attribute name, it's translations for two of the values the attribute can have.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was iffy about this. active is an attribute on the model (a boolean) but inactive is not. I did add it in though to make this work obviously.

The AdjustmentReason model is used in translations in the index view.
@Murph33 Murph33 force-pushed the use_model_translation_adjustment_reason_index branch from 18aeb43 to 0286bea Compare February 16, 2016 18:30
@jhawthorn
Copy link
Contributor

👍

jhawthorn added a commit that referenced this pull request Feb 16, 2016
…_reason_index

Use model translations in adjustment_reason view
@jhawthorn jhawthorn merged commit e60443a into solidusio:master Feb 16, 2016
@Murph33 Murph33 deleted the use_model_translation_adjustment_reason_index branch February 18, 2016 17:52
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

2 participants