rgerum / unofficial-duolingo-stories

This project brings the official Duolingo Stories to new languages, translated by a community effort.
https://duostories.org
135 stars 28 forks source link

Allow selection of DL's flags by using flag index #285

Closed chickendude closed 4 weeks ago

chickendude commented 2 months ago

(I just realized i branched off of master instead of dev, let me know if you'd like me to branch off of dev instead.)

Description

This was mainly for the Afrikaans course, but this could be useful for other courses as well for countries with multiple official languages with existing flags in Duolingo's flag collection.

This lets you use the flag's index to display that flag. In Afrikaans's case, Duolingo has a course for Zulu, which has the South African flag, so we can re-use the flag by typing its index in the flag value.

Potential Issues

It looks like this doesn't affect any existing flags. Many of the flags have negative values, i'm not sure what those are for, but i made sure to filter out flag values other than those between 1 and 47 inclusive.

Screenshots

image image

vercel[bot] commented 2 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unofficial-duolingo-stories ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 15, 2024 7:45pm