Method: IsoDoc::PresentationXMLConvert#eref_locality_populate
- Defined in:
- lib/isodoc/presentation_function/erefs.rb
#eref_locality_populate(type, node, number) ⇒ Object
185 186 187 188 189 190 191 192 193 194 195 |
# File 'lib/isodoc/presentation_function/erefs.rb', line 185 def eref_locality_populate(type, node, number) node["droploc"] == "true" and return "" loc = type.sub(/^locality:/, "") ret = @i18n.locality[loc] || loc number == "pl" and ret = @i18n.inflect(ret, number: "pl") ret = case node["case"] when "lowercase" then ret.downcase else Metanorma::Utils.strict_capitalize_first(ret) end " #{ret}" end |