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

Version 2.0 #122

Merged
merged 19 commits into from
May 2, 2018
Merged

Conversation

jhawthorn
Copy link
Contributor

@jhawthorn jhawthorn commented Apr 6, 2018

This removes almost all of the functionality from the extension in favour of the new functionality which is built-in to Solidus itself.

This proposed version 2.0 of solidus_i18n provides nothing other than locale files, doesn't require deface, and doesn't do any class_eval or module prepends.

Functionality moved to Solidus itself:

Removed functionality:

TODO:

  • Upgrade instructions/changelog
  • README instructions for routing-filter gem
  • Remove rails-i18n and kaminari-i18n
  • Remove specs

@tvdeyen
Copy link
Member

tvdeyen commented Apr 6, 2018

Tested while working on solidusio/solidus#2684. Working great so far 👍 and fixes lots of bugs while switching admin locales. We should drop < 2.6 support IMO. There is still a version working for < 2.6 and translations files can easily be updated in the store application (this is recommended anyway)

README.md Outdated

bin/rails g solidus_i18n:install
1. Add gem to your `Gemfile`, then run `bundle install`
Copy link
Member

Choose a reason for hiding this comment

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

Add this gem to your ...

@tvdeyen
Copy link
Member

tvdeyen commented Apr 6, 2018

We should remove rails-i18n and kaminari-i18n dependencies as well and encourage people to copy over the locale files they actually need over into their host app. I doubt anybody is using all locales available in their stores. Loading so many locales all the time only bloats their apps.

s.add_runtime_dependency 'solidus_core', ['>= 1.1', '< 3']
s.add_runtime_dependency 'solidus_support'
s.add_runtime_dependency 'deface', '~> 1.0'

s.add_development_dependency 'byebug'
s.add_development_dependency 'capybara', '~> 2.17'
Copy link
Member

Choose a reason for hiding this comment

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

Do we still have tests left, then?

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 need to remove them still. I'd like some extremely simple tests (basically, verify YAML is valid). We won't need capybara

jhawthorn and others added 18 commits April 26, 2018 14:58
As far as I can tell engines do this by default and this is unnecessary.
We no longer have any
These will be built-in to Solidus in version 2.6.
We no longer have any files which would be autoloaded by this. This
shouldn't really be done anyways (making lib autoloaded, use app).
We no longer have any functionality, so just test that we're adding the
locales we want to.
Users can add this themselves
@jhawthorn jhawthorn changed the title RFC: Version 2.0 (maybe) Version 2.0 Apr 26, 2018
@jhawthorn
Copy link
Contributor Author

jhawthorn commented Apr 26, 2018

This is ready to go :shipit:

I'm not sure what we should do to support versions < 2.6. Maybe a solidus_i18n_backports gem to inject the new Solidus 2.6 functionality into old versions?

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.

I'm not sure what we should do to support versions < 2.6. Maybe a solidus_i18n_backports gem to inject the new Solidus 2.6 functionality into old versions?

I don’t think we need to. Maybe we release a 1.3 version that restricts the version of Solidus to < 2.6?

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.

Do we still need solidus_support

s.add_runtime_dependency 'i18n_data', '~> 0.7.0'
s.add_runtime_dependency 'rails-i18n', ['>= 4.0.1', '< 6']
s.add_runtime_dependency 'kaminari-i18n', '~> 0.5.0'
s.add_runtime_dependency 'routing-filter', '~> 0.6.0'
s.add_runtime_dependency 'solidus_core', ['>= 1.1', '< 3']
s.add_runtime_dependency 'solidus_support'
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need solidus_support? Couldn’t find any usages anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope!

@jhawthorn jhawthorn merged commit 3c4787a into solidusio:master May 2, 2018
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.

2 participants