semaperepelitsa / subdomain_locale Goto Github PK
View Code? Open in Web Editor NEWMoves current locale into subdomain in your Rails app
License: MIT License
Moves current locale into subdomain in your Rails app
License: MIT License
I see that this gem doesn't support rails 5. What stops it from doing so? Is there any way I can help you getting past that?
Thank you for considering that!
Would be great if subdomain_locale can patch links in mailer as well without explicit setting locale: I18n.locale
In Gemfile:
rails (= 4.2.1) ruby depends on
activejob (= 4.2.1) ruby depends on
activesupport (= 4.2.1) ruby depends on
i18n (~> 0.7) ruby
subdomain_locale (>= 0) ruby depends on
i18n (~> 0.6.9) ruby
Hey ho!
I'am very interested on your gem because I am do it that on my app.
The problem I have is when I switch the language on a page that has a URL that is different for every available locale. Is your gem implemented thinking in that point?
Could it be nice to have tha feature, right?
Thanks guys!
Bundler could not find compatible versions for gem "railties":
In Gemfile:
rails (= 6.1.2) was resolved to 6.1.2, which depends on
railties (= 6.1.2)
subdomain_locale (~> 1.3) was resolved to 1.3.0, which depends on
railties (>= 5.0, < 6.0)
It would be good for consistency to patch polymorphic_url
too to support locale
parameter, like url_for
. Something like:
def polymorphic_url(record_or_hash_or_array, options = {})
options = options.dup
if options.key?(:locale)
locale = options.delete(:locale)
options[:subdomain] = subdomain_locales.subdomain_for(locale)
options[:only_path] = false
end
super record_or_hash_or_array, options
end
I don't know yet where to monkeypatch this method.
subdomain_locale at ... did not have a valid gemspec.
This prevents bundler from installing bins or native extensions, but that may not affect its functionality.
The validation message from Rubygems was:
["test/controller_test.rb", "test/lib/i18n.rb", "test/acceptance_test.rb"] are not files
Maybe git ls-files
is less error-prone.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.