Language-Aware "Random Book" Feature
With Open Library becoming increasingly more language-aware (edition aware carousals, etc), it would be nice if the "Random Book" feature was as well. For example, only showing books with French editions available when the user has chosen to display the website in French.
Relevant code
This function will need to take into account the current user language:
https://github.com/internetarchive/openlibrary/blob/35e1ecef5cc8841f6efe33656343b14181ebbd1d/openlibrary/plugins/openlibrary/home.py#L126-L131
https://github.com/internetarchive/openlibrary/blob/35e1ecef5cc8841f6efe33656343b14181ebbd1d/openlibrary/plugins/openlibrary/home.py#L112-L123
But only for populated languages. Something similar to this:
https://github.com/internetarchive/openlibrary/blob/10ed6bead1358571a3fcae970fb1fc332f39873e/openlibrary/macros/QueryCarousel.html#L17-L23
Can you help me to get the repo to contribute ?
Hi @SinhaS12 , please see our Git cheat sheet: https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet . And follow the guides on https://docs.openlibrary.org/ .
I also added some more information on how this issue can be tackled.