From 470fc1078fe00aedb42ef8a0c6b97d833a5bbc4f Mon Sep 17 00:00:00 2001
From: BasioMeusPuga
Date: Mon, 28 Jan 2019 02:28:43 +0530
Subject: [PATCH] Multiple fixes Update translations
---
Lector.pro | 9 +-
TODO | 9 +-
lector/dockwidgets.py | 13 +-
lector/readers/read_fb2.py | 2 +-
lector/resources/translations/Lector_de.ts | 437 ++++++++++++-------
lector/resources/translations/Lector_es.ts | 433 +++++++++++++------
lector/resources/translations/Lector_fr.ts | 433 +++++++++++++------
lector/resources/translations/Lector_zh.ts | 455 ++++++++++++++------
lector/resources/translations/SAMPLE.ts | 467 ++++++++++++++-------
lector/sorter.py | 6 +-
lector/toolbars.py | 3 +
lector/widgets.py | 13 +-
12 files changed, 1578 insertions(+), 702 deletions(-)
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 settings
Einstellungen anzeigen
@@ -13,7 +26,7 @@
Vollbild
-
+
Add bookmark
Lesezeichen hinzufügen
@@ -23,125 +36,150 @@
Lesezeichen
-
+
Reset profile
Profil zurücksetzen
-
+
Font size
Schriftgröße
-
+
Increase padding
-
+
Decrease padding
-
+
Increase line spacing
Zeilenabstand vergrößern
-
+
Decrease line spacing
Zeilenabstand verkleinern
-
+
Left align text
Text linksbündig ausrichten
-
+
Right align text
Text rechtsbündig ausrichten
-
+
Center align text
Text zentrieren
-
+
Justify text
Blocksatz
-
+
Background color
Hintergrund
Zoom in
- Vergrößern
+ Vergrößern
Zoom Out
- Verkleinern
+ Verkleinern
Fit Width
- An Fensterbreite anpassen
-
-
-
- Best Fit
-
+ An Fensterbreite anpassen
Original size
- Original Größe
+ Original Größe
Search...
- Suchen...
+ Suchen...
-
+
Table of Contents
Inhaltsverzeichnis
-
+
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
Keine Definition gefunden in
@@ -164,12 +202,12 @@
Aussprache des Root-Wortes abspielen
-
+
Settings
Einstellungen
-
+
Library
Bibliothek
@@ -179,17 +217,17 @@
Schalter
-
+
Startup: Refresh library
Start: Bibliothek neu laden
-
+
Remember open files
Offen Dateien merken
-
+
Generate tags from files
Tags aus Dateien generieren
@@ -199,27 +237,27 @@
Wörterbuch:
-
+
Cover shadows
Cover Schatten
-
+
Enabling reduces startup time and memory usage
Aktivierung verringert die benötigte Zeit zum Starten und die Speicher Nutzung
-
+
Load covers only when needed
Cover nur laden wenn benötigt
-
+
Greatly reduces page transition time at the cost of more memory
Drastische verkürzung der Seitenübergangszeit auf Kosten des Speichers
-
+
Cache comic / pdf pages
Comic / PDF Seiten zwischenspeichern
@@ -229,7 +267,7 @@
Neustarten um Änderungen zu übernehmen
-
+
Icon theme:
Symbol Thema:
@@ -244,12 +282,12 @@
He&ll
-
+
Scan Library
Bibliothek scannen
-
+
Close
Schließ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
-
+
Delete
Löschen
-
+
Edit
Bearbeiten
-
+
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
Autor
-
+
Year
Jahr
-
+
manually added
Manuell hinzugefügt
-
+
books
@@ -421,82 +479,82 @@ Reopen book to see changes
LibraryToolBar
-
+
Add book
Buch hinzufügen
-
+
Delete book
Buch löschen
-
+
Library background color
Hintergrund der Bibliothek
-
+
Settings
Einstellungen
-
+
View as covers
Als Cover anzeigen
-
+
View as table
Als Tabelle anzeigen
-
+
Filter library
Bibliothek filtern
-
+
Search for Title, Author, Tags...
Suche nach Titel, Autor, Tags...
-
+
Sort by
Sortieren nach
-
+
Scan Library
Bibliothek scannen
-
+
Title
Titel
-
+
Author
Autor
-
+
Year
Jahr
-
+
Newest
Neueste
-
+
Last Read
Zuletzt 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 database
Bücher zur Datenbank hinzufügen
-
+
eBooks
eBooks
-
+
Adding books...
Bücher werden hinzugefügt...
-
+
Confirm deletion
Löschen bestätigen
-
+
Save changes and start library scan
Änderungen speichern & Bibliotheksscan starten
-
+
Books
Bücher
-
+
Start reading
Lesen
-
+
Edit
Bearbeiten
-
+
Delete
Löschen
-
+
Mark read
Als gelesen kennzeichnen
-
+
Mark unread
Als ungelesen kennzeichnen
-
+
Manually Added
Manuell 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
-
+
Author
Autor
-
+
Year
Jahr
@@ -626,12 +684,12 @@ Reopen book to see changes
PliantQGraphicsScene
-
+
Select new cover
Neues Cover auswählen
-
+
Images
Bilder
@@ -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 mode
Ablenkungsfreien 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
+ Suchen
Toggle distraction free mode
Ablenkungsfreien Modus ein-/ausschalten
+
+
+ Exit fullscreen
+
+
+
+
+ Exit Distraction Free mode
+
+
+
+
+ Search for
+
+
+
+
+ In this book
+
+
+
+
+ Edit note
+
+
+
+
+ Delete annotation
+
+
+
+
+ Add Bookmark
+
+
+
+
+ Bookmarks
+ Lesezeichen
+
SettingsUI
-
+
English
Englisch
-
+
Spanish
Spanisch
-
+
Hindi
Hindi
-
+
Save changes and start library scan
Änderungen speichern & Bibliotheksscan starten
-
+
Library scan in progress...
Bibliotheksscan in Arbeit...
-
+
Checking library folders
Bibliotheksverzeichnisse werden überprüft
-
+
Parsing files
Dateien werden analysiert
-
+
Library
Bibliothek
-
+
Switches
Schalter
-
+
About
Über
-
+
Annotations
@@ -748,60 +881,80 @@ Reopen book to see changes
Tab
-
+
Bookmarks
Lesezeichen
-
+
New bookmark
Lesezeichen hinzufügen
-
+
Edit
Bearbeiten
-
+
Delete
Löschen
-
+
Annotations
-
+
Note
+
+
+ Search
+
+
+
+
+ Search entire book
+
+
+
+
+ Match case
+
+
+
+
+ Match word
+
+
TableProxyModel
-
+
Title
Titel
-
+
Author
Autor
-
+
Year
Jahr
-
+
Last Read
Zuletzt gelesen
-
+
Tags
Tags
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 settings
Opciones de visualización
@@ -13,7 +26,7 @@
Pantalla completa
-
+
Add bookmark
Añadir un marcador
@@ -23,125 +36,155 @@
Marcadores
-
+
Reset profile
Restablecer el perfil
-
+
Font size
Tamaño del texto
-
+
Increase padding
Aumentar el espaciado
-
+
Decrease padding
Reducir el espaciado
-
+
Increase line spacing
Aumentar el interlineado
-
+
Decrease line spacing
Reducir el interlineado
-
+
Left align text
Alinear el texto a la izquierda
-
+
Right align text
Alinear el texto a la derecha
-
+
Center align text
Centrar el texto
-
+
Justify text
Justificar el texto
-
+
Background color
Color del fondo
Zoom in
- Ampliar
+ Ampliar
Zoom Out
- Reducir
+ Reducir
Fit Width
- Ajustar a la anchura
+ Ajustar a la anchura
Best Fit
- Ajuste perfecto
+ Ajuste perfecto
Original size
- Tamaño original
+ Tamaño original
Search...
- Buscar…
+ Buscar…
-
+
Table of Contents
Sumario
-
+
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
No se encontró ninguna definición en
@@ -164,12 +207,12 @@
Reproducir la pronunciación de la palabra raíz
-
+
Settings
Configuración
-
+
Library
Biblioteca
@@ -179,17 +222,17 @@
Modificadores
-
+
Startup: Refresh library
Inicio: actualizar la biblioteca
-
+
Remember open files
Recordar los archivos abiertos
-
+
Generate tags from files
Generar etiquetas a partir de los archivos
@@ -199,27 +242,27 @@
Diccionario:
-
+
Cover shadows
Sombras en las cubiertas
-
+
Enabling reduces startup time and memory usage
Activar esta opción reduce el tiempo de inicio y el uso de memoria
-
+
Load covers only when needed
Cargar las cubiertas solo cuando se necesiten
-
+
Greatly reduces page transition time at the cost of more memory
Reduce en gran medida el tiempo de transición de las páginas a costa de más memoria
-
+
Cache comic / pdf pages
Almacenar 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 Library
Explorar la biblioteca
-
+
Close
Cerrar
@@ -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
-
+
Delete
Eliminar
-
+
Edit
Editar
-
+
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
Autor
-
+
Year
Año
-
+
manually added
añadido manualmente
-
+
books
@@ -421,82 +484,82 @@ Reopen book to see changes
LibraryToolBar
-
+
Add book
Añadir un libro
-
+
Delete book
Eliminar el libro
-
+
Library background color
Color de fondo de la biblioteca
-
+
Settings
Configuración
-
+
View as covers
Ver como cubiertas
-
+
View as table
Ver como tabla
-
+
Filter library
Filtrar la biblioteca
-
+
Search for Title, Author, Tags...
Buscar títulos, autores, etiquetas…
-
+
Sort by
Ordenar por
-
+
Scan Library
Explorar la biblioteca
-
+
Title
Título
-
+
Author
Autor
-
+
Year
Año
-
+
Newest
Má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 database
Añadir libros a la base de datos
-
+
eBooks
Libros electrónicos
-
+
Adding books...
Añadiendo los libros…
-
+
Confirm deletion
Confirmar la eliminación
-
+
Save changes and start library scan
Guardar cambios e iniciar exploración de biblioteca
-
+
Books
Libros
-
+
Start reading
Comenzar a leer
-
+
Edit
Editar
-
+
Delete
Eliminar
-
+
Mark read
Marcar como leído
-
+
Mark unread
Marcar como no leído
-
+
Manually Added
Añ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
-
+
Author
Autor
-
+
Year
Año
@@ -626,12 +689,12 @@ Reopen book to see changes
PliantQGraphicsScene
-
+
Select new cover
Seleccione una cubierta nueva
-
+
Images
Imá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 Contents
Sumario
+
+
+ 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 Contents
Sumario
+
+
+ Exit fullscreen
+
+
+
+
+ Exit Distraction Free mode
+
+
+
+
+ Search for
+
+
+
+
+ In this book
+
+
+
+
+ Edit note
+
+
+
+
+ Delete annotation
+
+
+
+
+ Add Bookmark
+
+
+
+
+ Bookmarks
+ Marcadores
+
SettingsUI
-
+
English
Inglés
-
+
Spanish
Español
-
+
Hindi
Hindi
-
+
Save changes and start library scan
Guardar cambios e iniciar exploración de biblioteca
-
+
Library scan in progress...
Se está explorando la biblioteca…
-
+
Checking library folders
Comprobando las carpetas de la biblioteca
-
+
Parsing files
Procesando los archivos
-
+
Library
Biblioteca
-
+
Switches
Modificadores
-
+
About
Acerca de
-
+
Annotations
@@ -763,60 +896,80 @@ Reopen book to see changes
Tab
-
+
Bookmarks
Marcadores
-
+
New bookmark
Marcador nuevo
-
+
Edit
Editar
-
+
Delete
Eliminar
-
+
Annotations
-
+
Note
+
+
+ Search
+
+
+
+
+ Search entire book
+
+
+
+
+ Match case
+
+
+
+
+ Match word
+
+
TableProxyModel
-
+
Title
Título
-
+
Author
Autor
-
+
Year
Año
-
+
Last Read
Última lectura
-
+
Tags
Etiquetas
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 settings
Options
@@ -13,7 +26,7 @@
Plein écran
-
+
Add bookmark
Ajouter un marque page
@@ -23,125 +36,155 @@
Marque-pages
-
+
Reset profile
Réinitialiser le profil
-
+
Font size
Taille de la police
-
+
Increase padding
Augmenter la marge
-
+
Decrease padding
Diminuer la marge
-
+
Increase line spacing
Augmenter l'espacement des lignes
-
+
Decrease line spacing
Diminuer l'espacement des lignes
-
+
Left align text
Aligner le texte à gauche
-
+
Right align text
Aligner le texte à droite
-
+
Center align text
Centrer le texte
-
+
Justify text
Justifier le texte
-
+
Background color
Couleur d'arrière-plan
Zoom in
- Zoom avant
+ Zoom avant
Zoom Out
- Zoom arrière
+ Zoom arrière
Fit Width
- Ajuster à la largeur
+ Ajuster à la largeur
Best Fit
- Meilleur ajustement
+ Meilleur ajustement
Original size
- Taille d'origine
+ Taille d'origine
Search...
- Rechercher…
+ Rechercher…
-
+
Table of Contents
Sommaire
-
+
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
Aucune définitions trouvées dans
@@ -164,12 +207,12 @@
Lire la prononciation de la racine
-
+
Settings
Options
-
+
Library
Bibliothèque
@@ -179,17 +222,17 @@
Options
-
+
Startup: Refresh library
Au démarrage: Rafraîchir la bibliothèque
-
+
Remember open files
Se souvenir des fichiers ouverts
-
+
Generate tags from files
Générer des étiquettes à partir des fichiers
@@ -199,27 +242,27 @@
Dictionnaire:
-
+
Cover shadows
Ombres des couverture
-
+
Enabling reduces startup time and memory usage
Si activé, réduit le temps de chargement et l'utilisation de la mémoire
-
+
Load covers only when needed
Charger les couvertures seulement quand nécessaire
-
+
Greatly reduces page transition time at the cost of more memory
Réduit grandement le temps de transition des pages contre plus d'utilisation de la mémoire
-
+
Cache comic / pdf pages
Mettre 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 Library
Analyser la bibliothèque
-
+
Close
Fermer
@@ -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
-
+
Delete
Supprimer
-
+
Edit
Modifier
-
+
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
Auteur
-
+
Year
Année
-
+
manually added
manuellement ajouté
-
+
books
@@ -421,82 +484,82 @@ Reopen book to see changes
LibraryToolBar
-
+
Add book
Ajouter un livre
-
+
Delete book
Supprimer un livre
-
+
Library background color
Couleur d'arrière-plan de la bibliothèque
-
+
Settings
Options
-
+
View as covers
Vue par couvertures
-
+
View as table
Vue par table
-
+
Filter library
Filtrer la bibliothèque
-
+
Search for Title, Author, Tags...
Rechercher par Titre, Auteur, Étiquettes…
-
+
Sort by
Trier par
-
+
Scan Library
Analyser la bibliothèque
-
+
Title
Titre
-
+
Author
Auteur
-
+
Year
Année
-
+
Newest
Nouveau
-
+
Last Read
Lu 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 database
Ajouter des livres à la base de données
-
+
eBooks
eBooks
-
+
Adding books...
Ajout des livres…
-
+
Confirm deletion
Confirmez la suppression
-
+
Save changes and start library scan
Enregistrer les modifications et démarrer l'analyse de la bibliothèque
-
+
Books
Livres
-
+
Start reading
Commencer à lire
-
+
Edit
Modifier
-
+
Delete
Supprimer
-
+
Mark read
Marquer comme lu
-
+
Mark unread
Marquer comme non-lu
-
+
Manually Added
Manuellement ajouté
-
+
Save page as...
- Enregistrerla page sous…
+ Enregistrerla page sous…
-
+
Images
- Images
+ Images
-
+
books
@@ -613,12 +676,12 @@ Reopen book to see changes
MetadataUI
-
+
Author
Auteur
-
+
Year
Année
@@ -626,12 +689,12 @@ Reopen book to see changes
PliantQGraphicsScene
-
+
Select new cover
Choisissez une nouvelle couverture
-
+
Images
Images
@@ -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 mode
Basculer 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
+ Rechercher
Toggle distraction free mode
Basculer 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
-
+
English
Anglais
-
+
Spanish
Espagnol
-
+
Hindi
Hindi
-
+
Save changes and start library scan
Enregistrer les modifications et démarrer l'analyse de la bibliothèque
-
+
Library scan in progress...
Analyse de la bibliothèque en cours…
-
+
Checking library folders
Vérification des dossiers de la bibliothèque
-
+
Parsing files
Lecture des fichiers
-
+
Library
Bibliothèque
-
+
Switches
Options
-
+
About
À propos
-
+
Annotations
@@ -753,60 +886,80 @@ Reopen book to see changes
Tab
-
+
Bookmarks
Marque-pages
-
+
New bookmark
Nouveau marque-page
-
+
Edit
Modifier
-
+
Delete
Supprimer
-
+
Annotations
-
+
Note
+
+
+ Search
+
+
+
+
+ Search entire book
+
+
+
+
+ Match case
+
+
+
+
+ Match word
+
+
TableProxyModel
-
+
Title
Titre
-
+
Author
Auteur
-
+
Year
Année
-
+
Last Read
Lu 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)