calibre
calibre copied to clipboard
Add a language field to the "get ebooks" dialog.
There's a whole bunch of other amazon plugins you should make similar changes to. See the parse_language() function in sources/amazon.py
Also I thing the language field should contain cacnonicalized langauge names whereever possible, so that the displayed language is the same from all stores. See the get_langauge() and canonicalize_lang() functions in localization.py
The plugins should return ISO lang codes and the GUI should display them as localized language names.
You should not need to maintain your own mapping of german to english language names, it should be there already, see langnames_to_langcodes() in localization.py
Unless of course, libri.de uses different langnames than the ones in the german translation of calibre.
Though I suppose if you want it to work with non-german calibre, you have to maintain your own mapping. So feel free to ignore my previous comment :)
OK, thanks for the tips! I'm going to drop the non-English stores for now, I'm more interested in pushing the new feature. I'll update the PR with a fix for all English Amazon stores.
Unfortunately, you cannot re-use code in that fashion for the amazon plugins. The reason is that store plugins are auto-updated and reloaded dynamically (to keep up with changes to websites). That means they cannot depend on each other. So you'd have to duplicate the code across all amazon plugins -- it's annoying, but...
Where is code that makes some text able to jump through pages when clicked? Thank you!
Is the coronavirus situation in India still not serious enough to kill the author?
For this bug: Amazon meta data plugin should use current locale by default(https://bugs.launchpad.net/calibre/+bug/1256374), can we just change line 176 in the localization.py file to lang = get_system_locale()
?
If not, I am curious how to implement that feature since from other methods, there were various ways to receive user language and that's the dead end..