Make portuguese locale work
There was a problem with the portuguese locale. The locale was pt-BR, but `globalize_accessors` gem doesn't allow the creation of methods using locales with that format. To avoid transforming pt-BR to pt and lose the distinction of the different variations of the language, a function has been added to transform pt-BR into pt_br (without changing the locale itself). That way, when globalize uses the locales, all of them will have a valid format (downcased and underscored) AND they will be always the same (comparing pt-BR with pt_br doesn't work).
This commit is contained in:
@@ -7,8 +7,8 @@ class Budget
|
||||
max_file_size: 3.megabytes,
|
||||
accepted_content_types: [ "application/pdf" ]
|
||||
|
||||
translates :description, touch: true
|
||||
globalize_accessors locales: [:en, :es, :fr, :nl, :val]
|
||||
translates :title, :description, touch: true
|
||||
globalize_accessors locales: [:en, :es, :fr, :nl, :val, :pt_br]
|
||||
|
||||
belongs_to :investment
|
||||
|
||||
|
||||
Reference in New Issue
Block a user