victrme / Bonjourr

Minimalist & lightweight startpage inspired by iOS
https://bonjourr.fr
GNU General Public License v3.0
836 stars 99 forks source link

Ability to set custom quotes source #379

Closed ChainsLunatic closed 1 month ago

ChainsLunatic commented 1 month ago

I have implemented #373 with the ability to specify both CSV and JSON urls. The response type will be determined by looking at the responses content-type header-value and if this doesn't result in json or csv the extension will be checked against json. If this also doesn't work we will just assume its a csv response. The json must be in the same format as the official Bonjourr apis.

The feature can be tested with the following api urls:

Quotable serves it's api with all necessary fields Bonjourr expects.

I couldn't get the translate script to work so I didn't try how to translate the message that's being passed to the network forms warn method. Maybe you can guide me there?

victrme commented 1 month ago

The translate is only here for us to translate Bonjourr faster than manually changing all the locales. It doesn't actually translate strings on the fly...

Everything looks good to me, this is very well done! We'll add more information in our documentation on how to use this feature, and it will be available in the next update!

Thank you for your work 🙏