anki-geo / ultimate-geography

Geography flashcard deck for Anki
https://ankiweb.net/shared/info/2109889812
Other
823 stars 81 forks source link

Add explanation when both the civil and state flags are commonly used #591

Open aplaice opened 1 year ago

aplaice commented 1 year ago

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:

  1. 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.

  2. 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. ???

  3. 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.

  4. There are alternative versions of the national flag that differ in slight details (shades of colours/dimensions):

    France, Luxembourg

    (Probably safe to ignore?)

  5. Weird cases (though not civil/state flags) / might also be interesting

(A couple of countries belong to multiple groups.)


Implementation

Do we add a new field, reuse the flag similarity field, etc.?

New field

Pros:

  1. Arguably neater/cleaner (?), with a "separation of concerns".

Cons:

  1. For people using CrowdAnki, updating the deck with an extra/new field results in a slightly scary message (but if users don't change any options everything works perfectly).
  2. 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:

    Notes that could not be imported as note type has changed: ⁨1 [Skipped] .....

    (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:

  1. (Arguable pro — we could have done it anyway...) we'd have to include the text "Flag similar to" that's currently part of the note template in the contents of the flag similarities field (since some "flag similarities" wouldn't actually be similarities) , which would mean that it would be translated into each language.

Cons:

  1. We'd have to include the text "Flag similar to" as part of the flag similarities field, which would result in a huge amount of duplication and a bloating of the flag_similarity.csv file. :)
  2. If we rename the "flag similarity" field (say to "flag info", so that it's no longer a confusing misnomer) then AFAICT we have exactly the same issues when updating of the deck as for the new field (in particular APKG import is, based on my tests, impossible??).

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...

axelboc commented 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?

aplaice commented 1 year ago

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).