diff --git a/Lector.pro b/Lector.pro
index e378ddf..ba63585 100644
--- a/Lector.pro
+++ b/Lector.pro
@@ -15,13 +15,16 @@
# along with this program. If not, see .
SOURCES += lector/__main__.py \
+ lector/annotations.py \
+ lector/contentwidgets.py \
lector/definitionsdialog.py \
+ lector/dockwidgets.py \
+ lector/library.py \
lector/metadatadialog.py \
lector/models.py \
- lector/widgets.py \
- lector/library.py \
- lector/toolbars.py \
lector/settingsdialog.py \
+ lector/toolbars.py \
+ lector/widgets.py \
lector/resources/definitions.py \
lector/resources/settingswindow.py \
lector/resources/metadata.py \
diff --git a/TODO b/TODO
index 65f3e72..21173a6 100644
--- a/TODO
+++ b/TODO
@@ -3,7 +3,7 @@ TODO
✓ Internationalization
✓ Application icon
✓ .desktop file
- Flatpak and maybe AppImage support
+ Flatpak and AppImage support
Options:
✓ Automatic library management
✓ Recursive file addition
@@ -66,7 +66,7 @@ TODO
✓ Search document using QTextCursor
Double page / column view
✓ For comics
- Caching is currently non fuctional
+ Caching is currently non functional
Annotations
✓ Text
✓ Disable buttons for annotations, search in images
@@ -93,9 +93,7 @@ TODO
Clean up 'switch' page layout
Colors aren't loaded properly for annotation previews
Last line in QTextBrowser should never be cut off
- Something is wrong with image alignment
- Scrolling the toc Combobox does nothing
- fb2 images need a newline preceding them
+ Does image alignment need to be centered?
Secondary:
Graphical themes
@@ -115,6 +113,7 @@ TODO
? Create emblem per filetype
In application notifications
Notification in case the filter is filtering out all files with no option in place
+ Option to fit images to viewport
Need help with:
Double page view for books
diff --git a/lector/dockwidgets.py b/lector/dockwidgets.py
index 3ca885d..6f0c0e7 100644
--- a/lector/dockwidgets.py
+++ b/lector/dockwidgets.py
@@ -67,6 +67,8 @@ class PliantDockWidget(QtWidgets.QDockWidget):
event.ignore()
+# TODO
+# Maybe subclass PliantDockWidget for this
def populate_sideDock(tabWidget):
tabWidget.sideDock.setFeatures(QtWidgets.QDockWidget.DockWidgetClosable)
tabWidget.sideDock.setTitleBarWidget(QtWidgets.QWidget())
@@ -88,18 +90,17 @@ def populate_sideDock(tabWidget):
tabWidget.generate_bookmark_model()
# Annotation list view and model
- tabWidget.annotationListView = QtWidgets.QListView(tabWidget)
+ # Leave this without a parent or it shows up in the image viewer
+ tabWidget.annotationListView = QtWidgets.QListView()
tabWidget.annotationListView.setEditTriggers(QtWidgets.QListView.NoEditTriggers)
tabWidget.annotationListView.doubleClicked.connect(tabWidget.contentView.toggle_annotation_mode)
annotations_string = tabWidget._translate('Tab', 'Annotations')
- if not tabWidget.are_we_doing_images_only:
- tabWidget.sideDockTabWidget.addTab(tabWidget.annotationListView, annotations_string)
tabWidget.annotationModel = QtGui.QStandardItemModel(tabWidget)
tabWidget.generate_annotation_model()
# Search view and model
- tabWidget.searchLineEdit = QtWidgets.QLineEdit(tabWidget)
+ tabWidget.searchLineEdit = QtWidgets.QLineEdit()
tabWidget.searchLineEdit.setFocusPolicy(QtCore.Qt.StrongFocus)
tabWidget.searchLineEdit.setClearButtonEnabled(True)
search_string = tabWidget._translate('Tab', 'Search')
@@ -114,7 +115,7 @@ def populate_sideDock(tabWidget):
tabWidget.searchBookButton.setAutoRaise(True)
case_sensitive_string = tabWidget._translate('Tab', 'Match case')
- tabWidget.caseSensitiveSearchButton = QtWidgets.QToolButton(tabWidget)
+ tabWidget.caseSensitiveSearchButton = QtWidgets.QToolButton()
tabWidget.caseSensitiveSearchButton.setIcon(
tabWidget.main_window.QImageFactory.get_image('search-case'))
tabWidget.caseSensitiveSearchButton.setToolTip(case_sensitive_string)
@@ -136,6 +137,7 @@ def populate_sideDock(tabWidget):
tabWidget.searchOptionsLayout.addWidget(tabWidget.caseSensitiveSearchButton)
tabWidget.searchOptionsLayout.addWidget(tabWidget.matchWholeWordButton)
+ # Leave this without a parent or it shows up in the image viewer
tabWidget.searchResultsTreeView = QtWidgets.QTreeView()
tabWidget.searchResultsTreeView.setHeaderHidden(True)
tabWidget.searchResultsTreeView.setEditTriggers(QtWidgets.QTreeView.NoEditTriggers)
@@ -150,3 +152,4 @@ def populate_sideDock(tabWidget):
if not tabWidget.are_we_doing_images_only:
tabWidget.sideDockTabWidget.addTab(tabWidget.searchTabWidget, search_string)
+ tabWidget.sideDockTabWidget.addTab(tabWidget.annotationListView, annotations_string)
diff --git a/lector/readers/read_fb2.py b/lector/readers/read_fb2.py
index e6f272e..a75d052 100644
--- a/lector/readers/read_fb2.py
+++ b/lector/readers/read_fb2.py
@@ -108,7 +108,7 @@ class FB2:
image_name = i.get('id')
image_path = os.path.join(temp_dir, image_name)
image_string = f'
+
+ AnnotationsUI
+
+
+ Text markup
+
+
+
+
+ New annotation
+
+
+BookToolBar
-
+ View settingsEinstellungen anzeigen
@@ -13,7 +26,7 @@
Vollbild
-
+ Add bookmarkLesezeichen hinzufügen
@@ -23,125 +36,150 @@
Lesezeichen
-
+ Reset profileProfil zurücksetzen
-
+ Font sizeSchriftgröße
-
+ Increase padding
-
+ Decrease padding
-
+ Increase line spacingZeilenabstand vergrößern
-
+ Decrease line spacingZeilenabstand verkleinern
-
+ Left align textText linksbündig ausrichten
-
+ Right align textText rechtsbündig ausrichten
-
+ Center align textText zentrieren
-
+ Justify textBlocksatz
-
+ Background colorHintergrundZoom in
- Vergrößern
+ VergrößernZoom Out
- Verkleinern
+ VerkleinernFit Width
- An Fensterbreite anpassen
-
-
-
- Best Fit
-
+ An Fensterbreite anpassenOriginal size
- Original Größe
+ Original GrößeSearch...
- Suchen...
+ Suchen...
-
+ Table of ContentsInhaltsverzeichnis
-
+ Bookmarks (Ctrl + B)
-
- Fullscreen (F11)
+
+ Annotations (Ctrl + N)
-
- Annotations
+
+ Search (Ctrl + F)
-
- View as single page
+
+ Fullscreen (F)
- View as double page
+ Double page mode (D)
+
+
+
+
+ Manga mode (M)
+
+
+
+
+ Zoom in (+)
+
+
+
+
+ Zoom Out (-)
+
+
+
+
+ Fit Width (W)
+
+
+
+
+ Best Fit (B)
+
+
+
+
+ Original size (O)DefinitionsUI
-
+ No definitions found inKeine Definition gefunden in
@@ -164,12 +202,12 @@
Aussprache des Root-Wortes abspielen
-
+ SettingsEinstellungen
-
+ LibraryBibliothek
@@ -179,17 +217,17 @@
Schalter
-
+ Startup: Refresh libraryStart: Bibliothek neu laden
-
+ Remember open filesOffen Dateien merken
-
+ Generate tags from filesTags aus Dateien generieren
@@ -199,27 +237,27 @@
Wörterbuch:
-
+ Cover shadowsCover Schatten
-
+ Enabling reduces startup time and memory usageAktivierung verringert die benötigte Zeit zum Starten und die Speicher Nutzung
-
+ Load covers only when neededCover nur laden wenn benötigt
-
+ Greatly reduces page transition time at the cost of more memoryDrastische verkürzung der Seitenübergangszeit auf Kosten des Speichers
-
+ Cache comic / pdf pagesComic / PDF Seiten zwischenspeichern
@@ -229,7 +267,7 @@
Neustarten um Änderungen zu übernehmen
-
+ Icon theme: Symbol Thema:
@@ -244,12 +282,12 @@
He&ll
-
+ Scan LibraryBibliothek scannen
-
+ CloseSchließen
@@ -304,116 +342,136 @@
Abbrechen
-
+ Horizontal scrolling with Alt + Scroll
Reopen book to see changes
-
+ Hide scrollbars when reading
-
+ Restart application to see changes
-
+ &Dark
-
+ L&ight
-
+ Reading
-
+ Consider book read at percent
-
+ Dictionary language
-
+ Scroll speed
-
+ Text
-
+ New
-
+ DeleteLöschen
-
+ EditBearbeiten
-
+ Move Up
-
+ Move Down
-
+ Image
-
+ Shrink long book titles
-
+ Show TOC with Bookmarks
+
+
+ <html><head/><body><p>UP/DOWN ARROW - Steps to take before turning comicbook page</p></body></html>
+
+
+
+
+ Small increment
+
+
+
+
+ <html><head/><body><p>SPACEBAR - Steps to take before turning comicbook page</p></body></html>
+
+
+
+
+ Large increment
+
+ Library
-
+ AuthorAutor
-
+ YearJahr
-
+ manually addedManuell hinzugefügt
-
+ books
@@ -421,82 +479,82 @@ Reopen book to see changes
LibraryToolBar
-
+ Add bookBuch hinzufügen
-
+ Delete bookBuch löschen
-
+ Library background colorHintergrund der Bibliothek
-
+ SettingsEinstellungen
-
+ View as coversAls Cover anzeigen
-
+ View as tableAls Tabelle anzeigen
-
+ Filter libraryBibliothek filtern
-
+ Search for Title, Author, Tags...Suche nach Titel, Autor, Tags...
-
+ Sort bySortieren nach
-
+ Scan LibraryBibliothek scannen
-
+ TitleTitel
-
+ AuthorAutor
-
+ YearJahr
-
+ NewestNeueste
-
+ Last ReadZuletzt gelesen
-
+ Progress
@@ -517,7 +575,7 @@ Reopen book to see changes
Main_BookToolBarUI
-
+ Toggle distraction free mode (Ctrl + D)Ablenkungsfreien Modus ein-/ausschalten (Strg + D)
@@ -535,77 +593,77 @@ Reopen book to see changes
Biblothek scannen
-
+ Add books to databaseBücher zur Datenbank hinzufügen
-
+ eBookseBooks
-
+ Adding books...Bücher werden hinzugefügt...
-
+ Confirm deletionLöschen bestätigen
-
+ Save changes and start library scanÄnderungen speichern & Bibliotheksscan starten
-
+ BooksBücher
-
+ Start readingLesen
-
+ EditBearbeiten
-
+ DeleteLöschen
-
+ Mark readAls gelesen kennzeichnen
-
+ Mark unreadAls ungelesen kennzeichnen
-
+ Manually AddedManuell hinzugefügt
-
+ Save page as...
- Seite speichern als...
+ Seite speichern als...
-
+ Images
- Bilder
+ Bilder
-
+ books
@@ -613,12 +671,12 @@ Reopen book to see changes
MetadataUI
-
+ AuthorAutor
-
+ YearJahr
@@ -626,12 +684,12 @@ Reopen book to see changes
PliantQGraphicsScene
-
+ Select new coverNeues Cover auswählen
-
+ ImagesBilder
@@ -639,108 +697,183 @@ Reopen book to see changes
PliantQGraphicsView
-
+ Save page as...
- Seite speichern als...
+ Seite speichern als...
-
+ Zoom in (+)
- Vergrößern (+)
+ Vergrößern (+)
-
+ Zoom out (-)
- Verkleinern (-)
+ Verkleinern (-)
-
+ Fit width (W)
- An Fensterbreite anpassen
+ An Fensterbreite anpassen
-
+ Original size (O)
- Original Größe (O)
+ Original Größe (O)Toggle distraction free modeAblenkungsfreien Modus ein-/ausschalten
+
+
+ Exit fullscreen
+
+
+
+
+ Exit Distraction Free mode
+
+
+
+
+ View
+
+
+
+
+ Double page mode (D)
+
+
+
+
+ Manga mode (M)
+
+
+
+
+ Best fit (B)
+
+
+
+
+ Bookmarks
+ Lesezeichen
+ PliantQTextBrowser
-
+ Define
- Definieren
+ Definieren
-
+ Search
- Suchen
+ SuchenToggle distraction free modeAblenkungsfreien Modus ein-/ausschalten
+
+
+ Exit fullscreen
+
+
+
+
+ Exit Distraction Free mode
+
+
+
+
+ Search for
+
+
+
+
+ In this book
+
+
+
+
+ Edit note
+
+
+
+
+ Delete annotation
+
+
+
+
+ Add Bookmark
+
+
+
+
+ Bookmarks
+ Lesezeichen
+ SettingsUI
-
+ EnglishEnglisch
-
+ SpanishSpanisch
-
+ HindiHindi
-
+ Save changes and start library scanÄnderungen speichern & Bibliotheksscan starten
-
+ Library scan in progress...Bibliotheksscan in Arbeit...
-
+ Checking library foldersBibliotheksverzeichnisse werden überprüft
-
+ Parsing filesDateien werden analysiert
-
+ LibraryBibliothek
-
+ SwitchesSchalter
-
+ AboutÜber
-
+ Annotations
@@ -748,60 +881,80 @@ Reopen book to see changes
Tab
-
+ BookmarksLesezeichen
-
+ New bookmarkLesezeichen hinzufügen
-
+ EditBearbeiten
-
+ DeleteLöschen
-
+ Annotations
-
+ Note
+
+
+ Search
+
+
+
+
+ Search entire book
+
+
+
+
+ Match case
+
+
+
+
+ Match word
+
+ TableProxyModel
-
+ TitleTitel
-
+ AuthorAutor
-
+ YearJahr
-
+ Last ReadZuletzt gelesen
-
+ TagsTags
diff --git a/lector/resources/translations/Lector_es.ts b/lector/resources/translations/Lector_es.ts
index 8b1a675..040e7f4 100644
--- a/lector/resources/translations/Lector_es.ts
+++ b/lector/resources/translations/Lector_es.ts
@@ -1,9 +1,22 @@
+
+ AnnotationsUI
+
+
+ Text markup
+
+
+
+
+ New annotation
+
+
+BookToolBar
-
+ View settingsOpciones de visualización
@@ -13,7 +26,7 @@
Pantalla completa
-
+ Add bookmarkAñadir un marcador
@@ -23,125 +36,155 @@
Marcadores
-
+ Reset profileRestablecer el perfil
-
+ Font sizeTamaño del texto
-
+ Increase paddingAumentar el espaciado
-
+ Decrease paddingReducir el espaciado
-
+ Increase line spacingAumentar el interlineado
-
+ Decrease line spacingReducir el interlineado
-
+ Left align textAlinear el texto a la izquierda
-
+ Right align textAlinear el texto a la derecha
-
+ Center align textCentrar el texto
-
+ Justify textJustificar el texto
-
+ Background colorColor del fondoZoom in
- Ampliar
+ AmpliarZoom Out
- Reducir
+ ReducirFit Width
- Ajustar a la anchura
+ Ajustar a la anchuraBest Fit
- Ajuste perfecto
+ Ajuste perfectoOriginal size
- Tamaño original
+ Tamaño originalSearch...
- Buscar…
+ Buscar…
-
+ Table of ContentsSumario
-
+ Bookmarks (Ctrl + B)
-
- Fullscreen (F11)
+
+ Annotations (Ctrl + N)
-
- Annotations
+
+ Search (Ctrl + F)
-
- View as single page
+
+ Fullscreen (F)
- View as double page
+ Double page mode (D)
+
+
+
+
+ Manga mode (M)
+
+
+
+
+ Zoom in (+)
+
+
+
+
+ Zoom Out (-)
+
+
+
+
+ Fit Width (W)
+
+
+
+
+ Best Fit (B)
+
+
+
+
+ Original size (O)DefinitionsUI
-
+ No definitions found inNo se encontró ninguna definición en
@@ -164,12 +207,12 @@
Reproducir la pronunciación de la palabra raíz
-
+ SettingsConfiguración
-
+ LibraryBiblioteca
@@ -179,17 +222,17 @@
Modificadores
-
+ Startup: Refresh libraryInicio: actualizar la biblioteca
-
+ Remember open filesRecordar los archivos abiertos
-
+ Generate tags from filesGenerar etiquetas a partir de los archivos
@@ -199,27 +242,27 @@
Diccionario:
-
+ Cover shadowsSombras en las cubiertas
-
+ Enabling reduces startup time and memory usageActivar esta opción reduce el tiempo de inicio y el uso de memoria
-
+ Load covers only when neededCargar las cubiertas solo cuando se necesiten
-
+ Greatly reduces page transition time at the cost of more memoryReduce en gran medida el tiempo de transición de las páginas a costa de más memoria
-
+ Cache comic / pdf pagesAlmacenar en antememoria las páginas de cómics/PDF
@@ -229,7 +272,7 @@
Reinicie la aplicación para ver los cambios
-
+ Icon theme: Tema de iconos:
@@ -244,12 +287,12 @@
&Claro
-
+ Scan LibraryExplorar la biblioteca
-
+ CloseCerrar
@@ -304,116 +347,136 @@
Cancelar
-
+ Horizontal scrolling with Alt + Scroll
Reopen book to see changes
-
+ Hide scrollbars when reading
-
+ Restart application to see changes
-
+ &Dark
-
+ L&ight
-
+ Reading
-
+ Consider book read at percent
-
+ Dictionary language
-
+ Scroll speed
-
+ Text
-
+ New
-
+ DeleteEliminar
-
+ EditEditar
-
+ Move Up
-
+ Move Down
-
+ Image
-
+ Shrink long book titles
-
+ Show TOC with Bookmarks
+
+
+ <html><head/><body><p>UP/DOWN ARROW - Steps to take before turning comicbook page</p></body></html>
+
+
+
+
+ Small increment
+
+
+
+
+ <html><head/><body><p>SPACEBAR - Steps to take before turning comicbook page</p></body></html>
+
+
+
+
+ Large increment
+
+ Library
-
+ AuthorAutor
-
+ YearAño
-
+ manually addedañadido manualmente
-
+ books
@@ -421,82 +484,82 @@ Reopen book to see changes
LibraryToolBar
-
+ Add bookAñadir un libro
-
+ Delete bookEliminar el libro
-
+ Library background colorColor de fondo de la biblioteca
-
+ SettingsConfiguración
-
+ View as coversVer como cubiertas
-
+ View as tableVer como tabla
-
+ Filter libraryFiltrar la biblioteca
-
+ Search for Title, Author, Tags...Buscar títulos, autores, etiquetas…
-
+ Sort byOrdenar por
-
+ Scan LibraryExplorar la biblioteca
-
+ TitleTítulo
-
+ AuthorAutor
-
+ YearAño
-
+ NewestMás recientes
-
+ Last ReadÚltima lectura
-
+ Progress
@@ -517,7 +580,7 @@ Reopen book to see changes
Main_BookToolBarUI
-
+ Toggle distraction free mode (Ctrl + D)Alternar el modo de concentración (Ctrl + D)
@@ -535,77 +598,77 @@ Reopen book to see changes
Explorar la biblioteca
-
+ Add books to databaseAñadir libros a la base de datos
-
+ eBooksLibros electrónicos
-
+ Adding books...Añadiendo los libros…
-
+ Confirm deletionConfirmar la eliminación
-
+ Save changes and start library scanGuardar cambios e iniciar exploración de biblioteca
-
+ Books Libros
-
+ Start readingComenzar a leer
-
+ EditEditar
-
+ DeleteEliminar
-
+ Mark readMarcar como leído
-
+ Mark unreadMarcar como no leído
-
+ Manually AddedAñadido manualmente
-
+ Save page as...
- Guardar la página como…
+ Guardar la página como…
-
+ Images
- Imágenes
+ Imágenes
-
+ books
@@ -613,12 +676,12 @@ Reopen book to see changes
MetadataUI
-
+ AuthorAutor
-
+ YearAño
@@ -626,12 +689,12 @@ Reopen book to see changes
PliantQGraphicsScene
-
+ Select new coverSeleccione una cubierta nueva
-
+ ImagesImágenes
@@ -639,34 +702,34 @@ Reopen book to see changes
PliantQGraphicsView
-
+ Save page as...
- Guardar la página como…
+ Guardar la página como…
-
+ Zoom in (+)
- Ampliar (+)
+ Ampliar (+)
-
+ Zoom out (-)
- Reducir (-)
+ Reducir (-)
-
+ Fit width (W)
- Ajustar a la anchura (W)
+ Ajustar a la anchura (W)
-
+ Best fit (B)
- Ajuste perfecto (B)
+ Ajuste perfecto (B)
-
+ Original size (O)
- Tamaño original (O)
+ Tamaño original (O)
@@ -678,18 +741,48 @@ Reopen book to see changes
Table of ContentsSumario
+
+
+ Exit fullscreen
+
+
+
+
+ Exit Distraction Free mode
+
+
+
+
+ View
+
+
+
+
+ Double page mode (D)
+
+
+
+
+ Manga mode (M)
+
+
+
+
+ Bookmarks
+ Marcadores
+ PliantQTextBrowser
-
+ Define
- Definir
+ Definir
-
+ Search
- Buscar
+ Buscar
@@ -701,61 +794,101 @@ Reopen book to see changes
Table of ContentsSumario
+
+
+ Exit fullscreen
+
+
+
+
+ Exit Distraction Free mode
+
+
+
+
+ Search for
+
+
+
+
+ In this book
+
+
+
+
+ Edit note
+
+
+
+
+ Delete annotation
+
+
+
+
+ Add Bookmark
+
+
+
+
+ Bookmarks
+ Marcadores
+ SettingsUI
-
+ EnglishInglés
-
+ SpanishEspañol
-
+ HindiHindi
-
+ Save changes and start library scanGuardar cambios e iniciar exploración de biblioteca
-
+ Library scan in progress...Se está explorando la biblioteca…
-
+ Checking library foldersComprobando las carpetas de la biblioteca
-
+ Parsing filesProcesando los archivos
-
+ LibraryBiblioteca
-
+ SwitchesModificadores
-
+ AboutAcerca de
-
+ Annotations
@@ -763,60 +896,80 @@ Reopen book to see changes
Tab
-
+ BookmarksMarcadores
-
+ New bookmarkMarcador nuevo
-
+ EditEditar
-
+ DeleteEliminar
-
+ Annotations
-
+ Note
+
+
+ Search
+
+
+
+
+ Search entire book
+
+
+
+
+ Match case
+
+
+
+
+ Match word
+
+ TableProxyModel
-
+ TitleTítulo
-
+ AuthorAutor
-
+ YearAño
-
+ Last ReadÚltima lectura
-
+ TagsEtiquetas
diff --git a/lector/resources/translations/Lector_fr.ts b/lector/resources/translations/Lector_fr.ts
index 585f1ab..4a7642a 100644
--- a/lector/resources/translations/Lector_fr.ts
+++ b/lector/resources/translations/Lector_fr.ts
@@ -1,9 +1,22 @@
+
+ AnnotationsUI
+
+
+ Text markup
+
+
+
+
+ New annotation
+
+
+BookToolBar
-
+ View settingsOptions
@@ -13,7 +26,7 @@
Plein écran
-
+ Add bookmarkAjouter un marque page
@@ -23,125 +36,155 @@
Marque-pages
-
+ Reset profileRéinitialiser le profil
-
+ Font sizeTaille de la police
-
+ Increase paddingAugmenter la marge
-
+ Decrease paddingDiminuer la marge
-
+ Increase line spacingAugmenter l'espacement des lignes
-
+ Decrease line spacingDiminuer l'espacement des lignes
-
+ Left align textAligner le texte à gauche
-
+ Right align textAligner le texte à droite
-
+ Center align textCentrer le texte
-
+ Justify textJustifier le texte
-
+ Background colorCouleur d'arrière-planZoom in
- Zoom avant
+ Zoom avantZoom Out
- Zoom arrière
+ Zoom arrièreFit Width
- Ajuster à la largeur
+ Ajuster à la largeurBest Fit
- Meilleur ajustement
+ Meilleur ajustementOriginal size
- Taille d'origine
+ Taille d'origineSearch...
- Rechercher…
+ Rechercher…
-
+ Table of ContentsSommaire
-
+ Bookmarks (Ctrl + B)
-
- Fullscreen (F11)
+
+ Annotations (Ctrl + N)
-
- Annotations
+
+ Search (Ctrl + F)
-
- View as single page
+
+ Fullscreen (F)
- View as double page
+ Double page mode (D)
+
+
+
+
+ Manga mode (M)
+
+
+
+
+ Zoom in (+)
+
+
+
+
+ Zoom Out (-)
+
+
+
+
+ Fit Width (W)
+
+
+
+
+ Best Fit (B)
+
+
+
+
+ Original size (O)DefinitionsUI
-
+ No definitions found inAucune définitions trouvées dans
@@ -164,12 +207,12 @@
Lire la prononciation de la racine
-
+ SettingsOptions
-
+ LibraryBibliothèque
@@ -179,17 +222,17 @@
Options
-
+ Startup: Refresh libraryAu démarrage: Rafraîchir la bibliothèque
-
+ Remember open filesSe souvenir des fichiers ouverts
-
+ Generate tags from filesGénérer des étiquettes à partir des fichiers
@@ -199,27 +242,27 @@
Dictionnaire:
-
+ Cover shadowsOmbres des couverture
-
+ Enabling reduces startup time and memory usageSi activé, réduit le temps de chargement et l'utilisation de la mémoire
-
+ Load covers only when neededCharger les couvertures seulement quand nécessaire
-
+ Greatly reduces page transition time at the cost of more memoryRéduit grandement le temps de transition des pages contre plus d'utilisation de la mémoire
-
+ Cache comic / pdf pagesMettre en cache les pages de bande dessinée / pdf
@@ -229,7 +272,7 @@
Redémarrer pour voir les modifications
-
+ Icon theme: Thème d'icones:
@@ -244,12 +287,12 @@
C&lair
-
+ Scan LibraryAnalyser la bibliothèque
-
+ CloseFermer
@@ -304,116 +347,136 @@
Annuler
-
+ Horizontal scrolling with Alt + Scroll
Reopen book to see changes
-
+ Hide scrollbars when reading
-
+ Restart application to see changes
-
+ &Dark
-
+ L&ight
-
+ Reading
-
+ Consider book read at percent
-
+ Dictionary language
-
+ Scroll speed
-
+ Text
-
+ New
-
+ DeleteSupprimer
-
+ EditModifier
-
+ Move Up
-
+ Move Down
-
+ Image
-
+ Shrink long book titles
-
+ Show TOC with Bookmarks
+
+
+ <html><head/><body><p>UP/DOWN ARROW - Steps to take before turning comicbook page</p></body></html>
+
+
+
+
+ Small increment
+
+
+
+
+ <html><head/><body><p>SPACEBAR - Steps to take before turning comicbook page</p></body></html>
+
+
+
+
+ Large increment
+
+ Library
-
+ AuthorAuteur
-
+ YearAnnée
-
+ manually addedmanuellement ajouté
-
+ books
@@ -421,82 +484,82 @@ Reopen book to see changes
LibraryToolBar
-
+ Add bookAjouter un livre
-
+ Delete bookSupprimer un livre
-
+ Library background colorCouleur d'arrière-plan de la bibliothèque
-
+ SettingsOptions
-
+ View as coversVue par couvertures
-
+ View as tableVue par table
-
+ Filter libraryFiltrer la bibliothèque
-
+ Search for Title, Author, Tags...Rechercher par Titre, Auteur, Étiquettes…
-
+ Sort byTrier par
-
+ Scan LibraryAnalyser la bibliothèque
-
+ TitleTitre
-
+ AuthorAuteur
-
+ YearAnnée
-
+ NewestNouveau
-
+ Last ReadLu pour la dernière fois
-
+ Progress
@@ -517,7 +580,7 @@ Reopen book to see changes
Main_BookToolBarUI
-
+ Toggle distraction free mode (Ctrl + D)Basculer en mode sans distraction (Ctrl + D)
@@ -535,77 +598,77 @@ Reopen book to see changes
Analyser la bibliothèque
-
+ Add books to databaseAjouter des livres à la base de données
-
+ eBookseBooks
-
+ Adding books...Ajout des livres…
-
+ Confirm deletionConfirmez la suppression
-
+ Save changes and start library scanEnregistrer les modifications et démarrer l'analyse de la bibliothèque
-
+ Books Livres
-
+ Start readingCommencer à lire
-
+ EditModifier
-
+ DeleteSupprimer
-
+ Mark readMarquer comme lu
-
+ Mark unreadMarquer comme non-lu
-
+ Manually AddedManuellement ajouté
-
+ Save page as...
- Enregistrerla page sous…
+ Enregistrerla page sous…
-
+ Images
- Images
+ Images
-
+ books
@@ -613,12 +676,12 @@ Reopen book to see changes
MetadataUI
-
+ AuthorAuteur
-
+ YearAnnée
@@ -626,12 +689,12 @@ Reopen book to see changes
PliantQGraphicsScene
-
+ Select new coverChoisissez une nouvelle couverture
-
+ ImagesImages
@@ -639,113 +702,183 @@ Reopen book to see changes
PliantQGraphicsView
-
+ Save page as...
- Enregistrerla page sous…
+ Enregistrerla page sous…
-
+ Zoom in (+)
- Zoom avant (+)
+ Zoom avant (+)
-
+ Zoom out (-)
- Zoom arrière (-)
+ Zoom arrière (-)
-
+ Fit width (W)
- Ajuster à la largeur (W)
+ Ajuster à la largeur (W)
-
+ Best fit (B)
- Meilleur ajustement (B)
+ Meilleur ajustement (B)
-
+ Original size (O)
- Taille d'origine (O)
+ Taille d'origine (O)Toggle distraction free modeBasculer en mode sans distraction
+
+
+ Exit fullscreen
+
+
+
+
+ Exit Distraction Free mode
+
+
+
+
+ View
+
+
+
+
+ Double page mode (D)
+
+
+
+
+ Manga mode (M)
+
+
+
+
+ Bookmarks
+ Marque-pages
+ PliantQTextBrowser
-
+ Define
- Définir
+ Définir
-
+ Search
- Rechercher
+ RechercherToggle distraction free modeBasculer en mode sans distraction
+
+
+ Exit fullscreen
+
+
+
+
+ Exit Distraction Free mode
+
+
+
+
+ Search for
+
+
+
+
+ In this book
+
+
+
+
+ Edit note
+
+
+
+
+ Delete annotation
+
+
+
+
+ Add Bookmark
+
+
+
+
+ Bookmarks
+ Marque-pages
+ SettingsUI
-
+ EnglishAnglais
-
+ SpanishEspagnol
-
+ HindiHindi
-
+ Save changes and start library scanEnregistrer les modifications et démarrer l'analyse de la bibliothèque
-
+ Library scan in progress...Analyse de la bibliothèque en cours…
-
+ Checking library foldersVérification des dossiers de la bibliothèque
-
+ Parsing filesLecture des fichiers
-
+ LibraryBibliothèque
-
+ SwitchesOptions
-
+ AboutÀ propos
-
+ Annotations
@@ -753,60 +886,80 @@ Reopen book to see changes
Tab
-
+ BookmarksMarque-pages
-
+ New bookmarkNouveau marque-page
-
+ EditModifier
-
+ DeleteSupprimer
-
+ Annotations
-
+ Note
+
+
+ Search
+
+
+
+
+ Search entire book
+
+
+
+
+ Match case
+
+
+
+
+ Match word
+
+ TableProxyModel
-
+ TitleTitre
-
+ AuthorAuteur
-
+ YearAnnée
-
+ Last ReadLu pour la dernière fois
-
+ TagsÉtiquettes
diff --git a/lector/resources/translations/Lector_zh.ts b/lector/resources/translations/Lector_zh.ts
index 6b58c51..7bfdf91 100644
--- a/lector/resources/translations/Lector_zh.ts
+++ b/lector/resources/translations/Lector_zh.ts
@@ -1,137 +1,190 @@
+
+ AnnotationsUI
+
+
+ Text markup
+
+
+
+
+ New annotation
+
+
+BookToolBar
-
+ View settings查看设置
-
+ Add bookmark加入书签
-
+ Reset profile重置配置文件
-
+ Font size字号
-
+ Increase padding增加内边距
-
+ Decrease padding减少内边距
-
+ Increase line spacing增加行间距
-
+ Decrease line spacing减少行间距
-
+ Left align text左对齐文本
-
+ Right align text右对齐文本
-
+ Center align text居中对齐文本
-
+ Justify text对齐文本
-
+ Background color背景色Zoom in
- 放大
+ 放大Zoom Out
- 缩小
+ 缩小Fit Width
- 适合宽度
+ 适合宽度Best Fit
- 最佳适应
+ 最佳适应Original size
- 原始大小
+ 原始大小Search...
- 搜索...
+ 搜索...
-
+ Table of Contents目录
-
+ Bookmarks (Ctrl + B)书签 (Ctrl + B)Fullscreen (F11)
- 全屏 (F11)
+ 全屏 (F11)Annotations
- 注释
+ 注释
-
- View as single page
+
+ Annotations (Ctrl + N)
+
+
+
+
+ Search (Ctrl + F)
+
+
+
+
+ Fullscreen (F)
- View as double page
+ Double page mode (D)
+
+
+
+
+ Manga mode (M)
+
+
+
+
+ Zoom in (+)
+
+
+
+
+ Zoom Out (-)
+
+
+
+
+ Fit Width (W)
+
+
+
+
+ Best Fit (B)
+
+
+
+
+ Original size (O)DefinitionsUI
-
+ No definitions found in没有找到定义
@@ -154,67 +207,67 @@
播放词根的发音
-
+ Settings设置
-
+ Library书库
-
+ Startup: Refresh library启动:刷新书库
-
+ Remember open files记住打开文件
-
+ Generate tags from files从文件生成标签
-
+ Cover shadows封面阴影
-
+ Enabling reduces startup time and memory usage开启减少启动时间和内存占用
-
+ Load covers only when needed只在必要时加载封面
-
+ Greatly reduces page transition time at the cost of more memory当需要更多内存时显著减少页面过度时间
-
+ Cache comic / pdf pages缓存漫画 / pdf 文件
-
+ Icon theme: 图标主题:
-
+ Scan Library扫描书库
-
+ Close关闭
@@ -264,49 +317,49 @@
取消
-
+ Horizontal scrolling with Alt + Scroll
Reopen book to see changes按 Alt + Scroll 横向滚动
再次打开书籍时生效
-
+ Hide scrollbars when reading阅读时隐藏滚动条
-
+ Restart application to see changes重启程序生效
-
+ &Dark&暗
-
+ L&ight亮
-
+ Reading阅读
-
+ Consider book read at percent标记为读完,当读至百分
-
+ Dictionary language字典语言
-
+ Scroll speed滚动速度
@@ -356,7 +409,7 @@ Reopen book to see changes
下划线
-
+ Text文本
@@ -366,65 +419,85 @@ Reopen book to see changes
漫画 / PDF
-
+ Shrink long book titles
-
+ New
-
+ Delete删除
-
+ Edit编辑
-
+ Move Up
-
+ Move Down
-
+ Image
-
+ Show TOC with Bookmarks
+
+
+ <html><head/><body><p>UP/DOWN ARROW - Steps to take before turning comicbook page</p></body></html>
+
+
+
+
+ Small increment
+
+
+
+
+ <html><head/><body><p>SPACEBAR - Steps to take before turning comicbook page</p></body></html>
+
+
+
+
+ Large increment
+
+ Library
-
+ Author作者
-
+ Year年份
-
+ manually added手动添加的
-
+ books 书籍
@@ -432,82 +505,82 @@ Reopen book to see changes
LibraryToolBar
-
+ Add book添加书籍
-
+ Delete book删除书籍
-
+ Library background color书库背景色
-
+ Settings设置
-
+ View as covers封面查看
-
+ View as table列表查看
-
+ Filter library过滤书库
-
+ Search for Title, Author, Tags...查找标题,作者,标签...
-
+ Sort by排序按照
-
+ Scan Library扫描书库
-
+ Title标题
-
+ Author作者
-
+ Year年份
-
+ Newest最新
-
+ Last Read最近阅读
-
+ Progress进度
@@ -528,7 +601,7 @@ Reopen book to see changes
Main_BookToolBarUI
-
+ Toggle distraction free mode (Ctrl + D)切换勿扰模式 (Ctrl + D)
@@ -536,80 +609,90 @@ Reopen book to see changes
Main_UI
-
+ Add books to database将书籍加入数据库
-
+ eBooks电子书
-
+ Adding books...正在添加书籍...
-
+ Confirm deletion确认删除
-
+ Save changes and start library scan保存修改开始扫描书库
-
+ Books 书籍
-
+ Start reading开始阅读
-
+ Edit编辑
-
+ Delete删除
-
+ Mark read标记为已读
-
+ Mark unread标记为未读
-
+ Manually Added手动添加的
-
+ books 书籍
+
+
+ Save page as...
+
+
+
+
+ Images
+ 图片
+ MetadataUI
-
+ Author作者
-
+ Year年份
@@ -617,70 +700,186 @@ Reopen book to see changes
PliantQGraphicsScene
-
+ Select new cover选择新封面
-
+ Images图片
+
+ PliantQGraphicsView
+
+
+ Exit fullscreen
+
+
+
+
+ Exit Distraction Free mode
+
+
+
+
+ Save page as...
+
+
+
+
+ View
+
+
+
+
+ Double page mode (D)
+
+
+
+
+ Manga mode (M)
+
+
+
+
+ Zoom in (+)
+
+
+
+
+ Zoom out (-)
+
+
+
+
+ Fit width (W)
+
+
+
+
+ Best fit (B)
+
+
+
+
+ Original size (O)
+
+
+
+
+ Bookmarks
+ 书签
+
+
+
+ PliantQTextBrowser
+
+
+ Exit fullscreen
+
+
+
+
+ Exit Distraction Free mode
+
+
+
+
+ Define
+
+
+
+
+ Search for
+
+
+
+
+ In this book
+
+
+
+
+ Search
+
+
+
+
+ Edit note
+
+
+
+
+ Delete annotation
+
+
+
+
+ Add Bookmark
+
+
+
+
+ Bookmarks
+ 书签
+
+SettingsUI
-
+ English英语
-
+ Spanish西班牙语
-
+ Hindi印地语
-
+ Save changes and start library scan保存修改开始扫描书库
-
+ Library scan in progress...正在扫描书库
-
+ Checking library folders正在检查书库文件夹
-
+ Parsing files正在解析文件
-
+ Library书库
-
+ Switches
-
+ About关于
-
+ Annotations注释
@@ -688,60 +887,80 @@ Reopen book to see changes
Tab
-
+ Bookmarks书签
-
+ New bookmark新书签
-
+ Edit编辑
-
+ Delete删除
-
+ Annotations注释
-
+ Note
+
+
+ Search
+
+
+
+
+ Search entire book
+
+
+
+
+ Match case
+
+
+
+
+ Match word
+
+ TableProxyModel
-
+ Title标题
-
+ Author作者
-
+ Year年份
-
+ Last Read最后阅读
-
+ Tags标签
diff --git a/lector/resources/translations/SAMPLE.ts b/lector/resources/translations/SAMPLE.ts
index 0e7c797..5b09b83 100644
--- a/lector/resources/translations/SAMPLE.ts
+++ b/lector/resources/translations/SAMPLE.ts
@@ -1,137 +1,150 @@
+
+ AnnotationsUI
+
+
+ Text markup
+
+
+
+
+ New annotation
+
+
+BookToolBar
-
+ View settings
-
+ Add bookmark
-
+ Reset profile
-
+ Font size
-
+ Increase padding
-
+ Decrease padding
-
+ Increase line spacing
-
+ Decrease line spacing
-
+ Left align text
-
+ Right align text
-
+ Center align text
-
+ Justify text
-
+ Background color
-
- Zoom in
-
-
-
-
- Zoom Out
-
-
-
-
- Fit Width
-
-
-
-
- Best Fit
-
-
-
-
- Original size
-
-
-
-
- Search...
-
-
-
-
+ Table of Contents
-
+ Bookmarks (Ctrl + B)
-
- Fullscreen (F11)
+
+ Annotations (Ctrl + N)
-
- Annotations
+
+ Search (Ctrl + F)
-
- View as single page
+
+ Fullscreen (F)
- View as double page
+ Double page mode (D)
+
+
+
+
+ Manga mode (M)
+
+
+
+
+ Zoom in (+)
+
+
+
+
+ Zoom Out (-)
+
+
+
+
+ Fit Width (W)
+
+
+
+
+ Best Fit (B)
+
+
+
+
+ Original size (O)DefinitionsUI
-
+ No definitions found in
@@ -154,67 +167,67 @@
-
+ Settings
-
+ Library
-
+ Startup: Refresh library
-
+ Remember open files
-
+ Generate tags from files
-
+ Cover shadows
-
+ Enabling reduces startup time and memory usage
-
+ Load covers only when needed
-
+ Greatly reduces page transition time at the cost of more memory
-
+ Cache comic / pdf pages
-
+ Icon theme:
-
+ Scan Library
-
+ Close
@@ -264,116 +277,136 @@
-
+ Horizontal scrolling with Alt + Scroll
Reopen book to see changes
-
+ Hide scrollbars when reading
-
+ Restart application to see changes
-
+ &Dark
-
+ L&ight
-
+ Reading
-
+ Consider book read at percent
-
+ Dictionary language
-
+ Scroll speed
-
+ Text
-
+ New
-
+ Delete
-
+ Edit
-
+ Move Up
-
+ Move Down
-
+ Image
-
+ Shrink long book titles
-
+ Show TOC with Bookmarks
+
+
+ <html><head/><body><p>UP/DOWN ARROW - Steps to take before turning comicbook page</p></body></html>
+
+
+
+
+ Small increment
+
+
+
+
+ <html><head/><body><p>SPACEBAR - Steps to take before turning comicbook page</p></body></html>
+
+
+
+
+ Large increment
+
+ Library
-
+ Author
-
+ Year
-
+ manually added
-
+ books
@@ -381,82 +414,82 @@ Reopen book to see changes
LibraryToolBar
-
+ Add book
-
+ Delete book
-
+ Library background color
-
+ Settings
-
+ View as covers
-
+ View as table
-
+ Filter library
-
+ Search for Title, Author, Tags...
-
+ Sort by
-
+ Scan Library
-
+ Title
-
+ Author
-
+ Year
-
+ Newest
-
+ Last Read
-
+ Progress
@@ -477,7 +510,7 @@ Reopen book to see changes
Main_BookToolBarUI
-
+ Toggle distraction free mode (Ctrl + D)
@@ -485,80 +518,90 @@ Reopen book to see changes
Main_UI
-
+ Add books to database
-
+ eBooks
-
+ Adding books...
-
+ Confirm deletion
-
+ Save changes and start library scan
-
+ Books
-
+ Start reading
-
+ Edit
-
+ Delete
-
+ Mark read
-
+ Mark unread
-
+ Manually Added
-
+ books
+
+
+ Save page as...
+
+
+
+
+ Images
+
+ MetadataUI
-
+ Author
-
+ Year
@@ -566,70 +609,186 @@ Reopen book to see changes
PliantQGraphicsScene
-
+ Select new cover
-
+ Images
+
+ PliantQGraphicsView
+
+
+ Exit fullscreen
+
+
+
+
+ Exit Distraction Free mode
+
+
+
+
+ Save page as...
+
+
+
+
+ View
+
+
+
+
+ Double page mode (D)
+
+
+
+
+ Manga mode (M)
+
+
+
+
+ Zoom in (+)
+
+
+
+
+ Zoom out (-)
+
+
+
+
+ Fit width (W)
+
+
+
+
+ Best fit (B)
+
+
+
+
+ Original size (O)
+
+
+
+
+ Bookmarks
+
+
+
+
+ PliantQTextBrowser
+
+
+ Exit fullscreen
+
+
+
+
+ Exit Distraction Free mode
+
+
+
+
+ Define
+
+
+
+
+ Search for
+
+
+
+
+ In this book
+
+
+
+
+ Search
+
+
+
+
+ Edit note
+
+
+
+
+ Delete annotation
+
+
+
+
+ Add Bookmark
+
+
+
+
+ Bookmarks
+
+
+SettingsUI
-
+ English
-
+ Spanish
-
+ Hindi
-
+ Save changes and start library scan
-
+ Library scan in progress...
-
+ Checking library folders
-
+ Parsing files
-
+ Library
-
+ Switches
-
+ About
-
+ Annotations
@@ -637,60 +796,80 @@ Reopen book to see changes
Tab
-
+ Bookmarks
-
+ New bookmark
-
+ Edit
-
+ Delete
-
+ Annotations
-
+ Note
+
+
+ Search
+
+
+
+
+ Search entire book
+
+
+
+
+ Match case
+
+
+
+
+ Match word
+
+ TableProxyModel
-
+ Title
-
+ Author
-
+ Year
-
+ Last Read
-
+ Tags
diff --git a/lector/sorter.py b/lector/sorter.py
index cce970c..e17e0ac 100644
--- a/lector/sorter.py
+++ b/lector/sorter.py
@@ -44,8 +44,10 @@ import importlib
# The multiprocessing module does not work correctly on Windows
if sys.platform.startswith('win'):
from multiprocessing.dummy import Pool, Manager
+ thread_count = 4 # This is all on one CPU thread anyway
else:
- from multiprocessing import Pool, Manager
+ from multiprocessing import Pool, Manager, cpu_count
+ thread_count = cpu_count()
from PyQt5 import QtCore, QtGui
from lector import database
@@ -303,7 +305,7 @@ class BookSorter:
return None
def pool_creator():
- _pool = Pool(5)
+ _pool = Pool(thread_count)
self.processed_books = _pool.map(
self.read_book, self.file_list)
diff --git a/lector/toolbars.py b/lector/toolbars.py
index b70d088..5aa59a2 100644
--- a/lector/toolbars.py
+++ b/lector/toolbars.py
@@ -484,6 +484,9 @@ class FixedComboBox(QtWidgets.QComboBox):
# This and the one below should adjust to screen size
return QtCore.QSize(self.adjusted_size, 22)
+ def wheelEvent(self, QWheelEvent):
+ # Disable mouse wheel scrolling in the ComboBox
+ return
class FixedLineEdit(QtWidgets.QLineEdit):
def __init__(self, parent=None):
diff --git a/lector/widgets.py b/lector/widgets.py
index a75d30f..795f3ec 100644
--- a/lector/widgets.py
+++ b/lector/widgets.py
@@ -635,6 +635,16 @@ class Tab(QtWidgets.QWidget):
self.bookmarkTreeView.setCurrentIndex(edit_index)
self.bookmarkTreeView.edit(edit_index)
+ def get_chapter_name(chapter_number):
+ try:
+ chapter_name = [i[1] for i in self.metadata['toc'] if i[2] == chapter_number][0]
+ except IndexError:
+ for i in reversed(self.metadata['toc']):
+ if i[2] < chapter_number:
+ chapter_name = i[1]
+ break
+ return chapter_name
+
bookmark = QtGui.QStandardItem()
bookmark.setData(False, QtCore.Qt.UserRole + 10) # Is Parent
@@ -657,8 +667,7 @@ class Tab(QtWidgets.QWidget):
bookmarkParent = QtGui.QStandardItem()
bookmarkParent.setData(True, QtCore.Qt.UserRole + 10) # Is Parent
bookmarkParent.setFlags(bookmarkParent.flags() & ~QtCore.Qt.ItemIsEditable) # Is Editable
- chapter_name = [i[1] for i in self.metadata['toc'] if i[2] == chapter_number][0]
- bookmarkParent.setData(chapter_name, QtCore.Qt.DisplayRole)
+ bookmarkParent.setData(get_chapter_name(chapter_number), QtCore.Qt.DisplayRole)
bookmarkParent.setData(chapter_number, QtCore.Qt.UserRole)
bookmarkParent.appendRow(bookmark)