HomePhabricator

Revamp format_higher_grouping_text logic

Tags
None
Referenced Files
None
Subscribers
None

Description

Revamp format_higher_grouping_text logic

In the Integraality prototype, higher_grouping was
always a country, and as such was displayed as a flag.

When building integraality, we added a higher_grouping_type in
the configuration, which could be set to country to trigger the
flag formatting, and otherwise piping it into the {{Q}} template.

We then got a use-case where users only wanted a pure string,
which was implemented in 8e76a8a85.

Later on, we also got a use case with images. This underlined
how the direction taken in 8e76a8a85 was broken, since we should
infer the type of the grouping from itself.

Actually, that should be doable from the SPARQL result,
but for now let's just do something a bit dirty with regexes.

This also deprecates the string type, which becomes the fallback.

Bug: T223930
Bug: T224212

Details

Provenance
JeanFredAuthored on Oct 25 2019, 2:32 PM
Parents
R2566:6a055c2d4704: Add support for qualifiers
Branches
Unknown
Tags
Unknown
ChangeId
None