Add a language field to the "get ebooks" dialog.#664
Conversation
|
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... |
This is especially useful when the title of a book does not allow the user to guess the language in which it is written (think of "Oliver Twist" by Dickens or "Nana" by Zola).
d1b3b4a to
ac181d2
Compare
|
Where is code that makes some text able to jump through pages when clicked? Thank you! |
|
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 |
No description provided.