Page MenuHomePhabricator

Web2Cit score should handle equivalent language field values
Open, Needs TriagePublicFeature

Description

Feature summary (what you would like to be able to do and where):
The language field accepts a series of values, some of which are equivalent. For example es and spanish.

Consider adding a compare function that takes these equivalencies into account, such that es and spanish return a 100% score.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
Citoid may be returning spanish (because that's what the Zotero translator may return). The user may be unaware of this when defining a translation rule, and enter es instead (see T308328). The same or another user may legitimately use the Citoid selection step in the corresponding template field. This would render a misleading mismatch between the translation output and the expected output.

Benefits (why should this be implemented?):
...

Event Timeline

I think that the best we could do is convert things like spanish to its canonical form es.

What about things like es-AR? Do any citation templates make use of the AR part in the example?

Hi Diego, in Spanish Wikipedia, en-GB is translated as inglés británico, so it's relevant

Captura desde 2022-07-12 13-05-38.png (90×337 px, 14 KB)

Captura desde 2022-07-12 13-06-34.png (231×613 px, 17 KB)