Rework locale selection
authorTom Hughes <tom@compton.nu>
Wed, 6 Jan 2016 18:43:25 +0000 (18:43 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 6 Jan 2016 18:43:25 +0000 (18:43 +0000)
commit4028f4cdb91f616bc774dc9b9fa8c7183eb1f6dd
tree4fc426f18dd734dfa5815bca966151f1a070b820
parent5f4b7d3f916e132f860ab12c017aba638556abf8
Rework locale selection

Implement our own matching algorithm rather than trying to
patch the http_accept_language one and make sure everything is
using it in a consistent way.

Fixes #1125
12 files changed:
app/controllers/amf_controller.rb
app/controllers/application_controller.rb
app/models/notifier.rb
app/models/user.rb
app/views/site/_potlatch2.html.erb
app/views/site/id.html.erb
config/initializers/http_accept_language.rb [deleted file]
config/initializers/i18n.rb
lib/id.rb
lib/locale.rb [new file with mode: 0644]
test/integration/user_creation_test.rb
test/models/user_test.rb