module IsoDoc::I18n::Liquid

def ordinal_num(num, label = "", infl = "")

combines inflection information from label and inflection
e.g. "3" | ordinal: "edition", "case:acc"
num | ordinal_num: label, inflection
def ordinal_num(num, label = "", infl = "")
  l = @@i18n.labels[label]
  h = @@i18n.labels["inflection"]&.dig(l, "grammar") || {}
  grammar = h.merge(parse_hash(infl, symbol: false))
  @@i18n.inflect_ordinal(num.to_i, grammar, "OrdinalRules")
end