Steps to reproduce
Use en-gb locale
Create an issue
However there is a jquery.ui.datepicker-en-GB.js. So it appears that this asset routes are case-sensitive.
I'm not sure what the best way to go about fixing this is. Renaming the file to all downcase did fix it. Alternatively https://github.com/carstengehling/route_downcaser might be a solution.
#2 Updated by Harry Garrood almost 10 years ago
the route_downcaser gem won't help -- I've just noticed it ignores asset paths. (https://github.com/carstengehling/route_downcaser#020)
#3 Updated by Jean-Philippe Lang almost 10 years ago
- Status changed from New to Needs feedback
- Target version set to 2.2.4
Use en-gb locale
#4 Updated by Harry Garrood almost 10 years ago
This is what I've done:
cd /path/to/redmine rake db:drop db:create # remove all plugins rm -rf plugins/* # I have Redmine checked out from SVN at trunk svn revert -R . rake db:migrate rails s
- Visit Redmine and log in with admin:admin
- Go to Administration and press the 'Load default data' button. Language has defaulted to 'English (British)'
- Create an issue
- GET /issues/1
- Page contains:
Some more info:
User.find_by_login('admin').languagereturns an empty string.
request.env['HTTP_ACCEPT_HEADER']in IssuesController#show returns "en-GB,en-US;q=0.8,en;q=0.6" (I'm using Chromium)
echo $LANGin terminal produces en_GB.UTF-8
Setting my language to en-GB explicitly doesn't appear to have any effect.
#5 Updated by Harry Garrood almost 10 years ago
Oh this also probably is relevant -- here's a portion of the <select> tag in the /my/account page:
<option value="en-ind">English</option> <option value="en-au">English</option> <option value="en">English</option> <option value="en-ca">English</option> <option value="en-us">English</option> <option value="en-bork">English</option> <option value="en-gb">English (British)</option> <option value="en-GB">English (British)</option>
Also, I18n.available_locales produces (non 'en*' ones removed):
[... :en, :"en-GB", :"en-au", :"en-bork", :"en-ca", :"en-gb", :"en-ind", :"en-us" ...]
#8 Updated by Harry Garrood almost 10 years ago
Ah! It's because I had the faker gem in my Gemfile.local:
$ rails c >> pp I18n.load_path [...] "/home/harry/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/faker-1.1.2/lib/locales/en-gb.yml", "/home/harry/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/faker-1.1.2/lib/locales/en-us.yml", "/home/harry/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/faker-1.1.2/lib/locales/en-au.yml", "/home/harry/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/faker-1.1.2/lib/locales/fr.yml", "/home/harry/.rbenv/versions/1.9.3-p327/lib/ruby/gems/1.9.1/gems/faker-1.1.2/lib/locales/en-ind.yml", [...]
#10 Updated by Harry Garrood almost 10 years ago
Everything does work fine after removing it. I'm not really sure what's going on. I guess it's not up to me to say whether the issue's invalid.
Having said that, re whether to close, I would lean towards 'no'; adding a gem to Gemfile.local shouldn't be having this effect, I don't think.
#12 Updated by Harry Garrood almost 10 years ago
Ok, I found what's causing it: https://github.com/stympy/faker/blob/master/lib/faker.rb#L9
Having seen that line, I don't think that's something which should be changed in Redmine. For anyone facing the same problem: put the gem into the :test group in Gemfile.local, and then it won't mess with I18n in development or production.
This issue should probably be closed as invalid. Sorry guys.