From 6f6d8df431bdca66778aa41b6dc615b77bd70c3b Mon Sep 17 00:00:00 2001 From: Jeroen Hellingman Date: Thu, 2 Sep 2021 11:25:58 +0200 Subject: [PATCH 01/35] Update messages.po Review of Dutch translations (native speaker); improving consistency in vocabulary still needed. --- cps/translations/nl/LC_MESSAGES/messages.po | 195 +++++++++----------- 1 file changed, 91 insertions(+), 104 deletions(-) diff --git a/cps/translations/nl/LC_MESSAGES/messages.po b/cps/translations/nl/LC_MESSAGES/messages.po index 808374cb..bf64a056 100644 --- a/cps/translations/nl/LC_MESSAGES/messages.po +++ b/cps/translations/nl/LC_MESSAGES/messages.po @@ -37,7 +37,7 @@ msgstr "De server is herstart, vernieuw de pagina" #: cps/admin.py:147 msgid "Performing shutdown of server, please close window" -msgstr "Bezig met afsluiten van de server, sluit het venster" +msgstr "Bezig met het afsluiten van de server, sluit het venster" #: cps/admin.py:155 msgid "Reconnect successful" @@ -60,7 +60,7 @@ msgstr "Systeembeheer" #: cps/admin.py:208 msgid "Basic Configuration" -msgstr "Basis configuratie" +msgstr "Basisconfiguratie" #: cps/admin.py:241 msgid "UI Configuration" @@ -123,11 +123,11 @@ msgstr "Ongeldige waarde" #: cps/admin.py:462 msgid "Guest's Locale is determined automatically and can't be set" -msgstr "Gast's locatie is automatisch bepaald en kan niet handmatig worden ingesteld" +msgstr "Gasts locale is automatisch bepaald en kan niet handmatig worden ingesteld" #: cps/admin.py:466 msgid "No Valid Locale Given" -msgstr "Geen geldige locatie is opgegeven" +msgstr "Geen geldige locale is opgegeven" #: cps/admin.py:477 msgid "No Valid Book Language Given" @@ -139,11 +139,11 @@ msgstr "Parameter is niet gevonden" #: cps/admin.py:534 msgid "Invalid Read Column" -msgstr "Ongeldig gelezen kolom" +msgstr "Ongeldige gelezen kolom" #: cps/admin.py:540 msgid "Invalid Restricted Column" -msgstr "Ongeldig beperkt kolom" +msgstr "Ongeldige beperkte kolom" #: cps/admin.py:559 cps/admin.py:1291 msgid "Calibre-Web configuration updated" @@ -151,7 +151,7 @@ msgstr "Calibre-Web-configuratie bijgewerkt" #: cps/admin.py:571 msgid "Do you really want to delete the Kobo Token?" -msgstr "Wil je werkelijk je Kobo Token verwijderen?" +msgstr "Wil je je Kobo Token echt verwijderen?" #: cps/admin.py:573 msgid "Do you really want to delete this domain?" @@ -168,34 +168,34 @@ msgstr "Weet je zeker dat je deze boekenplank wilt verwijderen?" #: cps/admin.py:579 #, fuzzy msgid "Are you sure you want to change locales of selected user(s)?" -msgstr "Weet je zeker dat je deze boekenplank wilt verwijderen?" +msgstr "Weet je zeker dat je de locales van de geselecteerde gebruiker(s) wil veranderen?" #: cps/admin.py:581 msgid "Are you sure you want to change visible book languages for selected user(s)?" -msgstr "Weet je zeker dat je de zichtbaarheidstalen wil veranderen voor de geselecteerde gebruiker(s)?" +msgstr "Weet je zeker dat je de zichtbare talen voor de geselecteerde gebruiker(s) wil veranderen?" #: cps/admin.py:583 msgid "Are you sure you want to change the selected role for the selected user(s)?" -msgstr "Weet je zeker dat je de geselecteerde rol wil veranderen voor de geselecteerde gebruiker(s)?" +msgstr "Weet je zeker dat je de geselecteerde rol van de geselecteerde gebruiker(s) wil veranderen?" #: cps/admin.py:585 #, fuzzy msgid "Are you sure you want to change the selected restrictions for the selected user(s)?" -msgstr "Weet je zeker dat je deze boekenplank wilt verwijderen?" +msgstr "Weet je zeker dat je de geselecteerde beperkingen voor de geselecteerde gebruikers(s) wil verwijderen?" #: cps/admin.py:587 msgid "Are you sure you want to change the selected visibility restrictions for the selected user(s)?" -msgstr "Weet je zeker dat je de geselecteerde zichtbaarheidsbeperkingen wilt verwijderen" +msgstr "Weet je zeker dat je de geselecteerde zichtbaarheidsbeperkingen voor de geselecteerde gebruiker(s) wil veranderen?" #: cps/admin.py:589 #, fuzzy msgid "Are you sure you want to change shelf sync behavior for the selected user(s)?" -msgstr "Weet je zeker dat je de geselecteerde rol wil veranderen voor de geselecteerde gebruiker(s)?" +msgstr "Weet je zeker dat je de synchronisatiegedrag van boekenplanken voor de geselecteerde gebruiker(s) wil veranderen?" #: cps/admin.py:591 #, fuzzy msgid "Are you sure you want to change Calibre library location?" -msgstr "Weet je zeker dat je Calibre-Web wilt stoppen?" +msgstr "Weet je zeker dat je de locatie van de Calibre-bibliotheek wil veranderen?" #: cps/admin.py:740 msgid "Tag not found" @@ -231,16 +231,15 @@ msgstr "De locatie vam het toegangslog is onjuist, voer een geldige locatie in" #: cps/admin.py:1095 msgid "Please Enter a LDAP Provider, Port, DN and User Object Identifier" -msgstr "Voer alsjeblieft een LDAP leverancier, Port, DN en User Object Identifier in" +msgstr "Voer alsjeblieft een LDAP Provider, Port, DN en User Object Identifier in" #: cps/admin.py:1101 -#, fuzzy msgid "Please Enter a LDAP Service Account and Password" -msgstr "Geef een geldige gebruikersnaam op om je wachtwoord te herstellen" +msgstr "Voer een geldig LDAP Service Account en wachtwoord in" #: cps/admin.py:1104 msgid "Please Enter a LDAP Service Account" -msgstr "" +msgstr "Voer een LDAP Service Account in" #: cps/admin.py:1109 #, python-format @@ -249,7 +248,7 @@ msgstr "LDAP Groep Object Filter Moet Een \"%s\" Formaat Identificiatie hebben" #: cps/admin.py:1111 msgid "LDAP Group Object Filter Has Unmatched Parenthesis" -msgstr "LDAP Groep Object Filter Heeft Een Ongelijk Haakje" +msgstr "LDAP Groep Object Filter heeft een niet-gebalanceerd haakje" #: cps/admin.py:1115 #, python-format @@ -258,7 +257,7 @@ msgstr "LDAP Gebruiker Object Filter moet \"%s\" Formaat Identificatie hebben" #: cps/admin.py:1117 msgid "LDAP User Object Filter Has Unmatched Parenthesis" -msgstr "LDAP Gebruiker Filter heeft een ongelijk haakje" +msgstr "LDAP Gebruiker Filter heeft een niet-gebalanceerd haakje" #: cps/admin.py:1124 #, python-format @@ -267,7 +266,7 @@ msgstr "LDAP Lid Gebruiker Filter moet een \"%s\" Formaat Identificatie hebben" #: cps/admin.py:1126 msgid "LDAP Member User Filter Has Unmatched Parenthesis" -msgstr "LDAP Lid Gebruiker Filter heeft een ongelijk haakje" +msgstr "LDAP Lid Gebruiker Filter heeft een niet-gebalanceerd haakje" #: cps/admin.py:1133 msgid "LDAP CACertificate, Certificate or Key Location is not Valid, Please Enter Correct Path" @@ -277,7 +276,7 @@ msgstr "LDAP CACertficaat, Certificaat of Sleutel Locatie is ongeldig. Voer alsj #: cps/admin.py:1536 cps/shelf.py:102 cps/shelf.py:162 cps/shelf.py:205 #: cps/shelf.py:272 cps/shelf.py:333 cps/shelf.py:368 cps/shelf.py:443 msgid "Settings DB is not Writeable" -msgstr "Instellingen niet opgeslagen" +msgstr "DB-instellingen niet opgeslagen" #: cps/admin.py:1186 msgid "DB Location is not Valid, Please Enter Correct Path" @@ -289,16 +288,16 @@ msgstr "Kan niet schrijven naar database" #: cps/admin.py:1204 msgid "Keyfile Location is not Valid, Please Enter Correct Path" -msgstr "SSL-sleutellocatie is niet geldig, voer een geldige locatie in" +msgstr "SSL-sleutellocatie is niet geldig, voer een geldig pad in" #: cps/admin.py:1208 msgid "Certfile Location is not Valid, Please Enter Correct Path" -msgstr "SSL-certificaatlocatie is niet geldig, voer een geldige locatie in" +msgstr "SSL-certificaatlocatie is niet geldig, voer een geldig pad in" #: cps/admin.py:1320 #, fuzzy msgid "Database Configuration" -msgstr "Geavanceerde opties" +msgstr "Databaseconfiguratie" #: cps/admin.py:1336 cps/web.py:1479 msgid "Please fill out all fields!" @@ -443,7 +442,7 @@ msgstr "Geüpload bestand kon niet opgeslagen worden in de tijdelijke map" #: cps/admin.py:1746 msgid "Failed to Create at Least One LDAP User" -msgstr "Mislukt om minstens een LDAP gebruiker aan te maken" +msgstr "Het is niet gelukt tenminste een LDAP gebruiker aan te maken" #: cps/admin.py:1759 #, python-format @@ -495,7 +494,7 @@ msgstr "metagegevens bewerken" #: cps/editbooks.py:458 #, python-format msgid "%(seriesindex)s is not a valid number, skipping" -msgstr "" +msgstr "%(seriesindex)s is geen geldig nummer, sla het over" #: cps/editbooks.py:493 #, python-format @@ -638,11 +637,11 @@ msgstr "%(format)s versturen naar Kindle" #: cps/helper.py:220 cps/tasks/convert.py:73 #, fuzzy, python-format msgid "%(book)s send to Kindle" -msgstr "Versturen naar Kindle" +msgstr "%(book)s verzonden naar Kindle" #: cps/helper.py:225 msgid "The requested file could not be read. Maybe wrong permissions?" -msgstr "Het opgevraagde bestand kan niet worden uitgelezen. Ben je hiertoe gemachtigd?" +msgstr "Het opgevraagde bestand kan niet worden gelezen. Ben je hiertoe gemachtigd?" #: cps/helper.py:322 #, python-format @@ -657,12 +656,12 @@ msgstr "Verwijderen van boek %(id)s mislukt: %(message)s" #: cps/helper.py:339 #, fuzzy, python-format msgid "Deleting book %(id)s from database only, book path in database not valid: %(path)s" -msgstr "Verwijderen van boek %(id)s, boek pad is ongeldig: %(path)s" +msgstr "Verwijder boek %(id)s alleen uit database, boek pad is ongeldig: %(path)s" #: cps/helper.py:394 #, python-format msgid "Rename title from: '%(src)s' to '%(dest)s' failed with error: %(error)s" -msgstr "Kan de naam '%(src)s' niet wijzigen in '%(dest)s': %(error)s" +msgstr "Kan de titel '%(src)s' niet wijzigen in '%(dest)s': %(error)s" #: cps/helper.py:409 #, python-format @@ -698,7 +697,7 @@ msgstr "Fout bij downloaden omslag" #: cps/helper.py:610 msgid "Cover Format Error" -msgstr "Onjuist omslag formaat" +msgstr "Onjuist omslagformaat" #: cps/helper.py:620 msgid "Failed to create path for cover" @@ -710,7 +709,7 @@ msgstr "Omslag-bestand is geen afbeelding of kon niet opgeslagen worden" #: cps/helper.py:647 msgid "Only jpg/jpeg/png/webp/bmp files are supported as coverfile" -msgstr "Alleen jpg/jpeg/png/webp/bmp bestanden worden ondersteund als voorblad" +msgstr "Alleen jpg/jpeg/png/webp/bmp bestanden worden ondersteund als omslag" #: cps/helper.py:660 msgid "Only jpg/jpeg files are supported as coverfile" @@ -1034,7 +1033,7 @@ msgstr "Boekenplank maken" #: cps/shelf.py:238 #, fuzzy msgid "Sorry you are not allowed to edit this shelf" -msgstr "Je bent niet gemachtigd om boeken te verwijderen van boekenplank: %(sname)s" +msgstr "Je bent niet gemachtigd deze boekenplank aan te passen" #: cps/shelf.py:240 msgid "Edit a shelf" @@ -1067,7 +1066,7 @@ msgstr "Een persoonlijke boekenplank met de naam '%(title)s' bestaat al." #: cps/shelf.py:378 #, python-format msgid "Change order of Shelf: '%(name)s'" -msgstr "Volgorde bewerken van boekenplank: '%(name)s'" +msgstr "Volgorde van boekenplank veranderen: '%(name)s'" #: cps/shelf.py:448 #, python-format @@ -1096,7 +1095,7 @@ msgstr "De update-informatie kan niet worden opgehaald" #: cps/updater.py:427 msgid "Click on the button below to update to the latest stable version." -msgstr "Klik op onderstaande knop om de laatste stabiele versie te installeren." +msgstr "Klik op de onderstaande knop om de laatste stabiele versie te installeren." #: cps/updater.py:436 cps/updater.py:450 cps/updater.py:461 #, python-format @@ -1207,7 +1206,7 @@ msgstr "Lees Status = %(status)s" #: cps/web.py:1354 msgid "Error on search for custom columns, please restart Calibre-Web" -msgstr "" +msgstr "Fout tijdens het zoeken van aangepaste kolommen, start Calibre-Web opnieuw op" #: cps/web.py:1449 #, python-format @@ -1275,7 +1274,7 @@ msgstr "Je bent ingelogd als: '%(nickname)s'" #: cps/web.py:1633 cps/web.py:1682 #, python-format msgid "%(name)s's profile" -msgstr "%(name)s's profiel" +msgstr "%(name)ss profiel" #: cps/web.py:1649 msgid "Profile updated" @@ -1321,7 +1320,7 @@ msgstr "Calibre mislukt met foutmelding: %(error)s" #: cps/templates/admin.html:9 msgid "Users" -msgstr "Gebruikerslijst" +msgstr "Gebruikers" #: cps/templates/admin.html:13 cps/templates/login.html:8 #: cps/templates/login.html:9 cps/templates/register.html:8 @@ -1471,11 +1470,11 @@ msgstr "Reverse proxy header naam" #: cps/templates/admin.html:153 #, fuzzy msgid "Edit Calibre Database Configuration" -msgstr "Bewerk basis configuratie" +msgstr "Bewerk Calibre databaseconfiguratie" #: cps/templates/admin.html:154 msgid "Edit Basic Configuration" -msgstr "Bewerk basis configuratie" +msgstr "Bewerk basisconfiguratie" #: cps/templates/admin.html:155 msgid "Edit UI Configuration" @@ -1783,7 +1782,7 @@ msgstr "Geselecteerde boeken verwijderen" #: cps/templates/book_table.html:29 msgid "Exchange author and title" -msgstr "" +msgstr "Auteur en titel omwisselen" #: cps/templates/book_table.html:35 msgid "Update Title Sort automatically" @@ -1804,7 +1803,7 @@ msgstr "Titel" #: cps/templates/book_table.html:52 msgid "Enter Title Sort" -msgstr "Voer Titel sorteer volgorde in" +msgstr "Voer Titel sorteervolgorde in" #: cps/templates/book_table.html:52 msgid "Title Sort" @@ -1812,7 +1811,7 @@ msgstr "Titel sorteren" #: cps/templates/book_table.html:53 msgid "Enter Author Sort" -msgstr "Voer Auteur sorteer volgorde in" +msgstr "Voer Auteur sorteervolgorde in" #: cps/templates/book_table.html:53 msgid "Author Sort" @@ -1844,7 +1843,7 @@ msgstr "Voer publicatiedatum in" #: cps/templates/book_table.html:60 msgid "Enter Publishers" -msgstr "Voer Uitgevers in" +msgstr "Voer uitgevers in" #: cps/templates/book_table.html:75 cps/templates/modal_dialogs.html:46 msgid "Are you really sure?" @@ -1852,11 +1851,11 @@ msgstr "Weet je het zeker?" #: cps/templates/book_table.html:79 msgid "Books with Title will be merged from:" -msgstr "Boeken met de Titel zullen worden samengevoegd van:" +msgstr "Boeken met de titel zullen worden samengevoegd van:" #: cps/templates/book_table.html:83 msgid "Into Book with Title:" -msgstr "In boek met Titel:" +msgstr "In boek met titel:" #: cps/templates/book_table.html:88 msgid "Merge" @@ -1889,7 +1888,7 @@ msgstr "Intrekken" #: cps/templates/config_db.html:67 #, fuzzy msgid "New db location is invalid, please enter valid path" -msgstr "Database niet gevonden, voer de juiste locatie in" +msgstr "Database niet gevonden, voer een geldig pad in" #: cps/templates/config_edit.html:17 msgid "Server Configuration" @@ -1945,7 +1944,7 @@ msgstr "Uploaden inschakelen" #: cps/templates/config_edit.html:103 msgid "Allowed Upload Fileformats" -msgstr "Toegelaten upload formaten" +msgstr "Toegelaten upload bestandsformaten" #: cps/templates/config_edit.html:109 msgid "Enable Anonymous Browsing" @@ -1981,7 +1980,7 @@ msgstr "Gebruik Goodreads" #: cps/templates/config_edit.html:145 msgid "Create an API Key" -msgstr "API-sleutel verkrijgen" +msgstr "Maak API-sleutel aan" #: cps/templates/config_edit.html:149 msgid "Goodreads API Key" @@ -2242,7 +2241,7 @@ msgstr "Voeg toegestane/geweigerde tags toe" #: cps/templates/config_view_edit.html:144 msgid "Add Allowed/Denied custom column values" -msgstr "Voeg toegestane/geweigerde aangepaste kolom waarden toe" +msgstr "Voeg toegestane/geweigerde aangepaste kolomwaarden toe" #: cps/templates/detail.html:60 cps/templates/detail.html:69 msgid "Read in Browser" @@ -2255,7 +2254,7 @@ msgstr "Luisteren in webbrowser" #: cps/templates/detail.html:124 #, fuzzy, python-format msgid "Book %(index)s of %(range)s" -msgstr "" +msgstr "Boek %(index)s van %(range)s" #: cps/templates/detail.html:173 msgid "Published" @@ -2392,7 +2391,7 @@ msgstr "Terug naar startpagina" #: cps/templates/http_error.html:50 msgid "Logout User" -msgstr "" +msgstr "Gebruiker uitloggen" #: cps/templates/index.html:72 cps/templates/search.html:33 #: cps/templates/shelf.html:20 @@ -2479,7 +2478,7 @@ msgstr "Boekenplanken" #: cps/templates/index.xml:123 msgid "Books organized in shelves" -msgstr "Boeken onderdeel van boekenplanken" +msgstr "Boeken georganiseerd op boekenplanken" #: cps/templates/layout.html:29 msgid "Home" @@ -2645,7 +2644,7 @@ msgstr "Selecteer" #: cps/templates/modal_dialogs.html:134 #, fuzzy msgid "Ok" -msgstr "Boek" +msgstr "Oké" #: cps/templates/osd.xml:5 msgid "Calibre-Web eBook Catalog" @@ -2663,7 +2662,7 @@ msgstr "Tekstindeling automatisch aanpassen als het zijpaneel geopend is." #: cps/templates/readcbr.html:7 #, fuzzy msgid "Comic Reader" -msgstr "PDF lezer" +msgstr "Comic Reader" #: cps/templates/readcbr.html:89 msgid "Keyboard Shortcuts" @@ -2763,23 +2762,23 @@ msgstr "Rechts-naar-links" #: cps/templates/readcbr.html:165 msgid "Reset to Top" -msgstr "" +msgstr "Terugzetten naar bovenkant" #: cps/templates/readcbr.html:166 msgid "Remember Position" -msgstr "" +msgstr "Positie onthouden" #: cps/templates/readcbr.html:171 msgid "Scrollbar" -msgstr "" +msgstr "Schuifbalk" #: cps/templates/readcbr.html:174 msgid "Show" -msgstr "" +msgstr "Toon" #: cps/templates/readcbr.html:175 msgid "Hide" -msgstr "" +msgstr "Verberg" #: cps/templates/readdjvu.html:10 #, fuzzy @@ -2818,7 +2817,7 @@ msgstr "Meld je aan op een ander apparaat en ga naar:" #: cps/templates/remote_login.html:10 msgid "Once verified, you will automatically be logged in on this device." -msgstr "Daarna wordt je automatisch op dit apparaat ingelogd." +msgstr "Na controle wordt je automatisch op dit apparaat ingelogd." #: cps/templates/remote_login.html:13 msgid "This verification link will expire in 10 minutes." @@ -2887,11 +2886,11 @@ msgstr "Van:" #: cps/templates/search_form.html:189 msgid "To:" -msgstr "Naar:" +msgstr "Tot:" #: cps/templates/shelf.html:10 msgid "Delete this Shelf" -msgstr "Boekenplank verwijderen" +msgstr "Deze boekenplank verwijderen" #: cps/templates/shelf.html:11 msgid "Edit Shelf Properties" @@ -2899,7 +2898,7 @@ msgstr "Bewerk boekenplank eigenschappen" #: cps/templates/shelf.html:13 msgid "Arrange books manually" -msgstr "Regel boeken handmatig" +msgstr "Boeken handmatig rangschikken" #: cps/templates/shelf.html:14 msgid "Disable Change order" @@ -2915,11 +2914,11 @@ msgstr "Boekenplank wordt permanent verwijderd voor iedereen" #: cps/templates/shelf_edit.html:13 msgid "Share with Everyone" -msgstr "Zichtbaar voor iedereen" +msgstr "Delen met iedereen" #: cps/templates/shelf_edit.html:20 msgid "Sync this shelf with Kobo device" -msgstr "" +msgstr "Synchroniseer deze boekenplank met een Kobo-apparaat" #: cps/templates/shelf_order.html:5 msgid "Drag to Rearrange Order" @@ -2951,7 +2950,7 @@ msgstr "Boekenreeksen in deze bibliotheek" #: cps/templates/stats.html:29 msgid "System Statistics" -msgstr "Systeem informatie" +msgstr "Systeeminformatie" #: cps/templates/stats.html:33 msgid "Program Library" @@ -2959,7 +2958,7 @@ msgstr "Programmabibliotheek" #: cps/templates/stats.html:34 msgid "Installed Version" -msgstr "Versie" +msgstr "Geïnstalleerde Versie" #: cps/templates/tasks.html:12 msgid "User" @@ -3019,19 +3018,19 @@ msgstr "Kobo Sync Token" #: cps/templates/user_edit.html:65 msgid "Create/View" -msgstr "Aanmaken/Bekijk" +msgstr "Aanmaken/Bekijken" #: cps/templates/user_edit.html:84 msgid "Add allowed/Denied Custom Column Values" -msgstr "Voeg toegestane/geweigerde aangepaste kolom waarden toe" +msgstr "Voeg toegestane/geweigerde aangepaste kolomwaarden toe" #: cps/templates/user_edit.html:129 msgid "Sync only books in selected shelves with Kobo" -msgstr "" +msgstr "Synchroniseer alleen boeken op geselecteerde boekenplanken met Kobo" #: cps/templates/user_edit.html:139 cps/templates/user_table.html:168 msgid "Delete User" -msgstr "Deze gebruiker verwijderen" +msgstr "Gebruiker verwijderen" #: cps/templates/user_edit.html:151 msgid "Generate Kobo Auth URL" @@ -3042,99 +3041,87 @@ msgid "Select..." msgstr "Selecteer..." #: cps/templates/user_table.html:130 -#, fuzzy msgid "Edit User" -msgstr "Systeembeheerder" +msgstr "Gebruiker Bewerken" #: cps/templates/user_table.html:133 -#, fuzzy msgid "Enter Username" -msgstr "Kies een gebruikersnaam" +msgstr "Voer gebruikersnaam in" #: cps/templates/user_table.html:134 -#, fuzzy msgid "Enter E-mail Address" -msgstr "Je e-mailadres" +msgstr "Voer e-mailadres in" #: cps/templates/user_table.html:135 -#, fuzzy msgid "Enter Kindle E-mail Address" -msgstr "Kindle-e-mailadres" +msgstr "Voer Kindle-e-mailadres in" #: cps/templates/user_table.html:135 -#, fuzzy msgid "Kindle E-mail" -msgstr "Test-e-mail" +msgstr "Kindle-e-mail" #: cps/templates/user_table.html:136 -#, fuzzy msgid "Locale" -msgstr "Schaal" +msgstr "Locale" #: cps/templates/user_table.html:137 msgid "Visible Book Languages" msgstr "Zichtbare Boek Talen" #: cps/templates/user_table.html:138 -#, fuzzy msgid "Edit Allowed Tags" -msgstr "Selecteer toegestane/geweigerde tags" +msgstr "Toegestaande labels bewerken" #: cps/templates/user_table.html:138 msgid "Allowed Tags" -msgstr "Toegestaande Tags" +msgstr "Toegestaande Labels" #: cps/templates/user_table.html:139 -#, fuzzy msgid "Edit Denied Tags" -msgstr "Selecteer toegestane/geweigerde tags" +msgstr "Verboden labels bewerken" #: cps/templates/user_table.html:139 msgid "Denied Tags" -msgstr "Verboden Tags" +msgstr "Verboden Labels" #: cps/templates/user_table.html:140 -#, fuzzy msgid "Edit Allowed Column Values" -msgstr "Voeg toegestane/geweigerde aangepaste kolom waarden toe" +msgstr "Toegestane kolomwaarden bewerken" #: cps/templates/user_table.html:140 -#, fuzzy msgid "Allowed Column Values" -msgstr "Voeg toegestane/geweigerde aangepaste kolom waarden toe" +msgstr "Toegestane kolomwaarden" #: cps/templates/user_table.html:141 #, fuzzy msgid "Edit Denied Column Values" -msgstr "Voeg toegestane/geweigerde aangepaste kolom waarden toe" +msgstr "Geweigerde kolomwaarden bewerken" #: cps/templates/user_table.html:141 #, fuzzy msgid "Denied Columns Values" -msgstr "Voeg toegestane/geweigerde aangepaste kolom waarden toe" +msgstr "Geweigerde kolomwaarden" #: cps/templates/user_table.html:143 #, fuzzy msgid "Change Password" -msgstr "Wachtwoord wijzigen toestaan" +msgstr "Wachtwoord wijzigen" #: cps/templates/user_table.html:146 msgid "View" -msgstr "Geef weer" +msgstr "Toon" #: cps/templates/user_table.html:149 -#, fuzzy msgid "Edit Public Shelves" -msgstr "Openbare boekenplank" +msgstr "Openbare boekenplank bewerken" #: cps/templates/user_table.html:151 msgid "Sync selected Shelves with Kobo" -msgstr "" +msgstr "Synchroniseer geselecteerde boekenplanken met Kobo" #: cps/templates/user_table.html:155 -#, fuzzy msgid "Show read/unread selection" -msgstr "Boekenreeksenkeuze tonen" +msgstr "Toon gelezen/niet gelezen selectie" #: cps/templates/user_table.html:158 msgid "Show random books" From 781ca7a3f38027512f62d403d205bd6c5714f014 Mon Sep 17 00:00:00 2001 From: Anatolii Fetisov Date: Sat, 18 Sep 2021 09:49:28 +0300 Subject: [PATCH 02/35] Fix filemodal file selection dialog --- cps/static/js/main.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cps/static/js/main.js b/cps/static/js/main.js index d8641c3e..219ee18d 100644 --- a/cps/static/js/main.js +++ b/cps/static/js/main.js @@ -652,10 +652,10 @@ $(function() { var folder = target.data("folderonly"); var filter = target.data("filefilter"); $("#element_selected").text(path); - $("#file_confirm")[0].attributes["data-link"].value = target.data("link"); - $("#file_confirm")[0].attributes["data-folderonly"].value = (typeof folder === 'undefined') ? false : true; - $("#file_confirm")[0].attributes["data-filefilter"].value = (typeof filter === 'undefined') ? "" : filter; - $("#file_confirm")[0].attributes["data-newfile"].value = target.data("newfile"); + $("#file_confirm").data("link", target.data("link")); + $("#file_confirm").data("folderonly", (typeof folder === 'undefined') ? false : true); + $("#file_confirm").data("filefilter", (typeof filter === 'undefined') ? "" : filter); + $("#file_confirm").data("newfile", target.data("newfile")); fillFileTable(path,"dir", folder, filter); }); @@ -669,7 +669,7 @@ $(function() { var folder = $(file_confirm).data("folderonly"); var filter = $(file_confirm).data("filefilter"); var newfile = $(file_confirm).data("newfile"); - if (newfile !== 'undefined') { + if (newfile !== "") { $("#element_selected").text(path + $("#new_file".text())); } else { $("#element_selected").text(path); From efb04ddd8ff9ce512b361d2da5a07e49681a0a3f Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Wed, 22 Sep 2021 19:58:20 +0200 Subject: [PATCH 03/35] Fix #2061 (Defective utf-16 txt files) --- cps/web.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/web.py b/cps/web.py index 14857965..9dcb6541 100644 --- a/cps/web.py +++ b/cps/web.py @@ -1420,7 +1420,7 @@ def serve_book(book_id, book_format, anyname): "rb").read() result = chardet.detect(rawdata) return make_response( - rawdata.decode(result['encoding']).encode('utf-8')) + rawdata.decode(result['encoding'], 'surrogatepass').encode('utf-8', 'surrogatepass')) except FileNotFoundError: log.error("File Not Found") return "File Not Found" From 241b31458dd4ab449eaaaffbeb343d9a0cd4bed1 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Wed, 22 Sep 2021 20:34:18 +0200 Subject: [PATCH 04/35] Added ancient and modern Greek translation to greek language --- cps/iso_language_names.py | 2 ++ cps/translations/cs/LC_MESSAGES/messages.mo | Bin 40209 -> 40209 bytes cps/translations/cs/LC_MESSAGES/messages.po | 17 +++++++++++------ cps/translations/de/LC_MESSAGES/messages.mo | Bin 54373 -> 54373 bytes cps/translations/de/LC_MESSAGES/messages.po | 17 +++++++++++------ cps/translations/el/LC_MESSAGES/messages.mo | Bin 58691 -> 58691 bytes cps/translations/el/LC_MESSAGES/messages.po | 17 +++++++++++------ cps/translations/es/LC_MESSAGES/messages.mo | Bin 52046 -> 52046 bytes cps/translations/es/LC_MESSAGES/messages.po | 17 +++++++++++------ cps/translations/fi/LC_MESSAGES/messages.mo | Bin 27995 -> 27995 bytes cps/translations/fi/LC_MESSAGES/messages.po | 16 ++++++++++------ cps/translations/fr/LC_MESSAGES/messages.mo | Bin 54429 -> 54429 bytes cps/translations/fr/LC_MESSAGES/messages.po | 17 +++++++++++------ cps/translations/hu/LC_MESSAGES/messages.mo | Bin 25770 -> 25770 bytes cps/translations/hu/LC_MESSAGES/messages.po | 16 ++++++++++------ cps/translations/it/LC_MESSAGES/messages.mo | Bin 53277 -> 53277 bytes cps/translations/it/LC_MESSAGES/messages.po | 17 +++++++++++------ cps/translations/ja/LC_MESSAGES/messages.mo | Bin 20487 -> 20487 bytes cps/translations/ja/LC_MESSAGES/messages.po | 16 ++++++++++------ cps/translations/km/LC_MESSAGES/messages.mo | Bin 25061 -> 25061 bytes cps/translations/km/LC_MESSAGES/messages.po | 16 ++++++++++------ cps/translations/nl/LC_MESSAGES/messages.mo | Bin 49290 -> 49290 bytes cps/translations/nl/LC_MESSAGES/messages.po | 17 +++++++++++------ cps/translations/pl/LC_MESSAGES/messages.mo | Bin 53105 -> 53105 bytes cps/translations/pl/LC_MESSAGES/messages.po | 17 +++++++++++------ .../pt_BR/LC_MESSAGES/messages.mo | Bin 47649 -> 47649 bytes .../pt_BR/LC_MESSAGES/messages.po | 17 +++++++++++------ cps/translations/ru/LC_MESSAGES/messages.mo | Bin 48810 -> 48810 bytes cps/translations/ru/LC_MESSAGES/messages.po | 17 +++++++++++------ cps/translations/sv/LC_MESSAGES/messages.mo | Bin 49478 -> 49478 bytes cps/translations/sv/LC_MESSAGES/messages.po | 17 +++++++++++------ cps/translations/tr/LC_MESSAGES/messages.mo | Bin 23335 -> 23335 bytes cps/translations/tr/LC_MESSAGES/messages.po | 16 ++++++++++------ cps/translations/uk/LC_MESSAGES/messages.mo | Bin 18315 -> 18315 bytes cps/translations/uk/LC_MESSAGES/messages.po | 16 ++++++++++------ .../zh_Hans_CN/LC_MESSAGES/messages.mo | Bin 45448 -> 45448 bytes .../zh_Hans_CN/LC_MESSAGES/messages.po | 17 +++++++++++------ messages.pot | 16 ++++++++++------ 38 files changed, 204 insertions(+), 114 deletions(-) diff --git a/cps/iso_language_names.py b/cps/iso_language_names.py index 73e6f326..d07158a0 100644 --- a/cps/iso_language_names.py +++ b/cps/iso_language_names.py @@ -972,6 +972,8 @@ LANGUAGE_NAMES = { "gor": "Gorontalo", "got": "Γοτθικά", "grb": "Grebo", + "grc": "Ελληνικά; Αρχαία (to 1453)", + "ell": "Ελληνικά; Μοντέρνα (1453-)", "grn": "Guarani", "guj": "Gujarati", "gwi": "Gwichʼin", diff --git a/cps/translations/cs/LC_MESSAGES/messages.mo b/cps/translations/cs/LC_MESSAGES/messages.mo index 10ddd380fc84baf797edcf4920f91fdd126492e8..c20601bf96c179f7fe8b6a6ef1355f1d9e497f7e 100644 GIT binary patch delta 25 hcmbQZi)rF6rVX)CT$Z{nq~)1y{70RVBw2v-0A delta 25 hcmbQZi)rF6rVX)CTo$@UmI{W(R>lUK)1y{70RVCl2weaG diff --git a/cps/translations/cs/LC_MESSAGES/messages.po b/cps/translations/cs/LC_MESSAGES/messages.po index 0d29c804..27668a34 100644 --- a/cps/translations/cs/LC_MESSAGES/messages.po +++ b/cps/translations/cs/LC_MESSAGES/messages.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Calibre-Web\n" "Report-Msgid-Bugs-To: https://github.com/janeczku/Calibre-Web\n" -"POT-Creation-Date: 2021-08-29 13:30+0200\n" +"POT-Creation-Date: 2021-09-22 20:32+0200\n" "PO-Revision-Date: 2020-06-09 21:11+0100\n" "Last-Translator: Lukas Heroudek \n" "Language: cs_CZ\n" @@ -439,24 +439,29 @@ msgstr "Všeobecná chyba" msgid "Update File Could Not be Saved in Temp Dir" msgstr "Aktualizační soubor nemohl být uložen do Temp Dir" -#: cps/admin.py:1746 +#: cps/admin.py:1709 +#, fuzzy +msgid "Failed to extract at least One LDAP User" +msgstr "Nepodařilo se vytvořit nejméně jednoho uživatele LDAP" + +#: cps/admin.py:1752 msgid "Failed to Create at Least One LDAP User" msgstr "Nepodařilo se vytvořit nejméně jednoho uživatele LDAP" -#: cps/admin.py:1759 +#: cps/admin.py:1765 #, python-format msgid "Error: %(ldaperror)s" msgstr "Chyba: %(ldaperror)s" -#: cps/admin.py:1763 +#: cps/admin.py:1769 msgid "Error: No user returned in response of LDAP server" msgstr "Chyba: Žádná reakce od uživatele LDAP serveru" -#: cps/admin.py:1796 +#: cps/admin.py:1802 msgid "At Least One LDAP User Not Found in Database" msgstr "Nejméně jeden uživatel LDAP nenalezen v databázi" -#: cps/admin.py:1798 +#: cps/admin.py:1804 msgid "{} User Successfully Imported" msgstr "" diff --git a/cps/translations/de/LC_MESSAGES/messages.mo b/cps/translations/de/LC_MESSAGES/messages.mo index faa817d0361054325b4ea8ba95cb33be27d6651c..90b93ac87aadf6290dca4a613733b4a79b7b133b 100644 GIT binary patch delta 25 hcmaF5g8AtR<_)nGT$Z{nq~(<}Z(0|0?d35Eaw delta 25 hcmaF5g8AtR<_)nGTo$@UmI{W(R>lUK(<}Z(0|0@S35);$ diff --git a/cps/translations/de/LC_MESSAGES/messages.po b/cps/translations/de/LC_MESSAGES/messages.po index e26cce8e..5f7d6317 100644 --- a/cps/translations/de/LC_MESSAGES/messages.po +++ b/cps/translations/de/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Calibre-Web\n" "Report-Msgid-Bugs-To: https://github.com/janeczku/Calibre-Web\n" -"POT-Creation-Date: 2021-08-29 13:30+0200\n" +"POT-Creation-Date: 2021-09-22 20:32+0200\n" "PO-Revision-Date: 2021-08-01 17:24+0200\n" "Last-Translator: Ozzie Isaacs\n" "Language: de\n" @@ -432,24 +432,29 @@ msgstr "Allgemeiner Fehler" msgid "Update File Could Not be Saved in Temp Dir" msgstr "Updatedatei konnte nicht in Temporärem Ordner gespeichert werden" -#: cps/admin.py:1746 +#: cps/admin.py:1709 +#, fuzzy +msgid "Failed to extract at least One LDAP User" +msgstr "Mindestens ein LDAP Benutzer konnte nicht erzeugt werden" + +#: cps/admin.py:1752 msgid "Failed to Create at Least One LDAP User" msgstr "Mindestens ein LDAP Benutzer konnte nicht erzeugt werden" -#: cps/admin.py:1759 +#: cps/admin.py:1765 #, python-format msgid "Error: %(ldaperror)s" msgstr "Fehler: %(ldaperror)s" -#: cps/admin.py:1763 +#: cps/admin.py:1769 msgid "Error: No user returned in response of LDAP server" msgstr "Fehler: Keine Benutzerinformationen von LDAP Server empfangen" -#: cps/admin.py:1796 +#: cps/admin.py:1802 msgid "At Least One LDAP User Not Found in Database" msgstr "Mindestens ein LDAP Benutzer wurde nicht in der Datenbank gefudnen" -#: cps/admin.py:1798 +#: cps/admin.py:1804 msgid "{} User Successfully Imported" msgstr "{} Benutzer erfolgreich importiert" diff --git a/cps/translations/el/LC_MESSAGES/messages.mo b/cps/translations/el/LC_MESSAGES/messages.mo index 3c2665b5d02220c87b38037258136ab8de47eb45..b3a4c1f65fa10cf008458632e5493da77eff32b5 100644 GIT binary patch delta 25 gcmX?niuv#<<_%m4T$Z{nq~MH2K|0d|uJ3jhEB delta 25 gcmX?niuv#<<_%m4To$@UmI{W(R>lUKMH2K|0e0O85dZ)H diff --git a/cps/translations/el/LC_MESSAGES/messages.po b/cps/translations/el/LC_MESSAGES/messages.po index 0adebb63..741efa92 100644 --- a/cps/translations/el/LC_MESSAGES/messages.po +++ b/cps/translations/el/LC_MESSAGES/messages.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Calibre-Web\n" "Report-Msgid-Bugs-To: https://github.com/janeczku/Calibre-Web\n" -"POT-Creation-Date: 2021-08-29 13:30+0200\n" +"POT-Creation-Date: 2021-09-22 20:32+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Depountis Georgios\n" "Language: el\n" @@ -439,24 +439,29 @@ msgstr "Γενικό σφάλμα" msgid "Update File Could Not be Saved in Temp Dir" msgstr "Το Αρχείο Ενημέρωσης Δεν Μπόρεσε Να Αποθηκευτεί σε" -#: cps/admin.py:1746 +#: cps/admin.py:1709 +#, fuzzy +msgid "Failed to extract at least One LDAP User" +msgstr "Αποτυχία Δημιουργίας Τουλάχιστον Ενός Χρήστη LDAP" + +#: cps/admin.py:1752 msgid "Failed to Create at Least One LDAP User" msgstr "Αποτυχία Δημιουργίας Τουλάχιστον Ενός Χρήστη LDAP" -#: cps/admin.py:1759 +#: cps/admin.py:1765 #, python-format msgid "Error: %(ldaperror)s" msgstr "Σφάλμα: %(ldaperror)s" -#: cps/admin.py:1763 +#: cps/admin.py:1769 msgid "Error: No user returned in response of LDAP server" msgstr "Σφάλμα: Δεν επιστράφηκε χρήστης σε απάντηση του διακομιστή LDAP" -#: cps/admin.py:1796 +#: cps/admin.py:1802 msgid "At Least One LDAP User Not Found in Database" msgstr "Τουλάχιστον Ένας Χρήστης LDAP Δεν Βρέθηκε Στη Βάση Δεδομένων" -#: cps/admin.py:1798 +#: cps/admin.py:1804 msgid "{} User Successfully Imported" msgstr "" diff --git a/cps/translations/es/LC_MESSAGES/messages.mo b/cps/translations/es/LC_MESSAGES/messages.mo index 8ffe675f4ef1dd9ab47db60bd9727c256e6e4cd9..fd043b1e4ff4e963e7dcbfd169fef790c70335dc 100644 GIT binary patch delta 25 gcmX>%jrrU(<_%7TT$Z{nq~eF~YP0Cf`w^8f$< delta 25 gcmX>%jrrU(<_%7TTo$@UmI{W(R>lUKeF~YP0Ciml`2YX_ diff --git a/cps/translations/es/LC_MESSAGES/messages.po b/cps/translations/es/LC_MESSAGES/messages.po index 73a7bde2..14222ed4 100644 --- a/cps/translations/es/LC_MESSAGES/messages.po +++ b/cps/translations/es/LC_MESSAGES/messages.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: Calibre-Web\n" "Report-Msgid-Bugs-To: https://github.com/janeczku/Calibre-Web\n" -"POT-Creation-Date: 2021-08-29 13:30+0200\n" +"POT-Creation-Date: 2021-09-22 20:32+0200\n" "PO-Revision-Date: 2020-05-25 17:22+0200\n" "Last-Translator: minakmostoles \n" "Language: es\n" @@ -443,24 +443,29 @@ msgstr "Error general" msgid "Update File Could Not be Saved in Temp Dir" msgstr "La actualización del archivo no pudo guardarse en el directorio temporal (Temp Dir)" -#: cps/admin.py:1746 +#: cps/admin.py:1709 +#, fuzzy +msgid "Failed to extract at least One LDAP User" +msgstr "Error al crear al menos un usuario LDAP" + +#: cps/admin.py:1752 msgid "Failed to Create at Least One LDAP User" msgstr "Error al crear al menos un usuario LDAP" -#: cps/admin.py:1759 +#: cps/admin.py:1765 #, python-format msgid "Error: %(ldaperror)s" msgstr "Error: %(ldaperror)s" -#: cps/admin.py:1763 +#: cps/admin.py:1769 msgid "Error: No user returned in response of LDAP server" msgstr "Error: el servidor LDAP no ha devuelto ningún usuario" -#: cps/admin.py:1796 +#: cps/admin.py:1802 msgid "At Least One LDAP User Not Found in Database" msgstr "Al menos, un usuario LDAP no se ha encontrado en la base de datos" -#: cps/admin.py:1798 +#: cps/admin.py:1804 msgid "{} User Successfully Imported" msgstr "{} Usuario importado con éxito" diff --git a/cps/translations/fi/LC_MESSAGES/messages.mo b/cps/translations/fi/LC_MESSAGES/messages.mo index 52e7454cdc7477092e6a4a1ddaddca0faacfbda4..b204f8f88546d953984e8fb6caef2f4a9860f611 100644 GIT binary patch delta 25 hcmcb8i}Cg?#tj=BxGZ&zj1-Ivtc;B|?{ZkE0|1G{348zm delta 25 hcmcb8i}Cg?#tj=BxGZ#yEENomt&9ye?{ZkE0|1H+34#Cs diff --git a/cps/translations/fi/LC_MESSAGES/messages.po b/cps/translations/fi/LC_MESSAGES/messages.po index a0c579a6..d85adc34 100644 --- a/cps/translations/fi/LC_MESSAGES/messages.po +++ b/cps/translations/fi/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: Calibre-Web\n" "Report-Msgid-Bugs-To: https://github.com/janeczku/Calibre-Web\n" -"POT-Creation-Date: 2021-08-29 13:30+0200\n" +"POT-Creation-Date: 2021-09-22 20:32+0200\n" "PO-Revision-Date: 2020-01-12 13:56+0100\n" "Last-Translator: Samuli Valavuo \n" "Language: fi\n" @@ -439,24 +439,28 @@ msgstr "Yleinen virhe" msgid "Update File Could Not be Saved in Temp Dir" msgstr "" -#: cps/admin.py:1746 +#: cps/admin.py:1709 +msgid "Failed to extract at least One LDAP User" +msgstr "" + +#: cps/admin.py:1752 msgid "Failed to Create at Least One LDAP User" msgstr "" -#: cps/admin.py:1759 +#: cps/admin.py:1765 #, python-format msgid "Error: %(ldaperror)s" msgstr "" -#: cps/admin.py:1763 +#: cps/admin.py:1769 msgid "Error: No user returned in response of LDAP server" msgstr "" -#: cps/admin.py:1796 +#: cps/admin.py:1802 msgid "At Least One LDAP User Not Found in Database" msgstr "" -#: cps/admin.py:1798 +#: cps/admin.py:1804 msgid "{} User Successfully Imported" msgstr "" diff --git a/cps/translations/fr/LC_MESSAGES/messages.mo b/cps/translations/fr/LC_MESSAGES/messages.mo index e0fc8696a5946a983667d3da97487e0103814b52..1cff137ebe67e269c622b66eca65a193fbdd2a24 100644 GIT binary patch delta 24 gcmbQcl6me*<_+HpxGZ&zj1-Ivtc;B|70yit0Cc\n" "Language: fr\n" @@ -455,24 +455,29 @@ msgstr "Erreur générale" msgid "Update File Could Not be Saved in Temp Dir" msgstr "Le fichier de mise à jour ne peut pas être sauvegardé dans le répertoire temporaire" -#: cps/admin.py:1746 +#: cps/admin.py:1709 +#, fuzzy +msgid "Failed to extract at least One LDAP User" +msgstr "Impossible de créer au moins un utilisateur LDAP" + +#: cps/admin.py:1752 msgid "Failed to Create at Least One LDAP User" msgstr "Impossible de créer au moins un utilisateur LDAP" -#: cps/admin.py:1759 +#: cps/admin.py:1765 #, python-format msgid "Error: %(ldaperror)s" msgstr "Erreur : %(ldaperror)s" -#: cps/admin.py:1763 +#: cps/admin.py:1769 msgid "Error: No user returned in response of LDAP server" msgstr "Erreur : Aucun utilisateur renvoyé dans la réponse LDAP du serveur" -#: cps/admin.py:1796 +#: cps/admin.py:1802 msgid "At Least One LDAP User Not Found in Database" msgstr "Au moins un utilisateur LDAP n'a pas été trouvé dans la base de données" -#: cps/admin.py:1798 +#: cps/admin.py:1804 msgid "{} User Successfully Imported" msgstr "{} utilisateur importé avec succès" diff --git a/cps/translations/hu/LC_MESSAGES/messages.mo b/cps/translations/hu/LC_MESSAGES/messages.mo index 0913ca9a8cfcc558ee593cee15bd6c01a0668bf3..84abd8f778cb480abf19b7f38ebd05ff091b4680 100644 GIT binary patch delta 25 hcmZ2=l5y2Z#tm=Gxh!>!j1-Ivtc;B|e>2~r0|0_z32^`b delta 25 hcmZ2=l5y2Z#tm=Gxh!;zEENomt&9yee>2~r0|0`o33mVh diff --git a/cps/translations/hu/LC_MESSAGES/messages.po b/cps/translations/hu/LC_MESSAGES/messages.po index d60dd4ae..5838a8d4 100644 --- a/cps/translations/hu/LC_MESSAGES/messages.po +++ b/cps/translations/hu/LC_MESSAGES/messages.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2021-08-29 13:30+0200\n" +"POT-Creation-Date: 2021-09-22 20:32+0200\n" "PO-Revision-Date: 2019-04-06 23:36+0200\n" "Last-Translator: \n" "Language: hu\n" @@ -439,24 +439,28 @@ msgstr "Általános hiba" msgid "Update File Could Not be Saved in Temp Dir" msgstr "" -#: cps/admin.py:1746 +#: cps/admin.py:1709 +msgid "Failed to extract at least One LDAP User" +msgstr "" + +#: cps/admin.py:1752 msgid "Failed to Create at Least One LDAP User" msgstr "" -#: cps/admin.py:1759 +#: cps/admin.py:1765 #, python-format msgid "Error: %(ldaperror)s" msgstr "" -#: cps/admin.py:1763 +#: cps/admin.py:1769 msgid "Error: No user returned in response of LDAP server" msgstr "" -#: cps/admin.py:1796 +#: cps/admin.py:1802 msgid "At Least One LDAP User Not Found in Database" msgstr "" -#: cps/admin.py:1798 +#: cps/admin.py:1804 msgid "{} User Successfully Imported" msgstr "" diff --git a/cps/translations/it/LC_MESSAGES/messages.mo b/cps/translations/it/LC_MESSAGES/messages.mo index 18d2fe48c5bad2efa637da7da43d83bcc36f2a7f..c9995c82e37a66e4e736732f0e0b53418c21dc83 100644 GIT binary patch delta 25 gcmbQcfO+l$<_%0mT$Z{nq~d5Q$%0BDQ{IsgCw delta 25 gcmbQcfO+l$<_%0mTo$@UmI{W(R>lUKd5Q$%0BF_+KmY&$ diff --git a/cps/translations/it/LC_MESSAGES/messages.po b/cps/translations/it/LC_MESSAGES/messages.po index f0ebab0b..f2765237 100644 --- a/cps/translations/it/LC_MESSAGES/messages.po +++ b/cps/translations/it/LC_MESSAGES/messages.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Calibre-Web\n" "Report-Msgid-Bugs-To: https://github.com/janeczku/Calibre-Web\n" -"POT-Creation-Date: 2021-08-29 13:30+0200\n" +"POT-Creation-Date: 2021-09-22 20:32+0200\n" "PO-Revision-Date: 2017-04-04 15:09+0200\n" "Last-Translator: ElQuimm \n" "Language: it\n" @@ -436,24 +436,29 @@ msgstr "Errore generale" msgid "Update File Could Not be Saved in Temp Dir" msgstr "Il file di aggiornamento non può essere salvato nella cartella temporanea" -#: cps/admin.py:1746 +#: cps/admin.py:1709 +#, fuzzy +msgid "Failed to extract at least One LDAP User" +msgstr "Fallita la creazione di almeno un utente LDAP" + +#: cps/admin.py:1752 msgid "Failed to Create at Least One LDAP User" msgstr "Fallita la creazione di almeno un utente LDAP" -#: cps/admin.py:1759 +#: cps/admin.py:1765 #, python-format msgid "Error: %(ldaperror)s" msgstr "Errore: %(ldaperror)s" -#: cps/admin.py:1763 +#: cps/admin.py:1769 msgid "Error: No user returned in response of LDAP server" msgstr "Errore: nessun utente restituito in risposta dal server LDAP" -#: cps/admin.py:1796 +#: cps/admin.py:1802 msgid "At Least One LDAP User Not Found in Database" msgstr "Almeno un utente LDAP non è stato trovato nel database" -#: cps/admin.py:1798 +#: cps/admin.py:1804 msgid "{} User Successfully Imported" msgstr "{} utente importato con successo" diff --git a/cps/translations/ja/LC_MESSAGES/messages.mo b/cps/translations/ja/LC_MESSAGES/messages.mo index c941c6ba4f0b6a4b1c6d7ef4b0d2bd3349385248..9b879211388c29aa4502626ad1a09550ff776358 100644 GIT binary patch delta 25 gcmZo)z}UWkal\n" "Language: ja\n" @@ -434,24 +434,28 @@ msgstr "エラー発生" msgid "Update File Could Not be Saved in Temp Dir" msgstr "" -#: cps/admin.py:1746 +#: cps/admin.py:1709 +msgid "Failed to extract at least One LDAP User" +msgstr "" + +#: cps/admin.py:1752 msgid "Failed to Create at Least One LDAP User" msgstr "" -#: cps/admin.py:1759 +#: cps/admin.py:1765 #, python-format msgid "Error: %(ldaperror)s" msgstr "" -#: cps/admin.py:1763 +#: cps/admin.py:1769 msgid "Error: No user returned in response of LDAP server" msgstr "" -#: cps/admin.py:1796 +#: cps/admin.py:1802 msgid "At Least One LDAP User Not Found in Database" msgstr "" -#: cps/admin.py:1798 +#: cps/admin.py:1804 msgid "{} User Successfully Imported" msgstr "" diff --git a/cps/translations/km/LC_MESSAGES/messages.mo b/cps/translations/km/LC_MESSAGES/messages.mo index 13a8f6cfb949e1dc74ec2034fc0b027b5a96d8a1..9f543febf561b4876a85ca49e8488b8984370103 100644 GIT binary patch delta 25 gcmaEQnDOah#tqe~T$Z{nq~TU8Tm0DyA{kpKVy delta 25 gcmaEQnDOah#tqe~To$@UmI{W(R>lUKTU8Tm0D!#+mjD0& diff --git a/cps/translations/km/LC_MESSAGES/messages.po b/cps/translations/km/LC_MESSAGES/messages.po index 89d210a0..ae50cbb2 100644 --- a/cps/translations/km/LC_MESSAGES/messages.po +++ b/cps/translations/km/LC_MESSAGES/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Calibre-Web\n" "Report-Msgid-Bugs-To: https://github.com/janeczku/Calibre-Web\n" -"POT-Creation-Date: 2021-08-29 13:30+0200\n" +"POT-Creation-Date: 2021-09-22 20:32+0200\n" "PO-Revision-Date: 2018-08-27 17:06+0700\n" "Last-Translator: \n" "Language: km_KH\n" @@ -439,24 +439,28 @@ msgstr "" msgid "Update File Could Not be Saved in Temp Dir" msgstr "" -#: cps/admin.py:1746 +#: cps/admin.py:1709 +msgid "Failed to extract at least One LDAP User" +msgstr "" + +#: cps/admin.py:1752 msgid "Failed to Create at Least One LDAP User" msgstr "" -#: cps/admin.py:1759 +#: cps/admin.py:1765 #, python-format msgid "Error: %(ldaperror)s" msgstr "" -#: cps/admin.py:1763 +#: cps/admin.py:1769 msgid "Error: No user returned in response of LDAP server" msgstr "" -#: cps/admin.py:1796 +#: cps/admin.py:1802 msgid "At Least One LDAP User Not Found in Database" msgstr "" -#: cps/admin.py:1798 +#: cps/admin.py:1804 msgid "{} User Successfully Imported" msgstr "" diff --git a/cps/translations/nl/LC_MESSAGES/messages.mo b/cps/translations/nl/LC_MESSAGES/messages.mo index 076fa74036857a241e8ffbd39caf3dc0d8cc1d19..b0c2712c45a274d79a77e38cf632f78c9d05566f 100644 GIT binary patch delta 25 gcmeBbWbSHY-r$$dWvOdqq+n!VWo)!LBHt(w0A?Krd;kCd delta 25 gcmeBbWbSHY-r$$dWua?isbFYqWo)oHBHt(w0A^\n" "Language: nl\n" @@ -441,24 +441,29 @@ msgstr "Algemene fout" msgid "Update File Could Not be Saved in Temp Dir" msgstr "Geüpload bestand kon niet opgeslagen worden in de tijdelijke map" -#: cps/admin.py:1746 +#: cps/admin.py:1709 +#, fuzzy +msgid "Failed to extract at least One LDAP User" +msgstr "Mislukt om minstens een LDAP gebruiker aan te maken" + +#: cps/admin.py:1752 msgid "Failed to Create at Least One LDAP User" msgstr "Mislukt om minstens een LDAP gebruiker aan te maken" -#: cps/admin.py:1759 +#: cps/admin.py:1765 #, python-format msgid "Error: %(ldaperror)s" msgstr "Fout: %(ldaperror)s" -#: cps/admin.py:1763 +#: cps/admin.py:1769 msgid "Error: No user returned in response of LDAP server" msgstr "Fout: No user returned in response of LDAP server" -#: cps/admin.py:1796 +#: cps/admin.py:1802 msgid "At Least One LDAP User Not Found in Database" msgstr "Minstens een LDAP Gebruiker is niet gevonden in de Database" -#: cps/admin.py:1798 +#: cps/admin.py:1804 msgid "{} User Successfully Imported" msgstr "{} Gebruiker succesvol geïmporteerd" diff --git a/cps/translations/pl/LC_MESSAGES/messages.mo b/cps/translations/pl/LC_MESSAGES/messages.mo index b12c6f38c3976d71b0bde7a68782af15c2b4c381..35497a468e03f1ba177cdd7dfe7f49122d996cc9 100644 GIT binary patch delta 25 gcmex3kNM*~<_*FnT$Z{nq~WlKV$0eQa&L;wH) delta 25 gcmex3kNM*~<_*FnTo$@UmI{W(R>lUKWlKV$0eT4tN&o-= diff --git a/cps/translations/pl/LC_MESSAGES/messages.po b/cps/translations/pl/LC_MESSAGES/messages.po index 24227e7a..124e6fbe 100644 --- a/cps/translations/pl/LC_MESSAGES/messages.po +++ b/cps/translations/pl/LC_MESSAGES/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Calibre Web - polski (POT: 2021-06-12 08:52)\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2021-08-29 13:30+0200\n" +"POT-Creation-Date: 2021-09-22 20:32+0200\n" "PO-Revision-Date: 2021-06-12 15:35+0200\n" "Last-Translator: Radosław Kierznowski \n" "Language: pl\n" @@ -441,24 +441,29 @@ msgstr "Błąd ogólny" msgid "Update File Could Not be Saved in Temp Dir" msgstr "Plik aktualizacji nie mógł zostać zapisany w katalogu tymczasowym" -#: cps/admin.py:1746 +#: cps/admin.py:1709 +#, fuzzy +msgid "Failed to extract at least One LDAP User" +msgstr "Błąd przy tworzeniu przynajmniej jednego użytkownika LDAP" + +#: cps/admin.py:1752 msgid "Failed to Create at Least One LDAP User" msgstr "Błąd przy tworzeniu przynajmniej jednego użytkownika LDAP" -#: cps/admin.py:1759 +#: cps/admin.py:1765 #, python-format msgid "Error: %(ldaperror)s" msgstr "Błąd: %(ldaperror)s" -#: cps/admin.py:1763 +#: cps/admin.py:1769 msgid "Error: No user returned in response of LDAP server" msgstr "Błąd. LDAP nie zwrócił żadnego użytkownika" -#: cps/admin.py:1796 +#: cps/admin.py:1802 msgid "At Least One LDAP User Not Found in Database" msgstr "Przynajmniej jeden użytkownik LDAP nie został znaleziony w bazie danych" -#: cps/admin.py:1798 +#: cps/admin.py:1804 msgid "{} User Successfully Imported" msgstr "{} Użytkownik pomyślnie zaimportowany" diff --git a/cps/translations/pt_BR/LC_MESSAGES/messages.mo b/cps/translations/pt_BR/LC_MESSAGES/messages.mo index bdff3d16b4f4e397562ad72b654c2d636b1b839f..90abc2130a26e2c8dceeded0bdb39c0d652d1b59 100644 GIT binary patch delta 25 hcmZ4Zg=ygzrVXFdxh!>!j1-Ivtc;B||4mm30sxEE3A+FQ delta 25 hcmZ4Zg=ygzrVXFdxh!;zEENomt&9ye|4mm30sxF33BdpW diff --git a/cps/translations/pt_BR/LC_MESSAGES/messages.po b/cps/translations/pt_BR/LC_MESSAGES/messages.po index 43b0e270..dc2c9313 100644 --- a/cps/translations/pt_BR/LC_MESSAGES/messages.po +++ b/cps/translations/pt_BR/LC_MESSAGES/messages.po @@ -4,7 +4,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2021-08-29 13:30+0200\n" +"POT-Creation-Date: 2021-09-22 20:32+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language: br\n" @@ -438,24 +438,29 @@ msgstr "Erro geral" msgid "Update File Could Not be Saved in Temp Dir" msgstr "Arquivo de atualização não pôde ser salvo no diretório temporário" -#: cps/admin.py:1746 +#: cps/admin.py:1709 +#, fuzzy +msgid "Failed to extract at least One LDAP User" +msgstr "Falha na criação no mínimo de um usuário LDAP" + +#: cps/admin.py:1752 msgid "Failed to Create at Least One LDAP User" msgstr "Falha na criação no mínimo de um usuário LDAP" -#: cps/admin.py:1759 +#: cps/admin.py:1765 #, python-format msgid "Error: %(ldaperror)s" msgstr "Erro: %(ldaperror)s" -#: cps/admin.py:1763 +#: cps/admin.py:1769 msgid "Error: No user returned in response of LDAP server" msgstr "Erro: Nenhum usuário retornado em resposta do servidor LDAP" -#: cps/admin.py:1796 +#: cps/admin.py:1802 msgid "At Least One LDAP User Not Found in Database" msgstr "No mínimo um usuário LDAP não encontrado no banco de dados" -#: cps/admin.py:1798 +#: cps/admin.py:1804 msgid "{} User Successfully Imported" msgstr "{} Usuário Importado com Sucesso" diff --git a/cps/translations/ru/LC_MESSAGES/messages.mo b/cps/translations/ru/LC_MESSAGES/messages.mo index 8e0c244c81031122fbd822b2f2c2784900cb1a2c..1a12223437d0ebcb72786535a438c69bbf14b06b 100644 GIT binary patch delta 25 hcmZ4Wmub~srVW#Vxh!>!j1-Ivtc;B|&k5$s1^|T^2>1X1 delta 25 hcmZ4Wmub~srVW#Vxh!;zEENomt&9ye&k5$s1^|U(2>t*7 diff --git a/cps/translations/ru/LC_MESSAGES/messages.po b/cps/translations/ru/LC_MESSAGES/messages.po index 54bc7247..da2a94d6 100644 --- a/cps/translations/ru/LC_MESSAGES/messages.po +++ b/cps/translations/ru/LC_MESSAGES/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Calibre-Web\n" "Report-Msgid-Bugs-To: https://github.com/janeczku/Calibre-Web\n" -"POT-Creation-Date: 2021-08-29 13:30+0200\n" +"POT-Creation-Date: 2021-09-22 20:32+0200\n" "PO-Revision-Date: 2020-04-29 01:20+0400\n" "Last-Translator: ZIZA\n" "Language: ru\n" @@ -441,24 +441,29 @@ msgstr "Общая ошибка" msgid "Update File Could Not be Saved in Temp Dir" msgstr "Не удалось сохранить файл обновления во временной папке." -#: cps/admin.py:1746 +#: cps/admin.py:1709 +#, fuzzy +msgid "Failed to extract at least One LDAP User" +msgstr "Не удалось создать хотя бы одного пользователя LDAP" + +#: cps/admin.py:1752 msgid "Failed to Create at Least One LDAP User" msgstr "Не удалось создать хотя бы одного пользователя LDAP" -#: cps/admin.py:1759 +#: cps/admin.py:1765 #, python-format msgid "Error: %(ldaperror)s" msgstr "Ошибка: %(ldaperror)s" -#: cps/admin.py:1763 +#: cps/admin.py:1769 msgid "Error: No user returned in response of LDAP server" msgstr "Ошибка: ни одного пользователя не найдено в ответ на запрос сервер LDAP" -#: cps/admin.py:1796 +#: cps/admin.py:1802 msgid "At Least One LDAP User Not Found in Database" msgstr "По крайней мере, один пользователь LDAP не найден в базе данных" -#: cps/admin.py:1798 +#: cps/admin.py:1804 msgid "{} User Successfully Imported" msgstr "" diff --git a/cps/translations/sv/LC_MESSAGES/messages.mo b/cps/translations/sv/LC_MESSAGES/messages.mo index aa6a10aed69b45417d7445871cf45dc40acf8c7f..ede3dbdf844d5e27a3969c0ae45f4a44d3fbb822 100644 GIT binary patch delta 25 gcmX@s#C)uYc|%Phm!+\n" "Language: sv\n" @@ -438,24 +438,29 @@ msgstr "Allmänt fel" msgid "Update File Could Not be Saved in Temp Dir" msgstr "Uppdateringsfilen kunde inte sparas i Temp Dir" -#: cps/admin.py:1746 +#: cps/admin.py:1709 +#, fuzzy +msgid "Failed to extract at least One LDAP User" +msgstr "Det gick inte att skapa minst en LDAP-användare" + +#: cps/admin.py:1752 msgid "Failed to Create at Least One LDAP User" msgstr "Det gick inte att skapa minst en LDAP-användare" -#: cps/admin.py:1759 +#: cps/admin.py:1765 #, python-format msgid "Error: %(ldaperror)s" msgstr "Fel: %(ldaperror)s" -#: cps/admin.py:1763 +#: cps/admin.py:1769 msgid "Error: No user returned in response of LDAP server" msgstr "Fel: Ingen användare återges som svar på LDAP-servern" -#: cps/admin.py:1796 +#: cps/admin.py:1802 msgid "At Least One LDAP User Not Found in Database" msgstr "Minst en LDAP-användare hittades inte i databasen" -#: cps/admin.py:1798 +#: cps/admin.py:1804 msgid "{} User Successfully Imported" msgstr "{} användare har importerats" diff --git a/cps/translations/tr/LC_MESSAGES/messages.mo b/cps/translations/tr/LC_MESSAGES/messages.mo index 3f854a80ac2d8626d737763b488ec36b4e72d304..e36ec5b48823cd3ba20112e0ec4542bff1df5997 100644 GIT binary patch delta 25 gcmZ3!jdA%l#tovTT$Z{nq~lUK\n" "Language: tr\n" @@ -435,24 +435,28 @@ msgstr "Genel hata" msgid "Update File Could Not be Saved in Temp Dir" msgstr "" -#: cps/admin.py:1746 +#: cps/admin.py:1709 +msgid "Failed to extract at least One LDAP User" +msgstr "" + +#: cps/admin.py:1752 msgid "Failed to Create at Least One LDAP User" msgstr "" -#: cps/admin.py:1759 +#: cps/admin.py:1765 #, python-format msgid "Error: %(ldaperror)s" msgstr "" -#: cps/admin.py:1763 +#: cps/admin.py:1769 msgid "Error: No user returned in response of LDAP server" msgstr "" -#: cps/admin.py:1796 +#: cps/admin.py:1802 msgid "At Least One LDAP User Not Found in Database" msgstr "" -#: cps/admin.py:1798 +#: cps/admin.py:1804 msgid "{} User Successfully Imported" msgstr "" diff --git a/cps/translations/uk/LC_MESSAGES/messages.mo b/cps/translations/uk/LC_MESSAGES/messages.mo index cd2291b16ef813de50291a56966dc8e83be2e3db..d629a5936ee1b6ade4b543e69dd8ce260ada4e53 100644 GIT binary patch delta 25 gcmeC~XYB50+#ssJWvOdqq+n!VWo)!rULi*v09~X8mH+?% delta 25 gcmeC~XYB50+#ssJWua?isbFYqWo)onULi*v0A20|oB#j- diff --git a/cps/translations/uk/LC_MESSAGES/messages.po b/cps/translations/uk/LC_MESSAGES/messages.po index 6d99ca6d..7a528815 100644 --- a/cps/translations/uk/LC_MESSAGES/messages.po +++ b/cps/translations/uk/LC_MESSAGES/messages.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: Calibre-web\n" "Report-Msgid-Bugs-To: https://github.com/janeczku/calibre-web\n" -"POT-Creation-Date: 2021-08-29 13:30+0200\n" +"POT-Creation-Date: 2021-09-22 20:32+0200\n" "PO-Revision-Date: 2017-04-30 00:47+0300\n" "Last-Translator: ABIS Team \n" "Language: uk\n" @@ -437,24 +437,28 @@ msgstr "" msgid "Update File Could Not be Saved in Temp Dir" msgstr "" -#: cps/admin.py:1746 +#: cps/admin.py:1709 +msgid "Failed to extract at least One LDAP User" +msgstr "" + +#: cps/admin.py:1752 msgid "Failed to Create at Least One LDAP User" msgstr "" -#: cps/admin.py:1759 +#: cps/admin.py:1765 #, python-format msgid "Error: %(ldaperror)s" msgstr "" -#: cps/admin.py:1763 +#: cps/admin.py:1769 msgid "Error: No user returned in response of LDAP server" msgstr "" -#: cps/admin.py:1796 +#: cps/admin.py:1802 msgid "At Least One LDAP User Not Found in Database" msgstr "" -#: cps/admin.py:1798 +#: cps/admin.py:1804 msgid "{} User Successfully Imported" msgstr "" diff --git a/cps/translations/zh_Hans_CN/LC_MESSAGES/messages.mo b/cps/translations/zh_Hans_CN/LC_MESSAGES/messages.mo index 915dbd4c543ef4e98f53c19519f6378640341c67..05367c3f2cc999ae83a6974c0ee4399a6437e3ea 100644 GIT binary patch delta 25 hcmeBp%+&FiX~V^QE=ye_BLyP^D`TV0xAWIJ0sw;c39A4A delta 25 hcmeBp%+&FiX~V^QE(={FO9ew?D`SJrxAWIJ0sw\n" "Language: zh_CN\n" @@ -439,24 +439,29 @@ msgstr "一般错误" msgid "Update File Could Not be Saved in Temp Dir" msgstr "更新文件无法保存在临时目录中" -#: cps/admin.py:1746 +#: cps/admin.py:1709 +#, fuzzy +msgid "Failed to extract at least One LDAP User" +msgstr "创建至少一个LDAP用户失败" + +#: cps/admin.py:1752 msgid "Failed to Create at Least One LDAP User" msgstr "创建至少一个LDAP用户失败" -#: cps/admin.py:1759 +#: cps/admin.py:1765 #, python-format msgid "Error: %(ldaperror)s" msgstr "错误:%(ldaperror)s" -#: cps/admin.py:1763 +#: cps/admin.py:1769 msgid "Error: No user returned in response of LDAP server" msgstr "错误:在LDAP服务器的响应中没有返回用户" -#: cps/admin.py:1796 +#: cps/admin.py:1802 msgid "At Least One LDAP User Not Found in Database" msgstr "数据库中没有找到至少一个LDAP用户" -#: cps/admin.py:1798 +#: cps/admin.py:1804 msgid "{} User Successfully Imported" msgstr "{} 用户被成功导入" diff --git a/messages.pot b/messages.pot index 5c982a24..5e2b0b3c 100644 --- a/messages.pot +++ b/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PROJECT VERSION\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2021-08-29 13:30+0200\n" +"POT-Creation-Date: 2021-09-22 20:32+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -431,24 +431,28 @@ msgstr "" msgid "Update File Could Not be Saved in Temp Dir" msgstr "" -#: cps/admin.py:1746 +#: cps/admin.py:1709 +msgid "Failed to extract at least One LDAP User" +msgstr "" + +#: cps/admin.py:1752 msgid "Failed to Create at Least One LDAP User" msgstr "" -#: cps/admin.py:1759 +#: cps/admin.py:1765 #, python-format msgid "Error: %(ldaperror)s" msgstr "" -#: cps/admin.py:1763 +#: cps/admin.py:1769 msgid "Error: No user returned in response of LDAP server" msgstr "" -#: cps/admin.py:1796 +#: cps/admin.py:1802 msgid "At Least One LDAP User Not Found in Database" msgstr "" -#: cps/admin.py:1798 +#: cps/admin.py:1804 msgid "{} User Successfully Imported" msgstr "" From d6884164a5181676247236a00723328eee4d86fa Mon Sep 17 00:00:00 2001 From: Fernando Mesquita <69275210+fernando-mesquita@users.noreply.github.com> Date: Sat, 25 Sep 2021 01:07:31 -0300 Subject: [PATCH 05/35] Update messages.po Read = Leia > Lido --- cps/translations/pt_BR/LC_MESSAGES/messages.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/translations/pt_BR/LC_MESSAGES/messages.po b/cps/translations/pt_BR/LC_MESSAGES/messages.po index dc2c9313..d5c67f59 100644 --- a/cps/translations/pt_BR/LC_MESSAGES/messages.po +++ b/cps/translations/pt_BR/LC_MESSAGES/messages.po @@ -2273,7 +2273,7 @@ msgstr "Marcar como lido" #: cps/templates/detail.html:219 msgid "Read" -msgstr "Leia" +msgstr "Lido" #: cps/templates/detail.html:227 msgid "Restore from archive" From d5a332a84e3dcd8eb985bc27094146434ca63785 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sat, 25 Sep 2021 08:23:14 +0200 Subject: [PATCH 06/35] Update test results --- test/Calibre-Web TestSummary_Linux.html | 337 +++++------------------- 1 file changed, 73 insertions(+), 264 deletions(-) diff --git a/test/Calibre-Web TestSummary_Linux.html b/test/Calibre-Web TestSummary_Linux.html index b1ca885e..f4ba8f0a 100644 --- a/test/Calibre-Web TestSummary_Linux.html +++ b/test/Calibre-Web TestSummary_Linux.html @@ -37,20 +37,20 @@
-

Start Time: 2021-08-28 21:08:29

+

Start Time: 2021-09-23 19:58:16

-

Stop Time: 2021-08-29 10:59:50

+

Stop Time: 2021-09-23 23:23:05

-

Duration: 13h 7 min

+

Duration: 2h 40 min

@@ -534,11 +534,11 @@ - + TestEbookConvertCalibreGDrive 6 - 5 - 1 + 6 + 0 0 0 @@ -548,31 +548,11 @@ - +
TestEbookConvertCalibreGDrive - test_convert_email
- -
- FAIL -
- - - - + PASS @@ -707,12 +687,12 @@ AssertionError: False is not true - + TestEditAdditionalBooks 15 - 12 + 14 + 0 0 - 2 1 Detail @@ -855,92 +835,20 @@ AssertionError: False is not true - +
TestEditAdditionalBooks - test_xss_comment_edit
- -
- ERROR -
- - - - + PASS - +
TestEditAdditionalBooks - test_xss_custom_comment_edit
- -
- ERROR -
- - - - + PASS @@ -1398,11 +1306,11 @@ AttributeError: 'bool' object has no attribute 'click' - + TestEditBooksOnGdrive 20 - 18 - 2 + 20 + 0 0 0 @@ -1421,35 +1329,11 @@ AttributeError: 'bool' object has no attribute 'click' - +
TestEditBooksOnGdrive - test_edit_author
- -
- FAIL -
- - - - + PASS @@ -1571,33 +1455,11 @@ AssertionError: 'Pipo, Pipe' != 'Pipo| Pipe' - +
TestEditBooksOnGdrive - test_edit_title
- -
- FAIL -
- - - - + PASS @@ -1940,11 +1802,11 @@ AssertionError: 'Pipo|;.:' != 'Very long extra super turbo cool title wi[54 char - + TestKoboSync 10 - 9 - 1 + 10 + 0 0 0 @@ -2017,31 +1879,11 @@ AssertionError: 'Pipo|;.:' != 'Very long extra super turbo cool title wi[54 char - +
TestKoboSync - test_sync_shelf
- -
- FAIL -
- - - - + PASS @@ -2963,13 +2805,13 @@ AssertionError: 1 != 0 : [] TestShelf + 13 12 - 11 0 0 1 - Detail + Detail @@ -3099,6 +2941,15 @@ AssertionError: 1 != 0 : [] + + + +
TestShelf - test_xss_shelf
+ + PASS + + + @@ -3267,11 +3118,11 @@ AssertionError: False is not true - + TestUserList 18 - 16 - 2 + 18 + 0 0 0 @@ -3362,33 +3213,11 @@ AssertionError: False is not true - +
TestUserList - test_user_list_edit_language
- -
- FAIL -
- - - - + PASS @@ -3456,33 +3285,11 @@ AssertionError: 'Show All' != 'all' - +
TestUserList - test_user_list_sort
- -
- FAIL -
- - - - + PASS @@ -4037,13 +3844,13 @@ AssertionError: 'Show All' != 'all' - + TestCalibreHelper 16 15 - 0 1 0 + 0 Detail @@ -4114,26 +3921,28 @@ AssertionError: 'Show All' != 'all' - +
TestCalibreHelper - test_check_chinese_Characters
- ERROR + FAIL
- From 2edcd16119dc711d8ab67138d7104592b5e9b1f7 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sat, 25 Sep 2021 08:29:43 +0200 Subject: [PATCH 07/35] Update version to 0.6.13 for release --- cps/constants.py | 2 +- setup.cfg | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cps/constants.py b/cps/constants.py index a0daa515..5aaf6cc8 100644 --- a/cps/constants.py +++ b/cps/constants.py @@ -157,7 +157,7 @@ def selected_roles(dictionary): BookMeta = namedtuple('BookMeta', 'file_path, extension, title, author, cover, description, tags, series, ' 'series_id, languages, publisher') -STABLE_VERSION = {'version': '0.6.13 Beta'} +STABLE_VERSION = {'version': '0.6.13'} NIGHTLY_VERSION = {} NIGHTLY_VERSION[0] = '$Format:%H$' diff --git a/setup.cfg b/setup.cfg index 23c4e60b..9787caa4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -48,6 +48,7 @@ install_requires = tornado>=4.1,<6.2 Wand>=0.4.4,<0.7.0 unidecode>=0.04.19,<1.3.0 + lxml>=3.8.0,<4.7.0 [options.extras_require] gdrive = @@ -76,8 +77,8 @@ oauth = Flask-Dance>=2.0.0,<5.1.0 SQLAlchemy-Utils>=0.33.5,<0.38.0 metadata = - lxml>=3.8.0,<4.7.0 rarfile>=2.7 + scholarly>=1.2.0, <1.3 comics = natsort>=2.2.0,<7.2.0 comicapi>= 2.2.0,<2.3.0 From c1ac68e2ae62b9867813ab2e9aeff43cf3ceed9f Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sat, 25 Sep 2021 14:01:17 +0200 Subject: [PATCH 08/35] Fix #2053 (Hovering on cover, now shows tooltip also in Caliblur! Theme) --- cps/templates/author.html | 4 ++-- cps/templates/discover.html | 4 ++-- cps/templates/grid.html | 4 ++-- cps/templates/index.html | 8 ++++---- cps/templates/search.html | 4 ++-- cps/templates/shelf.html | 4 ++-- cps/templates/shelf_order.html | 4 ++-- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/cps/templates/author.html b/cps/templates/author.html index b011bae8..d82b2ebd 100644 --- a/cps/templates/author.html +++ b/cps/templates/author.html @@ -36,8 +36,8 @@
- - + + {% if entry.id in read_book_ids %}{% endif %} diff --git a/cps/templates/discover.html b/cps/templates/discover.html index f6d8207d..74448b98 100644 --- a/cps/templates/discover.html +++ b/cps/templates/discover.html @@ -8,8 +8,8 @@
{% if entry.has_cover is defined %} - - {{ entry.title }} + + {{ entry.title }} {% if entry.id in read_book_ids %}{% endif %} diff --git a/cps/templates/grid.html b/cps/templates/grid.html index 88421c06..5de80caf 100644 --- a/cps/templates/grid.html +++ b/cps/templates/grid.html @@ -27,8 +27,8 @@
- - {{ entry[0].name }} + + {{ entry[0].name }} {{entry.count}} diff --git a/cps/templates/index.html b/cps/templates/index.html index dabcd8da..df276638 100644 --- a/cps/templates/index.html +++ b/cps/templates/index.html @@ -8,8 +8,8 @@
- - {{ entry.title }} + + {{ entry.title }} {% if entry.id in read_book_ids %}{% endif %} @@ -85,8 +85,8 @@
- - {{ entry.title }} + + {{ entry.title }} {% if entry.id in read_book_ids %}{% endif %} diff --git a/cps/templates/search.html b/cps/templates/search.html index b63819be..e88c2974 100644 --- a/cps/templates/search.html +++ b/cps/templates/search.html @@ -43,8 +43,8 @@
{% if entry.has_cover is defined %} - - {{ entry.title }} + + {{ entry.title }} {% if entry.id in read_book_ids %}{% endif %} diff --git a/cps/templates/shelf.html b/cps/templates/shelf.html index 7ee96f7d..6e436976 100644 --- a/cps/templates/shelf.html +++ b/cps/templates/shelf.html @@ -30,8 +30,8 @@
- - {{ entry.title }} + + {{ entry.title }} {% if entry.id in read_book_ids %}{% endif %} diff --git a/cps/templates/shelf_order.html b/cps/templates/shelf_order.html index fc53a69a..a5f91629 100644 --- a/cps/templates/shelf_order.html +++ b/cps/templates/shelf_order.html @@ -9,9 +9,9 @@
From 2e25e797dd0ff52fdec6b16e8b3b51a281a86602 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sat, 25 Sep 2021 14:08:49 +0200 Subject: [PATCH 09/35] Fix #2002 (Added missing default locale and default language view upon importing ldap user) --- cps/admin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cps/admin.py b/cps/admin.py index 0a0b362d..2a65e53a 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -1740,7 +1740,9 @@ def ldap_import_create_user(user, user_data): content.password = '' # dummy password which will be replaced by ldap one content.email = useremail content.kindle_mail = kindlemail - content.role = config.config_default_role + content.kindle_mail = kindlemail + content.default_language = config.default_language + content.locale = config.locale content.sidebar_view = config.config_default_show content.allowed_tags = config.config_allowed_tags content.denied_tags = config.config_denied_tags From 58735caff38753547d9db38acae765ac4dc6f5ba Mon Sep 17 00:00:00 2001 From: Ozzieisaacs Date: Sun, 26 Sep 2021 17:04:53 +0200 Subject: [PATCH 10/35] Enhancements for displaying languages on non english locale --- cps/db.py | 15 ++++++++++----- cps/web.py | 14 ++++++++------ 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/cps/db.py b/cps/db.py index 71f5031b..cfb2ed7c 100644 --- a/cps/db.py +++ b/cps/db.py @@ -805,11 +805,16 @@ class CalibreDB(): .filter(self.common_filters()) \ .group_by(text('books_languages_link.lang_code')).all() for lang in languages: - try: - cur_l = LC.parse(lang.lang_code) - lang.name = cur_l.get_language_name(get_locale()) - except UnknownLocaleError: - lang.name = _(isoLanguages.get(part3=lang.lang_code).name) + lang.name = isoLanguages.get_language_name(get_locale(), lang.lang_code) + #try: + # if lang.lang_code.lower() == "und": + # lang.name = isoLanguages.get_language_name(get_locale(), lang.lang_code) + # # lang.name = _("Undetermined") + # else: + # cur_l = LC.parse(lang.lang_code) + # lang.name = cur_l.get_language_name(get_locale()) + #except UnknownLocaleError: + # lang.name = _(isoLanguages.get(part3=lang.lang_code).name) return languages def update_title_sort(self, config, conn=None): diff --git a/cps/web.py b/cps/web.py index 9dcb6541..44fb6b92 100644 --- a/cps/web.py +++ b/cps/web.py @@ -1745,12 +1745,14 @@ def show_book(book_id): entries = calibre_db.get_filtered_book(book_id, allow_show_archived=True) if entries: for index in range(0, len(entries.languages)): - try: - entries.languages[index].language_name = LC.parse(entries.languages[index].lang_code)\ - .get_language_name(get_locale()) - except UnknownLocaleError: - entries.languages[index].language_name = _( - isoLanguages.get(part3=entries.languages[index].lang_code).name) + entries.languages[index].language_name = isoLanguages.get_language_name(get_locale(), entries.languages[ + index].lang_code) + #try: + # entries.languages[index].language_name = isoLanguages.get_language_name(get_locale(), LC.parse(entries.languages[index].lang_code) + # .get_language_name(get_locale()) + #except UnknownLocaleError: + # entries.languages[index].language_name = _( + # isoLanguages.get(part3=entries.languages[index].lang_code).name) cc = get_cc_columns(filter_config_custom_read=True) book_in_shelfs = [] shelfs = ub.session.query(ub.BookShelf).filter(ub.BookShelf.book_id == book_id).all() From 3f6a466ca7d72e9284684e27f8af3915f9799a62 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Wed, 29 Sep 2021 19:00:02 +0200 Subject: [PATCH 11/35] Further language support fixes (displaying "non locale" languages translated) --- cps/editbooks.py | 9 +++++---- cps/opds.py | 17 ++++++++-------- cps/web.py | 51 ++++++++++++++++++++++++++++-------------------- 3 files changed, 44 insertions(+), 33 deletions(-) diff --git a/cps/editbooks.py b/cps/editbooks.py index dd506fa6..ce06fbf4 100644 --- a/cps/editbooks.py +++ b/cps/editbooks.py @@ -1131,10 +1131,11 @@ def edit_list_book(param): else: lang_names = list() for lang in book.languages: - try: - lang_names.append(LC.parse(lang.lang_code).get_language_name(get_locale())) - except UnknownLocaleError: - lang_names.append(_(isoLanguages.get(part3=lang.lang_code).name)) + lang_names.append(isoLanguages.get_language_name(get_locale(), lang.lang_code)) + #try: + # lang_names.append(LC.parse(lang.lang_code).get_language_name(get_locale())) + #except UnknownLocaleError: + # lang_names.append(_(isoLanguages.get(part3=lang.lang_code).name)) ret = Response(json.dumps({'success': True, 'newValue': ', '.join(lang_names)}), mimetype='application/json') elif param =='author_sort': diff --git a/cps/opds.py b/cps/opds.py index e444302a..2a615607 100644 --- a/cps/opds.py +++ b/cps/opds.py @@ -433,16 +433,17 @@ def feed_languagesindex(): if current_user.filter_language() == u"all": languages = calibre_db.speaking_language() else: - try: - cur_l = LC.parse(current_user.filter_language()) - except UnknownLocaleError: - cur_l = None + #try: + # cur_l = LC.parse(current_user.filter_language()) + #except UnknownLocaleError: + # cur_l = None languages = calibre_db.session.query(db.Languages).filter( db.Languages.lang_code == current_user.filter_language()).all() - if cur_l: - languages[0].name = cur_l.get_language_name(get_locale()) - else: - languages[0].name = _(isoLanguages.get(part3=languages[0].lang_code).name) + languages[0].name = isoLanguages.get_language_name(get_locale(), languages[0].lang_code) + #if cur_l: + # languages[0].name = cur_l.get_language_name(get_locale()) + #else: + # languages[0].name = _(isoLanguages.get(part3=languages[0].lang_code).name) pagination = Pagination((int(off) / (int(config.config_books_per_page)) + 1), config.config_books_per_page, len(languages)) return render_xml_template('feed.xml', listelements=languages, folder='opds.feed_languages', pagination=pagination) diff --git a/cps/web.py b/cps/web.py index dd64d164..917ce8c8 100644 --- a/cps/web.py +++ b/cps/web.py @@ -606,13 +606,18 @@ def render_category_books(page, book_id, order): def render_language_books(page, name, order): try: - cur_l = LC.parse(name) - lang_name = cur_l.get_language_name(get_locale()) - except UnknownLocaleError: - try: - lang_name = _(isoLanguages.get(part3=name).name) - except KeyError: - abort(404) + lang_name = isoLanguages.get_language_name(get_locale(), name) + except KeyError: + abort(404) + + #try: + # cur_l = LC.parse(name) + # lang_name = cur_l.get_language_name(get_locale()) + #except UnknownLocaleError: + # try: + # lang_name = _(isoLanguages.get(part3=name).name) + # except KeyError: + # abort(404) entries, random, pagination = calibre_db.fill_indexpage(page, 0, db.Books, db.Books.languages.any(db.Languages.lang_code == name), @@ -819,12 +824,14 @@ def list_books(): for entry in entries: for index in range(0, len(entry.languages)): - try: - entry.languages[index].language_name = LC.parse(entry.languages[index].lang_code)\ - .get_language_name(get_locale()) - except UnknownLocaleError: - entry.languages[index].language_name = _( - isoLanguages.get(part3=entry.languages[index].lang_code).name) + entry.languages[index].language_name = isoLanguages.get_language_name(get_locale(), entry.languages[ + index].lang_code) + #try: + # entry.languages[index].language_name = LC.parse(entry.languages[index].lang_code)\ + # .get_language_name(get_locale()) + #except UnknownLocaleError: + # entry.languages[index].language_name = _( + # isoLanguages.get(part3=entry.languages[index].lang_code).name) table_entries = {'totalNotFiltered': total_count, 'total': filtered_count, "rows": entries} js_list = json.dumps(table_entries, cls=db.AlchemyEncoder) @@ -1003,16 +1010,18 @@ def language_overview(): languages = calibre_db.speaking_language() # ToDo: generate first character list for languages else: - try: - cur_l = LC.parse(current_user.filter_language()) - except UnknownLocaleError: - cur_l = None + #try: + # cur_l = LC.parse(current_user.filter_language()) + #except UnknownLocaleError: + # cur_l = None + languages = calibre_db.session.query(db.Languages).filter( db.Languages.lang_code == current_user.filter_language()).all() - if cur_l: - languages[0].name = cur_l.get_language_name(get_locale()) - else: - languages[0].name = _(isoLanguages.get(part3=languages[0].lang_code).name) + languages[0].name = isoLanguages.get_language_name(get_locale(), languages[0].name.lang_code) + #if cur_l: + # languages[0].name = cur_l.get_language_name(get_locale()) + #else: + # languages[0].name = _(isoLanguages.get(part3=languages[0].lang_code).name) lang_counter = calibre_db.session.query(db.books_languages_link, func.count('books_languages_link.book').label('bookcount')).group_by( text('books_languages_link.lang_code')).all() From cd1fe6dde03886fb47d0c92c4e35277da98ba922 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Wed, 29 Sep 2021 19:26:21 +0200 Subject: [PATCH 12/35] Fix #2085 (Misaligned shelf names after glyphicon) --- cps/templates/layout.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/templates/layout.html b/cps/templates/layout.html index 017b8791..a7315c34 100644 --- a/cps/templates/layout.html +++ b/cps/templates/layout.html @@ -135,7 +135,7 @@ {% if g.user.is_authenticated or g.allow_anonymous %} {% for shelf in g.shelves_access %} -
  • {{shelf.name|shortentitle(40)}}{% if shelf.is_public == 1 %} {{_('(Public)')}}{% endif %}
  • +
  • {{shelf.name|shortentitle(40)}}{% if shelf.is_public == 1 %} {{_('(Public)')}}{% endif %}
  • {% endfor %} {% if not g.user.is_anonymous %} From e064a3ec2b458b38cfc2f0eb05ee57c3b05a5031 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sat, 2 Oct 2021 07:53:36 +0200 Subject: [PATCH 13/35] Removed unnecessary spaces in book convert texts --- cps/templates/book_edit.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cps/templates/book_edit.html b/cps/templates/book_edit.html index 78a5cdc1..04eb2c02 100644 --- a/cps/templates/book_edit.html +++ b/cps/templates/book_edit.html @@ -27,16 +27,16 @@
    From b8eb5577616498a944d287f5d6207f49e4ffe644 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 3 Oct 2021 08:00:53 +0200 Subject: [PATCH 14/35] Corrected translation german -> Anzeigesprache --- cps/translations/de/LC_MESSAGES/messages.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/translations/de/LC_MESSAGES/messages.po b/cps/translations/de/LC_MESSAGES/messages.po index 4eeff575..4e845366 100644 --- a/cps/translations/de/LC_MESSAGES/messages.po +++ b/cps/translations/de/LC_MESSAGES/messages.po @@ -3046,7 +3046,7 @@ msgstr "Kindle E-Mail" #: cps/templates/user_table.html:136 msgid "Locale" -msgstr "Anuzeigesprache" +msgstr "Anzeigesprache" #: cps/templates/user_table.html:137 msgid "Visible Book Languages" From b82d03c12cf0256a0170147132559f1536b38d21 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 3 Oct 2021 08:01:33 +0200 Subject: [PATCH 15/35] Removed js from search_form, tasks Added translation of bootstrap-select in user table --- cps/templates/search_form.html | 4 ---- cps/templates/tasks.html | 3 --- cps/templates/user_table.html | 3 +++ 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/cps/templates/search_form.html b/cps/templates/search_form.html index f5483139..5d186ba7 100644 --- a/cps/templates/search_form.html +++ b/cps/templates/search_form.html @@ -228,10 +228,6 @@ {% endblock %} {% block js %} - - {% if not g.user.locale == 'en' %} diff --git a/cps/templates/tasks.html b/cps/templates/tasks.html index c13ddff9..40120335 100644 --- a/cps/templates/tasks.html +++ b/cps/templates/tasks.html @@ -26,8 +26,5 @@ {% block js %} - {% endblock %} diff --git a/cps/templates/user_table.html b/cps/templates/user_table.html index dec79eb0..111d2a09 100644 --- a/cps/templates/user_table.html +++ b/cps/templates/user_table.html @@ -183,6 +183,9 @@ +{% if not g.user.locale == 'en' %} + +{% endif %} {% endblock %} From b699796236d8561e937992b415e0e7654f60ec78 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 3 Oct 2021 08:03:14 +0200 Subject: [PATCH 16/35] Improved CSRF protection --- cps/web.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cps/web.py b/cps/web.py index 917ce8c8..3681c38c 100644 --- a/cps/web.py +++ b/cps/web.py @@ -84,7 +84,9 @@ except ImportError: @app.after_request def add_security_headers(resp): - resp.headers['Content-Security-Policy']= "default-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src * data:" + resp.headers['Content-Security-Policy'] = "default-src 'self' 'unsafe-inline' 'unsafe-eval';" + if request.endpoint == "editbook.edit_book": + resp.headers['Content-Security-Policy'] += "img-src * data:" resp.headers['X-Content-Type-Options'] = 'nosniff' resp.headers['X-Frame-Options'] = 'SAMEORIGIN' resp.headers['X-XSS-Protection'] = '1; mode=block' From 43fdef5e5328cd550657c8507b6b265aca602a05 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 3 Oct 2021 09:31:24 +0200 Subject: [PATCH 17/35] Improved textreader --- .../djvu_html5 => css/libs}/Djvu_html5.css | 0 cps/static/css/text.css | 44 ++++++ cps/static/js/reading/txt_reader.js | 86 +++++++++++ cps/templates/readtxt.html | 139 ++---------------- 4 files changed, 143 insertions(+), 126 deletions(-) rename cps/static/{js/libs/djvu_html5 => css/libs}/Djvu_html5.css (100%) create mode 100644 cps/static/css/text.css create mode 100644 cps/static/js/reading/txt_reader.js diff --git a/cps/static/js/libs/djvu_html5/Djvu_html5.css b/cps/static/css/libs/Djvu_html5.css similarity index 100% rename from cps/static/js/libs/djvu_html5/Djvu_html5.css rename to cps/static/css/libs/Djvu_html5.css diff --git a/cps/static/css/text.css b/cps/static/css/text.css new file mode 100644 index 00000000..74204680 --- /dev/null +++ b/cps/static/css/text.css @@ -0,0 +1,44 @@ +body { + background: white; +} + +#readmain { + position: absolute; + width: 100%; + height: 100%; +} + +#area { + width: 80%; + height: 80%; + margin: 5% auto; + max-width: 1250px; +} + +#area iframe { + border: none; +} + +xmp, pre, plaintext { + display: block; + font-family: -moz-fixed; + white-space: pre; + margin: 1em 0; +} + +#area{ + overflow:hidden; +} + +pre { + white-space: pre-wrap; + word-wrap: break-word; + font-family: -moz-fixed; + column-count:2; + -webkit-columns:2; + -moz-columns:2; + column-gap:20px; + -moz-column-gap:20px; + -webkit-column-gap:20px; + position:relative; +} diff --git a/cps/static/js/reading/txt_reader.js b/cps/static/js/reading/txt_reader.js new file mode 100644 index 00000000..9cfb51f5 --- /dev/null +++ b/cps/static/js/reading/txt_reader.js @@ -0,0 +1,86 @@ +/* This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web) + * Copyright (C) 2021 Ozzieisaacs + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +$(document).ready(function() { + //to int + $("#area").width($("#area").width()); + $("#content").width($("#content").width()); + //bind text + $("#content").load($("#readmain").data('load'), function(textStr) { + $(this).height($(this).parent().height()*0.95); + $(this).text(textStr); + }); + //keybind + $(document).keydown(function(event){ + if(event.keyCode == 37){ + prevPage(); + } + if(event.keyCode == 39){ + nextPage(); + } + }); + //click + $( "#left" ).click(function() { + prevPage(); + }); + $( "#right" ).click(function() { + nextPage(); + }); + $("#readmain").swipe( { + swipeRight:function() { + prevPage(); + }, + swipeLeft:function() { + nextPage(); + }, + }); + + //bind mouse + $(window).bind('DOMMouseScroll mousewheel', function(event) { + var delta = 0; + if (event.originalEvent.wheelDelta) { + delta = event.originalEvent.wheelDelta; + } else if (event.originalEvent.detail) { + delta = event.originalEvent.detail*-1; + } + if (delta >= 0) { + prevPage(); + } else { + nextPage(); + } + }); + + //page animate + var origwidth = $("#content")[0].getBoundingClientRect().width; + var gap = 20; + function prevPage() { + if($("#content").offset().left > 0) { + return; + } + leftoff = $("#content").offset().left; + leftoff = leftoff+origwidth+gap; + $("#content").offset({left:leftoff}); + } + function nextPage() { + leftoff = $("#content").offset().left; + leftoff = leftoff-origwidth-gap; + if (leftoff + $("#content")[0].scrollWidth < 0) { + return; + } + $("#content").offset({left:leftoff}); + } +}); diff --git a/cps/templates/readtxt.html b/cps/templates/readtxt.html index ea294948..b157fe95 100644 --- a/cps/templates/readtxt.html +++ b/cps/templates/readtxt.html @@ -5,139 +5,26 @@ {{_('txt Reader')}} | {{title}} - + - + + + + + - - - - - - + -
    -
    -
    - -
    - - +
    +
    +
    + +
    From 52be2ad4a2705bfce03a09fd70fb46941449555c Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 3 Oct 2021 09:32:29 +0200 Subject: [PATCH 18/35] Improved DJVU Reader --- cps/static/css/libs/Djvu_html5.css | 8 ++--- cps/static/js/reading/djvu_reader.js | 21 +++++++++++++ cps/templates/readdjvu.html | 46 +++++++++------------------- 3 files changed, 40 insertions(+), 35 deletions(-) create mode 100644 cps/static/js/reading/djvu_reader.js diff --git a/cps/static/css/libs/Djvu_html5.css b/cps/static/css/libs/Djvu_html5.css index 77e37c97..a7ed799e 100644 --- a/cps/static/css/libs/Djvu_html5.css +++ b/cps/static/css/libs/Djvu_html5.css @@ -35,7 +35,7 @@ body { float: left; width: 40px; height: 40px; - background-image: url("img/toolbar-buttons.png"); + background-image: url("../../js/libs/djvu_html5/img/toolbar-buttons.png"); background-repeat: no-repeat; background-size: 500% 300%; } @@ -185,10 +185,10 @@ _:-ms-lang(x), .textLayer { width: 128px; height: 128px; margin: -72px 0 0 -64px; - background-image: url("img/status.png"); + background-image: url("../../js/libs/djvu_html5/img/status.png"); background-repeat: no-repeat; } .blankImage { - background-image: url("img/blank.jpg"); -} \ No newline at end of file + background-image: url("../../js/libs/djvu_html5/img/blank.jpg"); +} diff --git a/cps/static/js/reading/djvu_reader.js b/cps/static/js/reading/djvu_reader.js new file mode 100644 index 00000000..c93d705a --- /dev/null +++ b/cps/static/js/reading/djvu_reader.js @@ -0,0 +1,21 @@ +/* This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web) + * Copyright (C) 2021 Ozzieisaacs + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +var DJVU_CONTEXT = { + background: "#666", + uiHideDelay: 1500, +}; diff --git a/cps/templates/readdjvu.html b/cps/templates/readdjvu.html index 9771b7c9..3504e394 100644 --- a/cps/templates/readdjvu.html +++ b/cps/templates/readdjvu.html @@ -1,35 +1,19 @@ - - - - + + + {{_('DJVU Reader')}} | {{title}} + + + + + - - -{{_('DJVU Reader')}} | {{title}} - - - - - - - - - -
    - - - + + + + + +
    + From 1c15e10ac014aa1664f0d3cd1a76d8462ee15ca4 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 3 Oct 2021 09:58:10 +0200 Subject: [PATCH 19/35] Improved csrf protection for remote login --- cps/static/js/main.js | 1 - cps/static/js/remote_login.js | 36 +++++++++++++++++++++++++++++++++ cps/templates/remote_login.html | 7 ++++--- 3 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 cps/static/js/remote_login.js diff --git a/cps/static/js/main.js b/cps/static/js/main.js index dd91b0ce..ea068423 100644 --- a/cps/static/js/main.js +++ b/cps/static/js/main.js @@ -15,7 +15,6 @@ * along with this program. If not, see . */ - function getPath() { var jsFileLocation = $("script[src*=jquery]").attr("src"); // the js file path return jsFileLocation.substr(0, jsFileLocation.search("/static/js/libs/jquery.min.js")); // the js folder path diff --git a/cps/static/js/remote_login.js b/cps/static/js/remote_login.js new file mode 100644 index 00000000..f0d364dc --- /dev/null +++ b/cps/static/js/remote_login.js @@ -0,0 +1,36 @@ +/* This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web) + * Copyright (C) 2017-2021 jkrehm, OzzieIsaacs + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +(function () { + // Poll the server to check if the user has authenticated + var t = setInterval(function () { + $.post(getPath() + "/ajax/verify_token", { token: $("#verify_url").data("token") }) + .done(function(response) { + if (response.status === 'success') { + // Wait a tick so cookies are updated + setTimeout(function () { + window.location.href = getPath() + '/'; + }, 0); + } + }) + .fail(function (xhr) { + clearInterval(t); + var response = JSON.parse(xhr.responseText); + alert(response.message); + }); + }, 5000); +})() diff --git a/cps/templates/remote_login.html b/cps/templates/remote_login.html index bfa1b115..47bb48f3 100644 --- a/cps/templates/remote_login.html +++ b/cps/templates/remote_login.html @@ -4,7 +4,7 @@

    {{_('Magic Link - Authorise New Device')}}

    {{_('On another device, login and visit:')}} -

    {{verify_url}} +

    {{verify_url}}

    {{_('Once verified, you will automatically be logged in on this device.')}} @@ -16,7 +16,8 @@ {% endblock %} {% block js %} - + {% endblock %} From 5edde53fedbe54137d95d2b8a30bd92391ed890c Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 3 Oct 2021 09:53:46 +0200 Subject: [PATCH 20/35] Improved sync for kobo with additional table --- cps/kobo.py | 50 ++++++++++++++++++++++++++------------- cps/services/SyncToken.py | 26 ++++++++++---------- cps/ub.py | 6 +++++ 3 files changed, 53 insertions(+), 29 deletions(-) diff --git a/cps/kobo.py b/cps/kobo.py index 6952a692..7eee3e17 100644 --- a/cps/kobo.py +++ b/cps/kobo.py @@ -170,9 +170,14 @@ def HandleSyncRequest(): ub.ArchivedBook.is_archived) changed_entries = (changed_entries .join(db.Data).outerjoin(ub.ArchivedBook, db.Books.id == ub.ArchivedBook.book_id) - .filter(or_(db.Books.last_modified > sync_token.books_last_modified, - ub.BookShelf.date_added > sync_token.books_last_modified)) - .filter(db.Data.format.in_(KOBO_FORMATS)).filter(calibre_db.common_filters()) + .join(ub.KoboSyncedBooks, ub.KoboSyncedBooks.book_id == db.Books.id, isouter=True) + .filter(or_(ub.KoboSyncedBooks.user_id != current_user.id, + ub.KoboSyncedBooks.book_id == None)) + #.filter(or_(db.Books.last_modified > sync_token.books_last_modified, + # ub.BookShelf.date_added > sync_token.books_last_modified)) + .filter(ub.BookShelf.date_added > sync_token.books_last_modified) #?? or also or from above + .filter(db.Data.format.in_(KOBO_FORMATS)) + .filter(calibre_db.common_filters()) .order_by(db.Books.id) .order_by(ub.ArchivedBook.last_modified) .join(ub.BookShelf, db.Books.id == ub.BookShelf.book_id) @@ -189,16 +194,18 @@ def HandleSyncRequest(): ub.ArchivedBook.last_modified, ub.ArchivedBook.is_archived) changed_entries = (changed_entries - .join(db.Data).outerjoin(ub.ArchivedBook, db.Books.id == ub.ArchivedBook.book_id) - .filter(db.Books.last_modified > sync_token.books_last_modified) - .filter(calibre_db.common_filters()) - .filter(db.Data.format.in_(KOBO_FORMATS)) - .order_by(db.Books.last_modified) - .order_by(db.Books.id) + .join(db.Data).outerjoin(ub.ArchivedBook, db.Books.id == ub.ArchivedBook.book_id) + .join(ub.KoboSyncedBooks, ub.KoboSyncedBooks.book_id == db.Books.id, isouter=True) + .filter(or_(ub.KoboSyncedBooks.user_id != current_user.id, + ub.KoboSyncedBooks.book_id == None)) + .filter(calibre_db.common_filters()) + .filter(db.Data.format.in_(KOBO_FORMATS)) + .order_by(db.Books.last_modified) + .order_by(db.Books.id) ) - if sync_token.books_last_id > -1: - changed_entries = changed_entries.filter(db.Books.id > sync_token.books_last_id) + #if sync_token.books_last_id > -1: + # changed_entries = changed_entries.filter(db.Books.id > sync_token.books_last_id) reading_states_in_new_entitlements = [] if sqlalchemy_version2: @@ -206,6 +213,7 @@ def HandleSyncRequest(): else: books = changed_entries.limit(SYNC_ITEM_LIMIT) for book in books: + add_synced_books(book.Books.id) formats = [data.format for data in book.Books.data] if not 'KEPUB' in formats and config.config_kepubifypath and 'EPUB' in formats: helper.convert_book_format(book.Books.id, config.config_calibre_dir, 'EPUB', 'KEPUB', current_user.name) @@ -263,11 +271,11 @@ def HandleSyncRequest(): entries = calibre_db.session.execute(changed_entries).all() book_count = len(entries) else: - entries = changed_entries.all() + #entries = changed_entries.all() book_count = changed_entries.count() # last entry: - books_last_id = entries[-1].Books.id or -1 if book_count else -1 - + # sync_cont = entries[-1].Books.id or -1 if book_count else -1 + log.debug("Remaining books to Sync: {}".format(book_count)) # generate reading state data changed_reading_states = ub.session.query(ub.KoboReadingState) @@ -305,7 +313,7 @@ def HandleSyncRequest(): sync_token.books_last_modified = new_books_last_modified sync_token.archive_last_modified = new_archived_last_modified sync_token.reading_state_last_modified = new_reading_state_last_modified - sync_token.books_last_id = books_last_id + # sync_token.books_last_id = books_last_id return generate_sync_response(sync_token, sync_results, book_count) @@ -330,7 +338,7 @@ def generate_sync_response(sync_token, sync_results, set_cont=False): extra_headers["x-kobo-sync"] = "continue" sync_token.to_headers(extra_headers) - log.debug("Kobo Sync Content: {}".format(sync_results)) + # log.debug("Kobo Sync Content: {}".format(sync_results)) response = make_response(jsonify(sync_results), extra_headers) return response @@ -838,6 +846,16 @@ def get_ub_read_status(kobo_read_status): } return string_to_enum_map[kobo_read_status] +def add_synced_books(book_id): + synced_book = ub.KoboSyncedBooks() + synced_book.user_id = current_user.id + synced_book.book_id = book_id + ub.session.add(synced_book) + try: + ub.session.commit() + except Exception: + ub.session.rollback() + def get_or_create_reading_state(book_id): book_read = ub.session.query(ub.ReadBook).filter(ub.ReadBook.book_id == book_id, diff --git a/cps/services/SyncToken.py b/cps/services/SyncToken.py index cc67542c..86165f71 100644 --- a/cps/services/SyncToken.py +++ b/cps/services/SyncToken.py @@ -85,8 +85,8 @@ class SyncToken: "books_last_created": {"type": "string"}, "archive_last_modified": {"type": "string"}, "reading_state_last_modified": {"type": "string"}, - "tags_last_modified": {"type": "string"}, - "books_last_id": {"type": "integer", "optional": True} + "tags_last_modified": {"type": "string"} + # "books_last_id": {"type": "integer", "optional": True} }, } @@ -97,8 +97,8 @@ class SyncToken: books_last_modified=datetime.min, archive_last_modified=datetime.min, reading_state_last_modified=datetime.min, - tags_last_modified=datetime.min, - books_last_id=-1 + tags_last_modified=datetime.min + # books_last_id=-1 ): # nosec self.raw_kobo_store_token = raw_kobo_store_token self.books_last_created = books_last_created @@ -106,7 +106,7 @@ class SyncToken: self.archive_last_modified = archive_last_modified self.reading_state_last_modified = reading_state_last_modified self.tags_last_modified = tags_last_modified - self.books_last_id = books_last_id + # self.books_last_id = books_last_id @staticmethod def from_headers(headers): @@ -141,12 +141,12 @@ class SyncToken: archive_last_modified = get_datetime_from_json(data_json, "archive_last_modified") reading_state_last_modified = get_datetime_from_json(data_json, "reading_state_last_modified") tags_last_modified = get_datetime_from_json(data_json, "tags_last_modified") - books_last_id = data_json["books_last_id"] + # books_last_id = data_json["books_last_id"] except TypeError: log.error("SyncToken timestamps don't parse to a datetime.") return SyncToken(raw_kobo_store_token=raw_kobo_store_token) - except KeyError: - books_last_id = -1 + #except KeyError: + # books_last_id = -1 return SyncToken( raw_kobo_store_token=raw_kobo_store_token, @@ -155,7 +155,7 @@ class SyncToken: archive_last_modified=archive_last_modified, reading_state_last_modified=reading_state_last_modified, tags_last_modified=tags_last_modified, - books_last_id=books_last_id + #books_last_id=books_last_id ) def set_kobo_store_header(self, store_headers): @@ -179,16 +179,16 @@ class SyncToken: "archive_last_modified": to_epoch_timestamp(self.archive_last_modified), "reading_state_last_modified": to_epoch_timestamp(self.reading_state_last_modified), "tags_last_modified": to_epoch_timestamp(self.tags_last_modified), - "books_last_id":self.books_last_id + #"books_last_id":self.books_last_id }, } return b64encode_json(token) def __str__(self): - return "{},{},{},{},{},{},{}".format(self.raw_kobo_store_token, + return "{},{},{},{},{},{}".format(self.raw_kobo_store_token, self.books_last_created, self.books_last_modified, self.archive_last_modified, self.reading_state_last_modified, - self.tags_last_modified, - self.books_last_id) + self.tags_last_modified) + #self.books_last_id) diff --git a/cps/ub.py b/cps/ub.py index f1a33d75..df1f0bc8 100644 --- a/cps/ub.py +++ b/cps/ub.py @@ -419,6 +419,12 @@ class ArchivedBook(Base): last_modified = Column(DateTime, default=datetime.datetime.utcnow) +class KoboSyncedBooks(Base): + __tablename__ = 'kobo_synced_books' + id = Column(Integer, primary_key=True, autoincrement=True) + user_id = Column(Integer, ForeignKey('user.id')) + book_id = Column(Integer) + # The Kobo ReadingState API keeps track of 4 timestamped entities: # ReadingState, StatusInfo, Statistics, CurrentBookmark # Which we map to the following 4 tables: From 50919d47212066c75f03ee7a5332ecf2d584b98e Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Mon, 4 Oct 2021 17:50:32 +0200 Subject: [PATCH 21/35] Added handling for missing flask-wtf dependency Added CSRF protection (via flask-wtf) Moved upload function to js file Fixed error page in case of csrf failure --- cps.py | 2 +- cps/__init__.py | 17 +++++++++++++++++ cps/about.py | 21 +++++++++++++-------- cps/kobo.py | 10 ++++++++-- cps/static/js/edit_books.js | 1 - cps/static/js/main.js | 22 ++++++++++++++++++++-- cps/templates/book_edit.html | 1 + cps/templates/book_table.html | 1 + cps/templates/config_db.html | 1 + cps/templates/config_edit.html | 1 + cps/templates/config_view_edit.html | 5 +++-- cps/templates/detail.html | 2 ++ cps/templates/email_edit.html | 13 ++++++++----- cps/templates/http_error.html | 2 +- cps/templates/layout.html | 13 +------------ cps/templates/list.html | 1 + cps/templates/login.html | 1 + cps/templates/register.html | 1 + cps/templates/search_form.html | 1 + cps/templates/shelf_edit.html | 1 + cps/templates/user_edit.html | 1 + cps/templates/user_table.html | 1 + cps/web.py | 5 ++--- requirements.txt | 1 + setup.cfg | 5 ++++- 25 files changed, 92 insertions(+), 38 deletions(-) diff --git a/cps.py b/cps.py index e4b1ede8..161b1655 100755 --- a/cps.py +++ b/cps.py @@ -49,7 +49,7 @@ try: from cps.kobo import kobo, get_kobo_activated from cps.kobo_auth import kobo_auth kobo_available = get_kobo_activated() -except ImportError: +except (ImportError, AttributeError): # Catch also error for not installed flask-wtf (missing csrf decorator) kobo_available = False try: diff --git a/cps/__init__.py b/cps/__init__.py index 517358c5..f1143d9d 100644 --- a/cps/__init__.py +++ b/cps/__init__.py @@ -43,6 +43,12 @@ try: except ImportError: lxml_present = False +try: + from flask_wtf.csrf import CSRFProtect + wtf_present = True +except ImportError: + wtf_present = False + mimetypes.init() mimetypes.add_type('application/xhtml+xml', '.xhtml') mimetypes.add_type('application/epub+zip', '.epub') @@ -75,6 +81,12 @@ lm.login_view = 'web.login' lm.anonymous_user = ub.Anonymous lm.session_protection = 'strong' +if wtf_present: + csrf = CSRFProtect() + csrf.init_app(app) +else: + csrf = None + ub.init_db(cli.settingspath) # pylint: disable=no-member config = config_sql.load_configuration(ub.session) @@ -105,6 +117,11 @@ def create_app(): log.info('*** "lxml" is needed for calibre-web to run. Please install it using pip: "pip install lxml" ***') print('*** "lxml" is needed for calibre-web to run. Please install it using pip: "pip install lxml" ***') sys.exit(6) + if not wtf_present: + log.info('*** "flask-wtf" is needed for calibre-web to run. Please install it using pip: "pip install flask-wtf" ***') + print('*** "flask-wtf" is needed for calibre-web to run. Please install it using pip: "pip install flask-wtf" ***') + sys.exit(7) + app.wsgi_app = ReverseProxied(app.wsgi_app) # For python2 convert path to unicode if sys.version_info < (3, 0): diff --git a/cps/about.py b/cps/about.py index 66c0ef40..31a16552 100644 --- a/cps/about.py +++ b/cps/about.py @@ -29,6 +29,10 @@ from collections import OrderedDict import babel, pytz, requests, sqlalchemy import werkzeug, flask, flask_login, flask_principal, jinja2 from flask_babel import gettext as _ +try: + from flask_wtf import __version__ as flaskwtf_version +except ImportError: + flaskwtf_version = _(u'not installed') from . import db, calibre_db, converter, uploader, server, isoLanguages, constants from .render_template import render_title_template @@ -75,6 +79,7 @@ _VERSIONS = OrderedDict( Flask=flask.__version__, Flask_Login=flask_loginVersion, Flask_Principal=flask_principal.__version__, + Flask_WTF=flaskwtf_version, Werkzeug=werkzeug.__version__, Babel=babel.__version__, Jinja2=jinja2.__version__, @@ -84,14 +89,14 @@ _VERSIONS = OrderedDict( SQLite=sqlite3.sqlite_version, iso639=isoLanguages.__version__, pytz=pytz.__version__, - Unidecode = unidecode_version, - Scholarly = scholarly_version, - Flask_SimpleLDAP = u'installed' if bool(services.ldap) else None, - python_LDAP = services.ldapVersion if bool(services.ldapVersion) else None, - Goodreads = u'installed' if bool(services.goodreads_support) else None, - jsonschema = services.SyncToken.__version__ if bool(services.SyncToken) else None, - flask_dance = flask_danceVersion, - greenlet = greenlet_Version + Unidecode=unidecode_version, + Scholarly=scholarly_version, + Flask_SimpleLDAP=u'installed' if bool(services.ldap) else None, + python_LDAP=services.ldapVersion if bool(services.ldapVersion) else None, + Goodreads=u'installed' if bool(services.goodreads_support) else None, + jsonschema=services.SyncToken.__version__ if bool(services.SyncToken) else None, + flask_dance=flask_danceVersion, + greenlet=greenlet_Version ) _VERSIONS.update(uploader.get_versions()) diff --git a/cps/kobo.py b/cps/kobo.py index 7eee3e17..ba9a8d1f 100644 --- a/cps/kobo.py +++ b/cps/kobo.py @@ -47,7 +47,8 @@ from sqlalchemy.exc import StatementError from sqlalchemy.sql import select import requests -from . import config, logger, kobo_auth, db, calibre_db, helper, shelf as shelf_lib, ub + +from . import config, logger, kobo_auth, db, calibre_db, helper, shelf as shelf_lib, ub, csrf from .constants import sqlalchemy_version2 from .helper import get_download_link from .services import SyncToken as SyncToken @@ -505,7 +506,7 @@ def get_metadata(book): return metadata - +@csrf.exempt @kobo.route("/v1/library/tags", methods=["POST", "DELETE"]) @requires_kobo_auth # Creates a Shelf with the given items, and returns the shelf's uuid. @@ -595,6 +596,7 @@ def add_items_to_shelf(items, shelf): return items_unknown_to_calibre +@csrf.exempt @kobo.route("/v1/library/tags//items", methods=["POST"]) @requires_kobo_auth def HandleTagAddItem(tag_id): @@ -624,6 +626,7 @@ def HandleTagAddItem(tag_id): return make_response('', 201) +@csrf.exempt @kobo.route("/v1/library/tags//items/delete", methods=["POST"]) @requires_kobo_auth def HandleTagRemoveItem(tag_id): @@ -983,6 +986,7 @@ def HandleUnimplementedRequest(dummy=None): # TODO: Implement the following routes +@csrf.exempt @kobo.route("/v1/user/loyalty/", methods=["GET", "POST"]) @kobo.route("/v1/user/profile", methods=["GET", "POST"]) @kobo.route("/v1/user/wishlist", methods=["GET", "POST"]) @@ -993,6 +997,7 @@ def HandleUserRequest(dummy=None): return redirect_or_proxy_request() +@csrf.exempt @kobo.route("/v1/products//prices", methods=["GET", "POST"]) @kobo.route("/v1/products//recommendations", methods=["GET", "POST"]) @kobo.route("/v1/products//nextread", methods=["GET", "POST"]) @@ -1026,6 +1031,7 @@ def make_calibre_web_auth_response(): ) +@csrf.exempt @kobo.route("/v1/auth/device", methods=["POST"]) @requires_kobo_auth def HandleAuthRequest(): diff --git a/cps/static/js/edit_books.js b/cps/static/js/edit_books.js index 00c971d3..66dd4eea 100644 --- a/cps/static/js/edit_books.js +++ b/cps/static/js/edit_books.js @@ -23,7 +23,6 @@ if ($(".tiny_editor").length) { $(".datepicker").datepicker({ format: "yyyy-mm-dd", - language: language }).on("change", function () { // Show localized date over top of the standard YYYY-MM-DD date var pubDate; diff --git a/cps/static/js/main.js b/cps/static/js/main.js index ea068423..2ffaaa87 100644 --- a/cps/static/js/main.js +++ b/cps/static/js/main.js @@ -112,6 +112,14 @@ $("#btn-upload").change(function() { $("#form-upload").submit(); }); +$("#form-upload").uploadprogress({ + redirect_url: getPath() + "/", //"{{ url_for('web.index')}}", + uploadedMsg: $("#form-upload").data("message"), //"{{_('Upload done, processing, please wait...')}}", + modalTitle: $("#form-upload").data("title"), //"{{_('Uploading...')}}", + modalFooter: $("#form-upload").data("footer"), //"{{_('Close')}}", + modalTitleFailed: $("#form-upload").data("failed") //"{{_('Error')}}" +}); + $(document).ready(function() { var inp = $('#query').first() if (inp.length) { @@ -223,6 +231,16 @@ $(function() { var preFilters = $.Callbacks(); $.ajaxPrefilter(preFilters.fire); + // equip all post requests with csrf_token + var csrftoken = $("input[name='csrf_token']").val(); + $.ajaxSetup({ + beforeSend: function(xhr, settings) { + if (!/^(GET|HEAD|OPTIONS|TRACE)$/i.test(settings.type) && !this.crossDomain) { + xhr.setRequestHeader("X-CSRFToken", csrftoken) + } + } + }); + function restartTimer() { $("#spinner").addClass("hidden"); $("#RestartDialog").modal("hide"); @@ -576,7 +594,7 @@ $(function() { method:"post", dataType: "json", url: window.location.pathname + "/../../ajax/simulatedbchange", - data: {config_calibre_dir: $("#config_calibre_dir").val()}, + data: {config_calibre_dir: $("#config_calibre_dir").val(), csrf_token: $("input[name='csrf_token']").val()}, success: function success(data) { if ( data.change ) { if ( data.valid ) { @@ -712,7 +730,7 @@ $(function() { method:"post", contentType: "application/json; charset=utf-8", dataType: "json", - url: window.location.pathname + "/../ajax/view", + url: getPath() + "/ajax/view", data: "{\"series\": {\"series_view\": \""+ view +"\"}}", success: function success() { location.reload(); diff --git a/cps/templates/book_edit.html b/cps/templates/book_edit.html index 04eb2c02..a47f400a 100644 --- a/cps/templates/book_edit.html +++ b/cps/templates/book_edit.html @@ -23,6 +23,7 @@ {% if source_formats|length > 0 and conversion_formats|length > 0 %}

    {{_('Convert book format:')}}

    +
    diff --git a/cps/templates/book_table.html b/cps/templates/book_table.html index bbcd0ed6..d7cee112 100644 --- a/cps/templates/book_table.html +++ b/cps/templates/book_table.html @@ -20,6 +20,7 @@ {% endblock %} {% block body %}

    {{_(title)}}

    +
    {{_('Merge selected books')}}
    diff --git a/cps/templates/config_db.html b/cps/templates/config_db.html index c5027abf..0090bd95 100644 --- a/cps/templates/config_db.html +++ b/cps/templates/config_db.html @@ -8,6 +8,7 @@

    {{title}}

    +
    diff --git a/cps/templates/config_edit.html b/cps/templates/config_edit.html index e062fae5..8cd0034e 100644 --- a/cps/templates/config_edit.html +++ b/cps/templates/config_edit.html @@ -8,6 +8,7 @@

    {{title}}

    +
    diff --git a/cps/templates/config_view_edit.html b/cps/templates/config_view_edit.html index 2ea1c53c..b2578312 100644 --- a/cps/templates/config_view_edit.html +++ b/cps/templates/config_view_edit.html @@ -6,8 +6,9 @@ {% block body %}

    {{title}}

    - -
    + + +

    diff --git a/cps/templates/detail.html b/cps/templates/detail.html index 4a3d8f23..6dd1c72a 100644 --- a/cps/templates/detail.html +++ b/cps/templates/detail.html @@ -214,6 +214,7 @@

    +

    +

    {{title}}

    + {% if feature_support['gmail'] %}
    @@ -72,6 +73,7 @@

    {{_('Allowed Domains (Whitelist)')}}

    +
    @@ -98,11 +100,12 @@ -
    - - -
    - + +
    + + +
    +
    diff --git a/cps/templates/http_error.html b/cps/templates/http_error.html index eb628a5f..8abd0c16 100644 --- a/cps/templates/http_error.html +++ b/cps/templates/http_error.html @@ -1,5 +1,5 @@ - + {{ instance }} | HTTP Error ({{ error_code }}) diff --git a/cps/templates/layout.html b/cps/templates/layout.html index a7315c34..7ec79f45 100644 --- a/cps/templates/layout.html +++ b/cps/templates/layout.html @@ -61,7 +61,7 @@ {% if g.user.role_upload() or g.user.role_admin()%} {% if g.allow_upload %}
  • -
  • diff --git a/cps/templates/login.html b/cps/templates/login.html index 7ae56d1b..0d5232e3 100644 --- a/cps/templates/login.html +++ b/cps/templates/login.html @@ -4,6 +4,7 @@

    {{_('Login')}}

    +
    diff --git a/cps/templates/register.html b/cps/templates/register.html index db8644fb..307a209b 100644 --- a/cps/templates/register.html +++ b/cps/templates/register.html @@ -3,6 +3,7 @@

    {{_('Register New Account')}}

    + {% if not config.config_register_email %}
    diff --git a/cps/templates/search_form.html b/cps/templates/search_form.html index 5d186ba7..fa57c85b 100644 --- a/cps/templates/search_form.html +++ b/cps/templates/search_form.html @@ -3,6 +3,7 @@

    {{title}}

    +
    diff --git a/cps/templates/shelf_edit.html b/cps/templates/shelf_edit.html index b3c81731..2882d08a 100644 --- a/cps/templates/shelf_edit.html +++ b/cps/templates/shelf_edit.html @@ -3,6 +3,7 @@

    {{title}}

    +
    diff --git a/cps/templates/user_edit.html b/cps/templates/user_edit.html index b4429faf..d48ba9a2 100644 --- a/cps/templates/user_edit.html +++ b/cps/templates/user_edit.html @@ -3,6 +3,7 @@

    {{title}}

    +
    {% if new_user or ( g.user and content.name != "Guest" and g.user.role_admin() ) %}
    diff --git a/cps/templates/user_table.html b/cps/templates/user_table.html index 111d2a09..416f6b7b 100644 --- a/cps/templates/user_table.html +++ b/cps/templates/user_table.html @@ -118,6 +118,7 @@ {% endblock %} {% block body %}

    {{_(title)}}

    +
    {{_('Remove Selections')}}
    diff --git a/cps/web.py b/cps/web.py index 3681c38c..db0be841 100644 --- a/cps/web.py +++ b/cps/web.py @@ -84,14 +84,13 @@ except ImportError: @app.after_request def add_security_headers(resp): - resp.headers['Content-Security-Policy'] = "default-src 'self' 'unsafe-inline' 'unsafe-eval';" + resp.headers['Content-Security-Policy'] = "default-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' data:" if request.endpoint == "editbook.edit_book": - resp.headers['Content-Security-Policy'] += "img-src * data:" + resp.headers['Content-Security-Policy'] += " *" resp.headers['X-Content-Type-Options'] = 'nosniff' resp.headers['X-Frame-Options'] = 'SAMEORIGIN' resp.headers['X-XSS-Protection'] = '1; mode=block' resp.headers['Strict-Transport-Security'] = 'max-age=31536000; includeSubDomains' - # log.debug(request.full_path) return resp web = Blueprint('web', __name__) diff --git a/requirements.txt b/requirements.txt index e7f67593..0332185d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -13,3 +13,4 @@ tornado>=4.1,<6.2 Wand>=0.4.4,<0.7.0 unidecode>=0.04.19,<1.3.0 lxml>=3.8.0,<4.7.0 +flask-wtf>=0.15.0,<0.16.0 diff --git a/setup.cfg b/setup.cfg index 9787caa4..cea3f5a4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -18,9 +18,11 @@ classifiers = Development Status :: 5 - Production/Stable License :: OSI Approved :: GNU Affero General Public License v3 Programming Language :: Python :: 3 - Programming Language :: Python :: 3.5 Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 Operating System :: OS Independent keywords = calibre @@ -49,6 +51,7 @@ install_requires = Wand>=0.4.4,<0.7.0 unidecode>=0.04.19,<1.3.0 lxml>=3.8.0,<4.7.0 + flask-wtf>=0.15.0,<0.16.0 [options.extras_require] gdrive = From ed26d34961c61c4cdb299b5d69d83c7eb67cba2f Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Mon, 4 Oct 2021 18:26:46 +0200 Subject: [PATCH 22/35] Code cleaning (remove python2) --- cps.py | 11 +++-------- cps/__init__.py | 12 +++--------- cps/about.py | 1 - cps/admin.py | 1 - cps/cache_buster.py | 1 - cps/cli.py | 14 -------------- cps/comic.py | 1 - cps/config_sql.py | 6 ------ cps/constants.py | 8 +------- cps/converter.py | 1 - cps/db.py | 3 --- cps/editbooks.py | 1 - cps/epub.py | 1 - cps/fb2.py | 1 - cps/gdrive.py | 6 +----- cps/gdriveutils.py | 1 - cps/helper.py | 8 +------- cps/isoLanguages.py | 2 -- cps/iso_language_names.py | 4 +--- cps/jinjia.py | 1 - cps/kobo.py | 5 +---- cps/logger.py | 1 - cps/oauth.py | 1 - cps/oauth_bb.py | 1 - cps/opds.py | 10 ++++------ cps/pagination.py | 1 - cps/redirect.py | 1 - cps/reverseproxy.py | 2 -- cps/search_metadata.py | 1 - cps/server.py | 1 - cps/services/SyncToken.py | 5 +---- cps/services/__init__.py | 2 -- cps/services/gmail.py | 19 +++++++++++++++++- cps/services/goodreads_support.py | 1 - cps/services/simpleldap.py | 1 - cps/services/worker.py | 18 ++++++++++++++++- cps/shelf.py | 2 -- cps/subproc_wrapper.py | 8 +------- cps/tasks/convert.py | 27 +++++++++++++++++--------- cps/tasks/mail.py | 32 ++++++++++++++++++------------- cps/tasks/upload.py | 18 ++++++++++++++++- cps/ub.py | 1 - cps/updater.py | 1 - cps/uploader.py | 1 - cps/web.py | 10 ++-------- 45 files changed, 108 insertions(+), 146 deletions(-) diff --git a/cps.py b/cps.py index 161b1655..ab9896ce 100755 --- a/cps.py +++ b/cps.py @@ -17,18 +17,13 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import absolute_import, division, print_function, unicode_literals import sys import os # Insert local directories into path -if sys.version_info < (3, 0): - sys.path.append(os.path.dirname(os.path.abspath(__file__.decode('utf-8')))) - sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__.decode('utf-8'))), 'vendor')) -else: - sys.path.append(os.path.dirname(os.path.abspath(__file__))) - sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'vendor')) +sys.path.append(os.path.dirname(os.path.abspath(__file__))) +sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'vendor')) from cps import create_app @@ -49,7 +44,7 @@ try: from cps.kobo import kobo, get_kobo_activated from cps.kobo_auth import kobo_auth kobo_available = get_kobo_activated() -except (ImportError, AttributeError): # Catch also error for not installed flask-wtf (missing csrf decorator) +except (ImportError, AttributeError): # Catch also error for not installed flask-WTF (missing csrf decorator) kobo_available = False try: diff --git a/cps/__init__.py b/cps/__init__.py index f1143d9d..f38ce0d2 100644 --- a/cps/__init__.py +++ b/cps/__init__.py @@ -20,7 +20,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import sys import os import mimetypes @@ -118,16 +117,11 @@ def create_app(): print('*** "lxml" is needed for calibre-web to run. Please install it using pip: "pip install lxml" ***') sys.exit(6) if not wtf_present: - log.info('*** "flask-wtf" is needed for calibre-web to run. Please install it using pip: "pip install flask-wtf" ***') - print('*** "flask-wtf" is needed for calibre-web to run. Please install it using pip: "pip install flask-wtf" ***') - sys.exit(7) + log.info('*** "flask-WTF" is needed for calibre-web to run. Please install it using pip: "pip install flask-WTF" ***') + print('*** "flask-WTF" is needed for calibre-web to run. Please install it using pip: "pip install flask-WTF" ***') + # sys.exit(7) app.wsgi_app = ReverseProxied(app.wsgi_app) - # For python2 convert path to unicode - if sys.version_info < (3, 0): - app.static_folder = app.static_folder.decode('utf-8') - app.root_path = app.root_path.decode('utf-8') - app.instance_path = app.instance_path.decode('utf-8') if os.environ.get('FLASK_DEBUG'): cache_buster.init_cache_busting(app) diff --git a/cps/about.py b/cps/about.py index 31a16552..f3c8b95f 100644 --- a/cps/about.py +++ b/cps/about.py @@ -20,7 +20,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import sys import platform import sqlite3 diff --git a/cps/admin.py b/cps/admin.py index 2a65e53a..6d6c3ba2 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -20,7 +20,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import os import re import base64 diff --git a/cps/cache_buster.py b/cps/cache_buster.py index 8c521fe1..9619d605 100644 --- a/cps/cache_buster.py +++ b/cps/cache_buster.py @@ -19,7 +19,6 @@ # Inspired by https://github.com/ChrisTM/Flask-CacheBust # Uses query strings so CSS font files are found without having to resort to absolute URLs -from __future__ import division, print_function, unicode_literals import os import hashlib diff --git a/cps/cli.py b/cps/cli.py index 3bb08c1f..3685e8e2 100644 --- a/cps/cli.py +++ b/cps/cli.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import sys import os import argparse @@ -48,19 +47,6 @@ parser.add_argument('-s', metavar='user:pass', help='Sets specific username to n parser.add_argument('-f', action='store_true', help='Flag is depreciated and will be removed in next version') args = parser.parse_args() -if sys.version_info < (3, 0): - if args.p: - args.p = args.p.decode('utf-8') - if args.g: - args.g = args.g.decode('utf-8') - if args.k: - args.k = args.k.decode('utf-8') - if args.c: - args.c = args.c.decode('utf-8') - if args.s: - args.s = args.s.decode('utf-8') - - settingspath = args.p or os.path.join(_CONFIG_DIR, "app.db") gdpath = args.g or os.path.join(_CONFIG_DIR, "gdrive.db") diff --git a/cps/comic.py b/cps/comic.py index 462c11f0..b094c60f 100644 --- a/cps/comic.py +++ b/cps/comic.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import os from . import logger, isoLanguages diff --git a/cps/config_sql.py b/cps/config_sql.py index 88107f9b..232de145 100644 --- a/cps/config_sql.py +++ b/cps/config_sql.py @@ -16,8 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . - -from __future__ import division, print_function, unicode_literals import os import sys import json @@ -361,10 +359,6 @@ def _migrate_table(session, orm_class): session.query(column).first() except OperationalError as err: log.debug("%s: %s", column_name, err.args[0]) - if column.default is not None: - if sys.version_info < (3, 0): - if isinstance(column.default.arg, unicode): - column.default.arg = column.default.arg.encode('utf-8') if column.default is None: column_default = "" else: diff --git a/cps/constants.py b/cps/constants.py index bfdee6da..367bc29d 100644 --- a/cps/constants.py +++ b/cps/constants.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import sys import os from collections import namedtuple @@ -31,12 +30,7 @@ HOME_CONFIG = os.path.isfile(os.path.join(os.path.dirname(os.path.abspath(__file UPDATER_AVAILABLE = True # Base dir is parent of current file, necessary if called from different folder -if sys.version_info < (3, 0): - BASE_DIR = os.path.abspath(os.path.join( - os.path.dirname(os.path.abspath(__file__)),os.pardir)).decode('utf-8') -else: - BASE_DIR = os.path.abspath(os.path.join( - os.path.dirname(os.path.abspath(__file__)),os.pardir)) +BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)),os.pardir)) STATIC_DIR = os.path.join(BASE_DIR, 'cps', 'static') TEMPLATES_DIR = os.path.join(BASE_DIR, 'cps', 'templates') TRANSLATIONS_DIR = os.path.join(BASE_DIR, 'cps', 'translations') diff --git a/cps/converter.py b/cps/converter.py index 6b0f22e4..fcbabbfc 100644 --- a/cps/converter.py +++ b/cps/converter.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import os import re from flask_babel import gettext as _ diff --git a/cps/db.py b/cps/db.py index cfb2ed7c..ab4f5bf5 100644 --- a/cps/db.py +++ b/cps/db.py @@ -17,7 +17,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import sys import os import re @@ -387,8 +386,6 @@ class Custom_Columns(Base): def get_display_dict(self): display_dict = ast.literal_eval(self.display) - if sys.version_info < (3, 0): - display_dict['enum_values'] = [x.decode('unicode_escape') for x in display_dict['enum_values']] return display_dict diff --git a/cps/editbooks.py b/cps/editbooks.py index ce06fbf4..063eba2a 100644 --- a/cps/editbooks.py +++ b/cps/editbooks.py @@ -20,7 +20,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import os from datetime import datetime import json diff --git a/cps/epub.py b/cps/epub.py index 998dbfa6..cbbdcbbd 100644 --- a/cps/epub.py +++ b/cps/epub.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import os import zipfile from lxml import etree diff --git a/cps/fb2.py b/cps/fb2.py index af4a29a7..21586736 100644 --- a/cps/fb2.py +++ b/cps/fb2.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals from lxml import etree from .constants import BookMeta diff --git a/cps/gdrive.py b/cps/gdrive.py index c0764015..e2d8f166 100644 --- a/cps/gdrive.py +++ b/cps/gdrive.py @@ -20,7 +20,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import os import sys import hashlib @@ -137,10 +136,7 @@ def on_received_watch_confirmation(): response = gdriveutils.getChangeById(gdriveutils.Gdrive.Instance().drive, j['id']) log.debug('%r', response) if response: - if sys.version_info < (3, 0): - dbpath = os.path.join(config.config_calibre_dir, "metadata.db") - else: - dbpath = os.path.join(config.config_calibre_dir, "metadata.db").encode() + dbpath = os.path.join(config.config_calibre_dir, "metadata.db").encode() if not response['deleted'] and response['file']['title'] == 'metadata.db' \ and response['file']['md5Checksum'] != hashlib.md5(dbpath): # nosec tmp_dir = os.path.join(tempfile.gettempdir(), 'calibre_web') diff --git a/cps/gdriveutils.py b/cps/gdriveutils.py index c63b0393..d3277814 100644 --- a/cps/gdriveutils.py +++ b/cps/gdriveutils.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import os import json import shutil diff --git a/cps/helper.py b/cps/helper.py index f7b72a8d..df7019e6 100644 --- a/cps/helper.py +++ b/cps/helper.py @@ -17,7 +17,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import sys import os import io @@ -490,10 +489,7 @@ def reset_password(user_id): def generate_random_password(): s = "abcdefghijklmnopqrstuvwxyz01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%&*()?" passlen = 8 - if sys.version_info < (3, 0): - return "".join(s[ord(c) % len(s)] for c in os.urandom(passlen)) - else: - return "".join(s[c % len(s)] for c in os.urandom(passlen)) + return "".join(s[c % len(s)] for c in os.urandom(passlen)) def uniq(inpt): @@ -707,8 +703,6 @@ def check_unrar(unrarLocation): return _('Unrar binary file not found') try: - if sys.version_info < (3, 0): - unrarLocation = unrarLocation.encode(sys.getfilesystemencoding()) unrarLocation = [unrarLocation] value = process_wait(unrarLocation, pattern='UNRAR (.*) freeware') if value: diff --git a/cps/isoLanguages.py b/cps/isoLanguages.py index 35d9f0a7..6c66a583 100644 --- a/cps/isoLanguages.py +++ b/cps/isoLanguages.py @@ -16,8 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals - from .iso_language_names import LANGUAGE_NAMES as _LANGUAGE_NAMES diff --git a/cps/iso_language_names.py b/cps/iso_language_names.py index d07158a0..9966ecd9 100644 --- a/cps/iso_language_names.py +++ b/cps/iso_language_names.py @@ -6,8 +6,6 @@ # pylint: disable=too-many-lines,bad-continuation -from __future__ import unicode_literals - # This file is autogenerated, do NOT add, change, or delete ANY string # If you need help or assistance for adding a new language, please contact the project team @@ -7855,4 +7853,4 @@ LANGUAGE_NAMES = { "zxx": "No linguistic content", "zza": "Zaza" } -} \ No newline at end of file +} diff --git a/cps/jinjia.py b/cps/jinjia.py index 554bc791..06e99141 100644 --- a/cps/jinjia.py +++ b/cps/jinjia.py @@ -22,7 +22,6 @@ # custom jinja filters -from __future__ import division, print_function, unicode_literals import datetime import mimetypes from uuid import uuid4 diff --git a/cps/kobo.py b/cps/kobo.py index ba9a8d1f..5ce2b640 100644 --- a/cps/kobo.py +++ b/cps/kobo.py @@ -492,10 +492,7 @@ def get_metadata(book): metadata.update(get_author(book)) if get_series(book): - if sys.version_info < (3, 0): - name = get_series(book).encode("utf-8") - else: - name = get_series(book) + name = get_series(book) metadata["Series"] = { "Name": get_series(book), "Number": get_seriesindex(book), # ToDo Check int() ? diff --git a/cps/logger.py b/cps/logger.py index e2747f53..5847188b 100644 --- a/cps/logger.py +++ b/cps/logger.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import os import sys import inspect diff --git a/cps/oauth.py b/cps/oauth.py index a8995180..f8e5c1fd 100644 --- a/cps/oauth.py +++ b/cps/oauth.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see -from __future__ import division, print_function, unicode_literals from flask import session try: diff --git a/cps/oauth_bb.py b/cps/oauth_bb.py index c8cc2e3e..d9efd41e 100644 --- a/cps/oauth_bb.py +++ b/cps/oauth_bb.py @@ -20,7 +20,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see -from __future__ import division, print_function, unicode_literals import json from functools import wraps diff --git a/cps/opds.py b/cps/opds.py index 2a615607..92c51d1b 100644 --- a/cps/opds.py +++ b/cps/opds.py @@ -20,7 +20,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import sys import datetime from functools import wraps @@ -537,11 +536,10 @@ def feed_search(term): def check_auth(username, password): - if sys.version_info.major == 3: - try: - username = username.encode('windows-1252') - except UnicodeEncodeError: - username = username.encode('utf-8') + try: + username = username.encode('windows-1252') + except UnicodeEncodeError: + username = username.encode('utf-8') user = ub.session.query(ub.User).filter(func.lower(ub.User.name) == username.decode('utf-8').lower()).first() if bool(user and check_password_hash(str(user.password), password)): diff --git a/cps/pagination.py b/cps/pagination.py index c29717c2..7a9bfb70 100644 --- a/cps/pagination.py +++ b/cps/pagination.py @@ -20,7 +20,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals from math import ceil diff --git a/cps/redirect.py b/cps/redirect.py index 593afd0c..d491b353 100644 --- a/cps/redirect.py +++ b/cps/redirect.py @@ -27,7 +27,6 @@ # http://flask.pocoo.org/snippets/62/ -from __future__ import division, print_function, unicode_literals try: from urllib.parse import urlparse, urljoin except ImportError: diff --git a/cps/reverseproxy.py b/cps/reverseproxy.py index 3bcbd3b7..4acb8e45 100644 --- a/cps/reverseproxy.py +++ b/cps/reverseproxy.py @@ -36,8 +36,6 @@ # # Inspired by http://flask.pocoo.org/snippets/35/ -from __future__ import division, print_function, unicode_literals - class ReverseProxied(object): """Wrap the application in this middleware and configure the diff --git a/cps/search_metadata.py b/cps/search_metadata.py index 72e77cdd..e837fe21 100644 --- a/cps/search_metadata.py +++ b/cps/search_metadata.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import os import json import importlib diff --git a/cps/server.py b/cps/server.py index 9b79f77d..e261c50a 100644 --- a/cps/server.py +++ b/cps/server.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import sys import os import errno diff --git a/cps/services/SyncToken.py b/cps/services/SyncToken.py index 86165f71..692aaa24 100644 --- a/cps/services/SyncToken.py +++ b/cps/services/SyncToken.py @@ -35,10 +35,7 @@ log = logger.create() def b64encode_json(json_data): - if sys.version_info < (3, 0): - return b64encode(json.dumps(json_data)) - else: - return b64encode(json.dumps(json_data).encode()) + return b64encode(json.dumps(json_data).encode()) # Python3 has a timestamp() method we could be calling, however it's not avaiable in python2. diff --git a/cps/services/__init__.py b/cps/services/__init__.py index e6e5954c..32a9d485 100644 --- a/cps/services/__init__.py +++ b/cps/services/__init__.py @@ -16,8 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals - from .. import logger diff --git a/cps/services/gmail.py b/cps/services/gmail.py index baada1f8..ff36b308 100644 --- a/cps/services/gmail.py +++ b/cps/services/gmail.py @@ -1,4 +1,21 @@ -from __future__ import print_function +# -*- coding: utf-8 -*- + +# This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web) +# Copyright (C) 2021 OzzieIsaacs +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + import os.path from google_auth_oauthlib.flow import InstalledAppFlow from google.auth.transport.requests import Request diff --git a/cps/services/goodreads_support.py b/cps/services/goodreads_support.py index 9312bc0f..74e6eba9 100644 --- a/cps/services/goodreads_support.py +++ b/cps/services/goodreads_support.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import time from functools import reduce diff --git a/cps/services/simpleldap.py b/cps/services/simpleldap.py index 4125bdab..1ca7e5bf 100644 --- a/cps/services/simpleldap.py +++ b/cps/services/simpleldap.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import base64 from flask_simpleldap import LDAP, LDAPException diff --git a/cps/services/worker.py b/cps/services/worker.py index 238c8dbf..5952c705 100644 --- a/cps/services/worker.py +++ b/cps/services/worker.py @@ -1,5 +1,21 @@ +# -*- coding: utf-8 -*- + +# This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web) +# Copyright (C) 2020 pwr +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import threading import abc import uuid diff --git a/cps/shelf.py b/cps/shelf.py index d232e850..09fe8dd4 100644 --- a/cps/shelf.py +++ b/cps/shelf.py @@ -20,8 +20,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals - import sys from datetime import datetime diff --git a/cps/subproc_wrapper.py b/cps/subproc_wrapper.py index 3cc4a070..187b2cb2 100644 --- a/cps/subproc_wrapper.py +++ b/cps/subproc_wrapper.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import sys import os import subprocess @@ -33,13 +32,8 @@ def process_open(command, quotes=(), env=None, sout=subprocess.PIPE, serr=subpro if key in quotes: command[key] = '"' + element + '"' exc_command = " ".join(command) - if sys.version_info < (3, 0): - exc_command = exc_command.encode(sys.getfilesystemencoding()) else: - if sys.version_info < (3, 0): - exc_command = [x.encode(sys.getfilesystemencoding()) for x in command] - else: - exc_command = [x for x in command] + exc_command = [x for x in command] return subprocess.Popen(exc_command, shell=False, stdout=sout, stderr=serr, universal_newlines=newlines, env=env) # nosec diff --git a/cps/tasks/convert.py b/cps/tasks/convert.py index 56cc7076..08fb1644 100644 --- a/cps/tasks/convert.py +++ b/cps/tasks/convert.py @@ -1,4 +1,21 @@ -from __future__ import division, print_function, unicode_literals +# -*- coding: utf-8 -*- + +# This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web) +# Copyright (C) 2020 pwr +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + import sys import os import re @@ -161,8 +178,6 @@ class TaskConvert(CalibreTask): while True: nextline = p.stdout.readlines() nextline = [x.strip('\n') for x in nextline if x != '\n'] - if sys.version_info < (3, 0): - nextline = [x.decode('utf-8') for x in nextline] for line in nextline: log.debug(line) if p.poll() is not None: @@ -207,10 +222,6 @@ class TaskConvert(CalibreTask): while p.poll() is None: nextline = p.stdout.readline() - if os.name == 'nt' and sys.version_info < (3, 0): - nextline = nextline.decode('windows-1252') - elif os.name == 'posix' and sys.version_info < (3, 0): - nextline = nextline.decode('utf-8') log.debug(nextline.strip('\r\n')) # parse progress string from calibre-converter progress = re.search(r"(\d+)%\s.*", nextline) @@ -224,8 +235,6 @@ class TaskConvert(CalibreTask): calibre_traceback = p.stderr.readlines() error_message = "" for ele in calibre_traceback: - if sys.version_info < (3, 0): - ele = ele.decode('utf-8') log.debug(ele.strip('\n')) if not ele.startswith('Traceback') and not ele.startswith(' File'): error_message = _("Calibre failed with error: %(error)s", error=ele.strip('\n')) diff --git a/cps/tasks/mail.py b/cps/tasks/mail.py index 292114d5..2e95ee98 100644 --- a/cps/tasks/mail.py +++ b/cps/tasks/mail.py @@ -1,11 +1,27 @@ -from __future__ import division, print_function, unicode_literals +# -*- coding: utf-8 -*- + +# This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web) +# Copyright (C) 2020 pwr +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + import sys import os import smtplib import threading import socket import mimetypes -import base64 try: from StringIO import StringIO @@ -162,17 +178,11 @@ class TaskEmail(CalibreTask): log.debug_or_exception(ex) self._handleError(u'Error sending e-mail: {}'.format(ex)) - def send_standard_email(self, msg): use_ssl = int(self.settings.get('mail_use_ssl', 0)) timeout = 600 # set timeout to 5mins - # redirect output to logfile on python2 on python3 debugoutput is caught with overwritten - # _print_debug function - if sys.version_info < (3, 0): - org_smtpstderr = smtplib.stderr - smtplib.stderr = logger.StderrLogger('worker.smtp') - + # on python3 debugoutput is caught with overwritten _print_debug function log.debug("Start sending e-mail") if use_ssl == 2: self.asyncSMTP = EmailSSL(self.settings["mail_server"], self.settings["mail_port"], @@ -198,9 +208,6 @@ class TaskEmail(CalibreTask): self._handleSuccess() log.debug("E-mail send successfully") - if sys.version_info < (3, 0): - smtplib.stderr = org_smtpstderr - def send_gmail_email(self, message): return gmail.send_messsage(self.settings.get('mail_gmail_token', None), message) @@ -218,7 +225,6 @@ class TaskEmail(CalibreTask): self.asyncSMTP = None self._progress = x - @classmethod def _get_attachment(cls, bookpath, filename): """Get file as MIMEBase message""" diff --git a/cps/tasks/upload.py b/cps/tasks/upload.py index d7ef34c2..6a341cdd 100644 --- a/cps/tasks/upload.py +++ b/cps/tasks/upload.py @@ -1,4 +1,20 @@ -from __future__ import division, print_function, unicode_literals +# -*- coding: utf-8 -*- + +# This file is part of the Calibre-Web (https://github.com/janeczku/calibre-web) +# Copyright (C) 2020 pwr +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . from datetime import datetime from cps.services.worker import CalibreTask, STAT_FINISH_SUCCESS diff --git a/cps/ub.py b/cps/ub.py index df1f0bc8..fe9d476a 100644 --- a/cps/ub.py +++ b/cps/ub.py @@ -17,7 +17,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import os import sys import datetime diff --git a/cps/updater.py b/cps/updater.py index 63ea23bf..9090263f 100644 --- a/cps/updater.py +++ b/cps/updater.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import sys import os import datetime diff --git a/cps/uploader.py b/cps/uploader.py index 0d59fd01..92a73381 100644 --- a/cps/uploader.py +++ b/cps/uploader.py @@ -16,7 +16,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import os import hashlib from tempfile import gettempdir diff --git a/cps/web.py b/cps/web.py index db0be841..fb01b6e5 100644 --- a/cps/web.py +++ b/cps/web.py @@ -20,7 +20,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -from __future__ import division, print_function, unicode_literals import os from datetime import datetime import json @@ -30,7 +29,6 @@ import copy from babel.dates import format_date from babel import Locale as LC -from babel.core import UnknownLocaleError from flask import Blueprint, jsonify from flask import request, redirect, send_from_directory, make_response, flash, abort, url_for from flask import session as flask_session @@ -212,7 +210,7 @@ def toggle_archived(book_id): @web.route("/ajax/view", methods=["POST"]) @login_required_if_no_ano def update_view(): - to_save = request.get_json() + to_save = request.form.to_dict() # request.get_json() try: for element in to_save: for param in to_save[element]: @@ -261,10 +259,7 @@ def get_comic_book(book_id, book_format, page): log.error('unsupported comic format') return "", 204 - if sys.version_info.major >= 3: - b64 = codecs.encode(extract(page), 'base64').decode() - else: - b64 = extract(page).encode('base64') + b64 = codecs.encode(extract(page), 'base64').decode() ext = names[page].rpartition('.')[-1] if ext not in ('png', 'gif', 'jpg', 'jpeg', 'webp'): ext = 'png' @@ -274,7 +269,6 @@ def get_comic_book(book_id, book_format, page): return "", 204 ''' - # ################################### Typeahead ################################################################## From d8f9e2feb2f136f51b0e869b8f4acdd3d31d8fbb Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Wed, 6 Oct 2021 18:41:01 +0200 Subject: [PATCH 23/35] Bugfixes for user import with default locale and default language Bugfixes from testrun --- cps/admin.py | 17 +- cps/config_sql.py | 2 + cps/kobo.py | 5 +- cps/templates/book_edit.html | 1 + cps/templates/config_view_edit.html | 17 + cps/templates/layout.html | 1 + test/Calibre-Web TestSummary_Linux.html | 2141 ++++++++++++++++------- 7 files changed, 1506 insertions(+), 678 deletions(-) diff --git a/cps/admin.py b/cps/admin.py index 6d6c3ba2..f1c3e57a 100644 --- a/cps/admin.py +++ b/cps/admin.py @@ -235,8 +235,12 @@ def view_configuration(): .filter(and_(db.Custom_Columns.datatype == 'bool', db.Custom_Columns.mark_for_delete == 0)).all() restrict_columns = calibre_db.session.query(db.Custom_Columns)\ .filter(and_(db.Custom_Columns.datatype == 'text', db.Custom_Columns.mark_for_delete == 0)).all() + languages = calibre_db.speaking_language() + translations = [LC('en')] + babel.list_translations() return render_title_template("config_view_edit.html", conf=config, readColumns=read_column, restrictColumns=restrict_columns, + languages=languages, + translations=translations, title=_(u"UI Configuration"), page="uiconfig") @admi.route("/admin/usertable") @@ -514,16 +518,12 @@ def check_valid_restricted_column(column): return True - @admi.route("/admin/viewconfig", methods=["POST"]) @login_required @admin_required def update_view_configuration(): to_save = request.form.to_dict() - # _config_string = lambda x: config.set_from_dictionary(to_save, x, lambda y: y.strip() if y else y) - # _config_int = lambda x: config.set_from_dictionary(to_save, x, int) - _config_string(to_save, "config_calibre_web_title") _config_string(to_save, "config_columns_to_ignore") if _config_string(to_save, "config_title_regex"): @@ -545,6 +545,8 @@ def update_view_configuration(): _config_int(to_save, "config_random_books") _config_int(to_save, "config_books_per_page") _config_int(to_save, "config_authors_max") + _config_string(to_save, "config_default_language") + _config_string(to_save, "config_default_locale") config.config_default_role = constants.selected_roles(to_save) @@ -1350,6 +1352,8 @@ def _handle_new_user(to_save, content, languages, translations, kobo_support): languages=languages, title=_(u"Add new user"), page="newuser", kobo_support=kobo_support, registered_oauth=oauth_check) try: + content.default_language = config.config_default_language + content.locale = config.config_default_locale content.allowed_tags = config.config_allowed_tags content.denied_tags = config.config_denied_tags content.allowed_column_value = config.config_allowed_column_value @@ -1739,9 +1743,8 @@ def ldap_import_create_user(user, user_data): content.password = '' # dummy password which will be replaced by ldap one content.email = useremail content.kindle_mail = kindlemail - content.kindle_mail = kindlemail - content.default_language = config.default_language - content.locale = config.locale + content.default_language = config.config_default_language + content.locale = config.config_default_locale content.sidebar_view = config.config_default_show content.allowed_tags = config.config_allowed_tags content.denied_tags = config.config_denied_tags diff --git a/cps/config_sql.py b/cps/config_sql.py index 232de145..0b45059d 100644 --- a/cps/config_sql.py +++ b/cps/config_sql.py @@ -89,6 +89,8 @@ class _Settings(_Base): config_default_role = Column(SmallInteger, default=0) config_default_show = Column(SmallInteger, default=constants.ADMIN_USER_SIDEBAR) + config_default_language = Column(String(3), default="all") + config_default_locale = Column(String(2), default="en") config_columns_to_ignore = Column(String) config_denied_tags = Column(String, default="") diff --git a/cps/kobo.py b/cps/kobo.py index 5ce2b640..ad0771a4 100644 --- a/cps/kobo.py +++ b/cps/kobo.py @@ -538,6 +538,7 @@ def HandleTagCreate(): return make_response(jsonify(str(shelf.uuid)), 201) +@csrf.exempt @kobo.route("/v1/library/tags/", methods=["DELETE", "PUT"]) @requires_kobo_auth def HandleTagUpdate(tag_id): @@ -765,7 +766,7 @@ def create_kobo_tag(shelf): ) return {"Tag": tag} - +@csrf.exempt @kobo.route("/v1/library//state", methods=["GET", "PUT"]) @requires_kobo_auth def HandleStateRequest(book_uuid): @@ -950,6 +951,7 @@ def TopLevelEndpoint(): return make_response(jsonify({})) +@csrf.exempt @kobo.route("/v1/library/", methods=["DELETE"]) @requires_kobo_auth def HandleBookDeletionRequest(book_uuid): @@ -976,6 +978,7 @@ def HandleBookDeletionRequest(book_uuid): # TODO: Implement the following routes +@csrf.exempt @kobo.route("/v1/library/", methods=["DELETE", "GET"]) def HandleUnimplementedRequest(dummy=None): log.debug("Unimplemented Library Request received: %s", request.base_url) diff --git a/cps/templates/book_edit.html b/cps/templates/book_edit.html index a47f400a..f3a1f5ac 100644 --- a/cps/templates/book_edit.html +++ b/cps/templates/book_edit.html @@ -49,6 +49,7 @@
    +
    diff --git a/cps/templates/config_view_edit.html b/cps/templates/config_view_edit.html index b2578312..ebfb5362 100644 --- a/cps/templates/config_view_edit.html +++ b/cps/templates/config_view_edit.html @@ -115,6 +115,23 @@
    +
    + + +
    +
    + + +
    diff --git a/cps/templates/layout.html b/cps/templates/layout.html index 7ec79f45..09b3f507 100644 --- a/cps/templates/layout.html +++ b/cps/templates/layout.html @@ -62,6 +62,7 @@ {% if g.allow_upload %}
  • +
    {{_('Upload')}} diff --git a/test/Calibre-Web TestSummary_Linux.html b/test/Calibre-Web TestSummary_Linux.html index f4ba8f0a..0bcf44a9 100644 --- a/test/Calibre-Web TestSummary_Linux.html +++ b/test/Calibre-Web TestSummary_Linux.html @@ -37,20 +37,20 @@
    -

    Start Time: 2021-09-23 19:58:16

    +

    Start Time: 2021-10-05 19:35:18

    -

    Stop Time: 2021-09-23 23:23:05

    +

    Stop Time: 2021-10-05 22:41:33

    -

    Duration: 2h 40 min

    +

    Duration: 2h 27 min

    @@ -404,13 +404,13 @@ TestEbookConvertCalibre - 13 - 13 + 14 + 14 0 0 0 - Detail + Detail @@ -454,7 +454,7 @@ -
    TestEbookConvertCalibre - test_convert_parameter
    +
    TestEbookConvertCalibre - test_convert_options
    PASS @@ -463,7 +463,7 @@ -
    TestEbookConvertCalibre - test_convert_wrong_excecutable
    +
    TestEbookConvertCalibre - test_convert_parameter
    PASS @@ -472,7 +472,7 @@ -
    TestEbookConvertCalibre - test_convert_xss
    +
    TestEbookConvertCalibre - test_convert_wrong_excecutable
    PASS @@ -481,7 +481,7 @@ -
    TestEbookConvertCalibre - test_email_failed
    +
    TestEbookConvertCalibre - test_convert_xss
    PASS @@ -490,7 +490,7 @@ -
    TestEbookConvertCalibre - test_email_only
    +
    TestEbookConvertCalibre - test_email_failed
    PASS @@ -499,7 +499,7 @@ -
    TestEbookConvertCalibre - test_kindle_send_not_configured
    +
    TestEbookConvertCalibre - test_email_only
    PASS @@ -508,7 +508,7 @@ -
    TestEbookConvertCalibre - test_ssl_smtp_setup_error
    +
    TestEbookConvertCalibre - test_kindle_send_not_configured
    PASS @@ -517,7 +517,7 @@ -
    TestEbookConvertCalibre - test_starttls_smtp_setup_error
    +
    TestEbookConvertCalibre - test_ssl_smtp_setup_error
    PASS @@ -525,6 +525,15 @@ + +
    TestEbookConvertCalibre - test_starttls_smtp_setup_error
    + + PASS + + + + +
    TestEbookConvertCalibre - test_user_convert_xss
    @@ -687,12 +696,12 @@ - + TestEditAdditionalBooks 15 - 14 - 0 - 0 + 8 + 2 + 4 1 Detail @@ -773,29 +782,101 @@ - +
    TestEditAdditionalBooks - test_upload_edit_role
    - PASS + +
    + ERROR +
    + + + + - +
    TestEditAdditionalBooks - test_upload_metadata_cbr
    - PASS + +
    + ERROR +
    + + + + - +
    TestEditAdditionalBooks - test_upload_metadata_cbt
    - PASS + +
    + ERROR +
    + + + + @@ -811,8 +892,8 @@