1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-17 06:52:27 +01:00

[bug] unable to set locale other than fr or en

This commit is contained in:
Sylvain 2017-04-27 18:35:00 +02:00
parent ca012322fb
commit 89e30980e0
7 changed files with 19 additions and 2 deletions

View File

@ -1,5 +1,9 @@
# Changelog Fab Manager
## Next Release
- Fix a bug: Unable to define application locale other than `fr` or `en`.
- [TODO DEPLOY] add `APP_LOCALE` environment variable (see README.md for configuration details)
## v2.5.3 2017 April 27
- Project view: added responsive support on external images
@ -13,7 +17,7 @@
## v2.5.1 2017 March 28
- hide spaces in admin's credit management if spaces are disabled
- Fix a bug : Can not display training tracking (this bug was introduced in version 2.5.0)
- Fix a bug: Can not display training tracking (this bug was introduced in version 2.5.0)
- [TODO DEPLOY] `rake assets:precompile`
## v2.5.0 2017 March 28

View File

@ -546,6 +546,12 @@ If you are in a development environment, your can keep the default values, other
<a name="i18n-settings"></a>
#### Settings
APP_LOCALE
Configure application's main localization and translation settings.
See `config/locales/app.*.yml` for a list of available locales. Default is **en**.
RAILS_LOCALE
Configure Ruby on Rails localization settings (currency, dates, number formats ...).

View File

@ -30,7 +30,7 @@
Fablab.gaId = "<%= Rails.application.secrets.google_analytics_id %>";
// i18n stuff
Fablab.locale = "<%= I18n.locale %>";
Fablab.locale = "<%= Rails.application.secrets.app_locale %>";
Fablab.moment_locale = "<%= Rails.application.secrets.moment_locale %>";
Fablab.summernote_locale = "<%= Rails.application.secrets.summernote_locale %>";
Fablab.fullcalendar_locale = "<%= Rails.application.secrets.fullcalendar_locale %>";

View File

@ -35,6 +35,7 @@ module Fablab
# /!\ ALL locales SHOULD be configured accordingly with this locale. /!\
#
config.i18n.default_locale = Rails.application.secrets.rails_locale
config.i18n.fallbacks = [Rails.application.secrets.app_locale, :en]
config.assets.paths << Rails.root.join('vendor', 'assets', 'components').to_s

View File

@ -41,6 +41,7 @@ TWITTER_ACCESS_TOKEN_SECRET: ''
FACEBOOK_APP_ID: ''
RAILS_LOCALE: 'fr'
APP_LOCALE: 'fr'
MOMENT_LOCALE: 'fr'
SUMMERNOTE_LOCALE: 'fr-FR'
ANGULAR_LOCALE: 'fr-fr'

View File

@ -26,6 +26,7 @@ development:
uib_date_format: <%= ENV["UIB_DATE_FORMAT"] %>
excel_date_format: <%= ENV["EXCEL_DATE_FORMAT"]%>
rails_locale: <%= ENV["RAILS_LOCALE"] %>
app_locale: <%= ENV["APP_LOCALE"] %>
moment_locale: <%= ENV["MOMENT_LOCALE"] %>
summernote_locale: <%= ENV["SUMMERNOTE_LOCALE"] %>
angular_locale: <%= ENV["ANGULAR_LOCALE"] %>
@ -60,6 +61,7 @@ test:
uib_date_format: dd/MM/yyyy
excel_date_format: dd/mm/yyyy
rails_locale: en
app_locale: en
moment_locale: en
summernote_locale: en-US
angular_locale: en-us
@ -99,6 +101,7 @@ staging:
uib_date_format: <%= ENV["UIB_DATE_FORMAT"] %>
excel_date_format: <%= ENV["EXCEL_DATE_FORMAT"]%>
rails_locale: <%= ENV["RAILS_LOCALE"] %>
app_locale: <%= ENV["APP_LOCALE"] %>
moment_locale: <%= ENV["MOMENT_LOCALE"] %>
summernote_locale: <%= ENV["SUMMERNOTE_LOCALE"] %>
angular_locale: <%= ENV["ANGULAR_LOCALE"] %>
@ -140,6 +143,7 @@ production:
uib_date_format: <%= ENV["UIB_DATE_FORMAT"] %>
excel_date_format: <%= ENV["EXCEL_DATE_FORMAT"]%>
rails_locale: <%= ENV["RAILS_LOCALE"] %>
app_locale: <%= ENV["APP_LOCALE"] %>
moment_locale: <%= ENV["MOMENT_LOCALE"] %>
summernote_locale: <%= ENV["SUMMERNOTE_LOCALE"] %>
angular_locale: <%= ENV["ANGULAR_LOCALE"] %>

View File

@ -38,6 +38,7 @@ TWITTER_ACCESS_TOKEN_SECRET=
FACEBOOK_APP_ID=
RAILS_LOCALE=fr
APP_LOCALE=fr
MOMENT_LOCALE=fr
SUMMERNOTE_LOCALE=fr-FR
ANGULAR_LOCALE=fr-fr