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

Remove attribute translations for associations #876

Merged
merged 1 commit into from
Feb 18, 2016

Conversation

Murph33
Copy link
Contributor

@Murph33 Murph33 commented Feb 18, 2016

As an example instead of having

activerecord:
  attributes:
    spree/address:
      country_id: Country

just explicitly use Spree::Country.model_name.human on the form label.

This PR will correct previous changes made to this preferred method as discussed in #735 and pointed out by #856 (comment)

@Murph33 Murph33 closed this Feb 18, 2016
@Murph33 Murph33 deleted the remove_association_translations branch February 18, 2016 17:16
@Murph33 Murph33 restored the remove_association_translations branch February 18, 2016 17:17
@Murph33 Murph33 reopened this Feb 18, 2016
@cbrunsdon
Copy link
Contributor

Are we sure we want to switch it to Shipping category from Shipping Category, which one should be the appropriate model name?

@Murph33
Copy link
Contributor Author

Murph33 commented Feb 18, 2016

In the error message it's that text that is rendered now but the text that is displayed on the page is Shipping Category. This is also just reverting the text back to before the change to use attribute translation. I guess the error message is pulled from the labels model by default and it is smart enough to use a label translation if one is implemented

@cbrunsdon
Copy link
Contributor

okay, thats fair to me than, thanks. I don't super care about casing myself but was wondering why the change. 👍

@Murph33 Murph33 force-pushed the remove_association_translations branch 3 times, most recently from e6eb4cf to 17cfb7a Compare February 18, 2016 19:07
Example.  Instead of having country_id having a translation under the
address model attributes of country just use
Spree::Country.model_name.human.
@Murph33 Murph33 force-pushed the remove_association_translations branch from 17cfb7a to 20d7e96 Compare February 18, 2016 19:33
@jhawthorn
Copy link
Contributor

👍

jhawthorn added a commit that referenced this pull request Feb 18, 2016
Remove attribute translations for associations
@jhawthorn jhawthorn merged commit df312f0 into solidusio:master Feb 18, 2016
@Murph33 Murph33 deleted the remove_association_translations branch February 18, 2016 20:12
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