Open aplaice opened 1 year ago
Regarding the scope, I would limit ourselves to "both flags exist and are commonly used".
To decide this, perhaps we could compare multiple sources like Larousse, Britannica, etc. (cf. #111) and include both flags when at least one source differs?
I would argue that we should also specify that the civil and state flags must differ significantly (e.g. at least one "major" difference). This will avoid including Belgium or trying to figure out if one of the sources uses the civil or state flag, which is not always obvious when only the size or colour differs.
Adding this to the extended deck is not a bad idea. This is quite niche after all. Moreover, extended deck users most likely use CrowdAnki already and won't be as scared of seeing the note model merger pop-up, which would make adding one or two new fields less of a con.
Do you think we could find a way to add a single field with only the alternative flag? Could the template somehow infer the text to display (civil/state) from the filename of the alternative flag?
To decide this, perhaps we could compare multiple sources like Larousse, Britannica, etc. (cf. https://github.com/anki-geo/ultimate-geography/issues/111) and include both flags when at least one source differs?
That should work! Britannica, Larousse and the two Wikipedia articles should hopefully be sufficient. (Having more allows us to be less affected by edit wars on Wikipedia — what do we do when Wikipedia is the outlier (say the only one with the civil flag) and flips (say to displaying the state flag)? — but is also more tedious to implement.) (If we go "wide" in sources, maybe we could also use FOTW as one?)
Do you think we could find a way to add a single field with only the alternative flag? Could the template somehow infer the text to display (civil/state) from the filename of the alternative flag?
That's a brilliant idea! :) It should be doable with pure CSS (with a combination of img[src*="-civil"]
and ::before
or with invisible elements made visible with sibling combinators ~
). The disadvantage is that the text wouldn't be translated (but then "Flag similar to" is also currently not translated).
The two key questions are the criteria (for which countries do we add it / what is "commonly used"?) and the technical implementation.
Criteria/scope
The criteria should obviously be as objective as possible.
However, before choosing criteria, I think we should try to decide on the approximate scope. Some slightly haphazard (and likely incomplete) groups of countries:
Both civil and state flags exist and are both (AFAICT — I may very well be wrong) commonly used:
Bolivia, Peru, Costa Rica, Venezuela
These probably should have an explanation.
Both civil and state flags exist, but the alternative flags are (AFAICT — I am even more likely to be wrong :)) not as commonly used:
Spain, El Salvador, Argentina, Guatemala, Germany, Austria, Poland, Serbia, Hungary (?), Lithuania (?), Andorra, Denmark, Luxembourg
We might want to have an explanation, but perhaps not. ???
There are alternative flags, but they're simply state/civil/naval/etc. ensigns/jacks (or war flags...) rather than national/state/civil flags.
IMO we definitely shouldn't mention them.
There are alternative versions of the national flag that differ in slight details (shades of colours/dimensions):
France, Luxembourg
(Probably safe to ignore?)
Weird cases (though not civil/state flags) / might also be interesting
(A couple of countries belong to multiple groups.)
Implementation
New field
Pros:
Cons:
For people not using CrowdAnki (i.e. those who had already imported the standard, English APKG deck from AnkiWeb), updating the deck with an extra/new field is impossible (AFAICT ‽‽‽ I hope I'm doing something wrong when testing), with a message like:
(1 because I tested with only one note.)
They can still update by importing with CrowdAnki, but that's inconvenient (if the user doesn't already have CrowdAnki installed).
Reuse of flag similarity field
Pros:
Cons:
flag_similarity.csv
file. :)Other questions
Do we include images of the alternative flag(s)?
If we were to add two new fields (say "flag info" (differing between translations) and "alternative flag image" (the same for all languages)) we could very easily include an image without duplication between languages.
The alternative flag could be smaller than the main flag or hidden behind a "show" toggle or both.
For example, as a _very_ rough preview:
![screenshot_2023-01-14_22:49:14](https://user-images.githubusercontent.com/16461345/212499246-1eda1d4f-91d5-4181-8d4f-d8b7919d2cd6.png) ![screenshot_2023-01-14_22:49:21](https://user-images.githubusercontent.com/16461345/212499245-dc4e512c-325b-4da0-9183-c5b7d2eec01a.png) (Note: the alternative flag here is actually the same as the main flag as I was lazy. :) )This becomes slightly less clear if there are multiple alternative flags. (All the descriptions are grouped together, and all the images are grouped together, rather than having
description 1
,image 1
,description 2
,image 2
, etc.) However, I don't think this would be illegible.Do we add the explanations for all versions of the deck (standard and extended), only for the extended deck or (at first) only in a new, experimental version of the deck? (With BrainBrew all these options are trivial! :))
Sorry for my verbosity...