[GraphQL]: fix geo_areas docs

This commit is contained in:
Paul Chavard 2019-11-07 13:52:48 +01:00
parent a23e84bc57
commit 9ce81f665b
3 changed files with 16 additions and 11 deletions

View file

@ -402,22 +402,17 @@ interface GeoArea {
enum GeoAreaSource { enum GeoAreaSource {
""" """
translation missing: fr.activerecord.attributes.geo_area.source.cadastre Parcelle cadastrale
""" """
cadastre cadastre
""" """
translation missing: fr.activerecord.attributes.geo_area.source.parcelle_agricole Quartier prioritaire
"""
parcelle_agricole
"""
translation missing: fr.activerecord.attributes.geo_area.source.quartier_prioritaire
""" """
quartier_prioritaire quartier_prioritaire
""" """
translation missing: fr.activerecord.attributes.geo_area.source.selection_utilisateur Sélection utilisateur
""" """
selection_utilisateur selection_utilisateur
} }

View file

@ -4,9 +4,11 @@ module Types
class GeoAreaSource < Types::BaseEnum class GeoAreaSource < Types::BaseEnum
GeoArea.sources.each do |symbol_name, string_name| GeoArea.sources.each do |symbol_name, string_name|
value(string_name, if string_name != "parcelle_agricole"
I18n.t(symbol_name, scope: [:activerecord, :attributes, :geo_area, :source]), value(string_name,
value: symbol_name) I18n.t(symbol_name, scope: [:activerecord, :attributes, :geo_area, :source]),
value: symbol_name)
end
end end
end end

View file

@ -0,0 +1,8 @@
fr:
activerecord:
attributes:
geo_area:
source:
cadastre: Parcelle cadastrale
quartier_prioritaire: Quartier prioritaire
selection_utilisateur: Sélection utilisateur