mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-19 13:54:25 +01:00
[bug] invalid currency in notifications for locales with region
This commit is contained in:
parent
7ac119d4cf
commit
82260d8c62
@ -5,11 +5,12 @@
|
||||
- Prevent the worker from crashing if OpenLab is not reachable in dev
|
||||
- Allow setting multiple themes for a single event
|
||||
- Increased the width of the input field for the prices of the events
|
||||
- Fix a bug: invalid currency in notifications for locales with region (eg. fr-CM)
|
||||
- Fix a bug: the notification sent to the project author when a collaborator has confirmed his participation is not sent
|
||||
- Fix a bug: the event themes are not kept when editing the event again
|
||||
- Fix a bug: the count of successfully updated events was not correct
|
||||
- Fix a bug: german watermark was missing
|
||||
- Fix a bug: invoices are not generated in test/development if the configured locale is composed (eg. fr-CA)
|
||||
- Fix a bug: invoices are not generated in test/development for locale with region (eg. fr-CA)
|
||||
- Fix a security issue: updated underscore to 1.12.1 to fix [CVE-2021-23358](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-23358)
|
||||
- Fix a security issue: updated lodash to 4.17.21 to fix [CVE-2021-23337](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-23337)
|
||||
- Fix a security issue: updated url-parse to 1.5.1 to fix [CVE-2021-27515](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-27515)
|
||||
|
@ -12,6 +12,7 @@ class ApplicationController < ActionController::Base
|
||||
respond_to :html, :json
|
||||
|
||||
before_action :configure_permitted_parameters, if: :devise_controller?
|
||||
around_action :switch_locale
|
||||
|
||||
# Globally rescue Authorization Errors in controller.
|
||||
# Returning 403 Forbidden if permission is denied
|
||||
@ -61,6 +62,13 @@ class ApplicationController < ActionController::Base
|
||||
head 403
|
||||
end
|
||||
|
||||
# Set the configured locale for each action (API call)
|
||||
# @see https://guides.rubyonrails.org/i18n.html
|
||||
def switch_locale(&action)
|
||||
locale = params[:locale] || Rails.application.secrets.rails_locale
|
||||
I18n.with_locale(locale, &action)
|
||||
end
|
||||
|
||||
# @return [User]
|
||||
# This is a placeholder for Devise's current_user.
|
||||
# As Devise generate the method at runtime, IDEs autocomplete features will complain about 'method not found'
|
||||
|
@ -40,9 +40,6 @@ module Fablab
|
||||
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
||||
config.time_zone = Rails.application.secrets.time_zone
|
||||
|
||||
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
||||
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
||||
|
||||
config.to_prepare do
|
||||
Devise::Mailer.layout 'notifications_mailer'
|
||||
end
|
||||
@ -66,6 +63,10 @@ module Fablab
|
||||
# enable the app to find locales in plugins locales directory
|
||||
config.i18n.load_path += Dir["#{Rails.root}/plugins/*/config/locales/*.yml"]
|
||||
|
||||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||
# the I18n.default_locale when a translation cannot be found).
|
||||
config.i18n.fallbacks = true
|
||||
|
||||
# enable the app to find views in plugins views directory
|
||||
Dir["#{Rails.root}/plugins/*/views"].each do |path|
|
||||
Rails.application.config.paths['app/views'] << path
|
||||
|
@ -86,10 +86,6 @@ Rails.application.configure do
|
||||
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
||||
# config.action_mailer.raise_delivery_errors = false
|
||||
|
||||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||
# the I18n.default_locale when a translation cannot be found).
|
||||
config.i18n.fallbacks = true
|
||||
|
||||
# Send deprecation notices to registered listeners.
|
||||
config.active_support.deprecation = :notify
|
||||
|
||||
|
@ -57,10 +57,6 @@ Rails.application.configure do
|
||||
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
||||
# config.action_mailer.raise_delivery_errors = false
|
||||
|
||||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||
# the I18n.default_locale when a translation cannot be found).
|
||||
config.i18n.fallbacks = true
|
||||
|
||||
# Send deprecation notices to registered listeners.
|
||||
config.active_support.deprecation = :notify
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user