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 ActiveModel::Naming for calculator descriptions #1544

Closed
17 tasks
mamhoff opened this issue Oct 20, 2016 · 2 comments · Fixed by #1546
Closed
17 tasks

Use ActiveModel::Naming for calculator descriptions #1544

mamhoff opened this issue Oct 20, 2016 · 2 comments · Fixed by #1546

Comments

@mamhoff
Copy link
Contributor

mamhoff commented Oct 20, 2016

All of Spree's calculators and our internationalization would benefit from better use of ActiveModel::Naming, a module included in all Rails models. This is up for grabs, if you want a commit in Solidus, do this for other calculators in core!

The base work for this is done in #1538 - all you'd have to do for each calculator is remove the description class method and add the correct translation key to the spree.models I18n namespace.

Find the docs for ActiveModel::Naming here.

These are the calculators still to be translated:

  • app/models/spree/calculator/flat_percent_item_total.rb
  • app/models/spree/calculator/flat_rate.rb
  • app/models/spree/calculator/flexi_rate.rb
  • app/models/spree/calculator/free_shipping.rb
  • app/models/spree/calculator/percent_on_line_item.rb
  • app/models/spree/calculator/percent_per_item.rb
  • app/models/spree/calculator/price_sack.rb
  • app/models/spree/calculator/returns
  • app/models/spree/calculator/returns/default_refund_amount.rb
  • app/models/spree/calculator/shipping
  • app/models/spree/calculator/shipping/flat_percent_item_total.rb
  • app/models/spree/calculator/shipping/flat_rate.rb
  • app/models/spree/calculator/shipping/flexi_rate.rb
  • app/models/spree/calculator/shipping/per_item.rb
  • app/models/spree/calculator/shipping/price_sack.rb
  • app/models/spree/calculator/tiered_flat_rate.rb
  • app/models/spree/calculator/tiered_percent.rb
@tvdeyen
Copy link
Member

tvdeyen commented Oct 20, 2016

👍

@gevann
Copy link

gevann commented Oct 20, 2016

I'll work on this today

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 a pull request may close this issue.

3 participants