Content
OP5 on Ubuntu with Postgresql => setting locale(s)
Added by jerry Deighvough over 8 years ago
Following manual installation guide:
https://www.openproject.org/open-source/manual-installation/manual-installation-guide/
As postgresql is apparently supported, I strongly prefer to use that. The manual is written using mysql as db.
Aside from some hurdles (what follows could be used to integrate the manual) to install pg gem (needs `apt-get install libpq-dev nodejs`)
and hopefully my interpretation of the openproject installation is correct as follows:
bundle install —deployment —without sqlite development test therubyracer docker
However, upon actually creating the repository and accessing it with its 3rd level domain (huzzah!) I went to adjust the locales. As traditional rails mode I changed application.rb with:
config.i18n.default_locale = :it
config.i18n.available_locales = [:it, :en]
and loaded an it.yml locale file under config/locales.
`touch tmp/restart.txt`
and going under `[…]/my/account`settings the application complains
F, [2016-02-29T06:57:21.539546 #12446] FATAL — :
ActionView::Template::Error (“de” is not a valid locale):
38: html: { id: ‘my_account_form’, class: ‘form -wide-labels’ } do |f| %>
39:
40:
41:
<%= f.select :language, lang_options_for_select, container_class: ‘-middle’ %>
42: <%= render partial: ‘users/preferences’, locals: { input_size: :middle } %>
43:
44:
Console tells me that User.find(1) is the user I have entered in as admin and specifies `language: “it”`
So something believes differently or acts upon the belief that it should be ‘de’ .
All pages are rendered in :en so the application.rb does not seem to be applied…
How to resolve? and … Are there many other such locale traps?
Replies (1)
Don’t mess with application.rb… After start-up as admin go to home, Administration, System settings.. Under views tab, pick desired locales.