aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/chouette
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/chouette')
-rw-r--r--app/models/chouette/area_type.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/models/chouette/area_type.rb b/app/models/chouette/area_type.rb
index e17d2ee8d..4feb5c914 100644
--- a/app/models/chouette/area_type.rb
+++ b/app/models/chouette/area_type.rb
@@ -34,9 +34,9 @@ class Chouette::AreaType
@@options = {}
end
- def self.options(kind=:all)
+ def self.options(kind=:all, locale=nil)
@@options ||= {}
- @@options[kind] ||= self.send(kind).map { |c| find(c) }.map { |t| [ t.label, t.code ] }
+ @@options[kind] ||= self.send(kind).map { |c| find(c) }.map { |t| [ t.label(locale), t.code ] }
end
attr_reader :code
@@ -48,8 +48,8 @@ class Chouette::AreaType
all.index(code) <=> all.index(other.code)
end
- def label
- I18n.translate code, scope: 'area_types.label'
+ def label locale=nil
+ I18n.translate code, scope: 'area_types.label', locale: locale
end
end