Skip to content

Commit

Permalink
Manage Series - fix for rows up/down
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwidude68 committed Feb 13, 2024
1 parent 1709e5f commit 80e007f
Show file tree
Hide file tree
Showing 8 changed files with 670 additions and 57 deletions.
7 changes: 7 additions & 0 deletions manage_series/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Manage Series Change Log

## [1.5.2] - 2024-02-14
### Added
- Finnish translation
- Tamil translation
### Fixed
- Move rows up/down could error in certain circumstances.

## [1.5.1] - 2023-04-02
### Added
- Russian translation (ashed)
Expand Down
2 changes: 1 addition & 1 deletion manage_series/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ActionManageSeries(InterfaceActionBase):
description = 'A GUI for manipulating selected books into a series'
supported_platforms = ['windows', 'osx', 'linux']
author = 'Grant Drake'
version = (1, 5, 1)
version = (1, 5, 2)
minimum_calibre_version = (2, 0, 0)

#: This field defines the GUI plugin class that contains all the code
Expand Down
20 changes: 10 additions & 10 deletions manage_series/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,15 +680,15 @@ def move_rows_up(self):
rows = self.series_table.selectionModel().selectedRows()
if len(rows) == 0:
return
first_sel_row = rows[0].row()
if first_sel_row <= 0:
return
# Workaround for strange selection bug in Qt which "alters" the selection
# in certain circumstances which meant move down only worked properly "once"
selrows = []
for row in rows:
selrows.append(row.row())
selrows.sort()
first_sel_row = selrows[0]
if first_sel_row <= 0:
return
# Workaround for strange selection bug in Qt which "alters" the selection
# in certain circumstances which meant move down only worked properly "once"
for selrow in selrows:
self.series_table.swap_row_widgets(selrow - 1, selrow + 1)
self.books[selrow-1], self.books[selrow] = self.books[selrow], self.books[selrow-1]
Expand All @@ -704,15 +704,15 @@ def move_rows_down(self):
rows = self.series_table.selectionModel().selectedRows()
if len(rows) == 0:
return
last_sel_row = rows[-1].row()
if last_sel_row == self.series_table.rowCount() - 1:
return
# Workaround for strange selection bug in Qt which "alters" the selection
# in certain circumstances which meant move down only worked properly "once"
selrows = []
for row in rows:
selrows.append(row.row())
selrows.sort()
last_sel_row = selrows[-1]
if last_sel_row == self.series_table.rowCount() - 1:
return
# Workaround for strange selection bug in Qt which "alters" the selection
# in certain circumstances which meant move down only worked properly "once"
for selrow in reversed(selrows):
self.series_table.swap_row_widgets(selrow + 2, selrow)
self.books[selrow+1], self.books[selrow] = self.books[selrow], self.books[selrow+1]
Expand Down
81 changes: 39 additions & 42 deletions manage_series/translations/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
# Translators:
# Adolfo Jayme-Barrientos, 2022
# Darío Hereñú, 2022
# Jellby <[email protected]>, 2022
# Walter Paterno <[email protected]>, 2022
# Grant Drake, 2022
# Jellby <[email protected]>, 2024
#
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2022-10-09 20:09+0100\n"
"PO-Revision-Date: 2022-09-19 15:02+0000\n"
"Last-Translator: Grant Drake, 2022\n"
"Language-Team: Spanish (https://www.transifex.com/calibre/teams/19337/es/)\n"
"Last-Translator: Jellby <[email protected]>, 2024\n"
"Language-Team: Spanish (https://app.transifex.com/calibre/teams/19337/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand All @@ -29,15 +29,15 @@ msgstr "Atajos de teclado"

#: ..\common\common_dialogs.py:112
msgid "Restart calibre now"
msgstr "Reiniciar Calibre ahora"
msgstr "Reiniciar calibre ahora"

#: ..\common\common_dialogs.py:128
msgid "Preferences for:"
msgstr "Preferencias para: "
msgstr "Preferencias para:"

#: ..\common\common_dialogs.py:160
msgid "Clear"
msgstr "Borrar"
msgstr "Limpiar"

#: ..\common\common_dialogs.py:162
msgid "Clear all settings for this plugin"
Expand All @@ -48,16 +48,16 @@ msgid ""
"Are you sure you want to change your settings in this library for this "
"plugin?"
msgstr ""
"¿Está seguro de que desea cambiar su configuración en esta biblioteca para "
"este complemento?"
"¿Está seguro de querer cambiar la configuración del complemento en esta "
"biblioteca?"

#: ..\common\common_dialogs.py:190 ..\common\common_dialogs.py:210
msgid ""
"Any settings in other libraries or stored in a JSON file in your calibre "
"plugins folder will not be touched."
msgstr ""
"Cualquier configuración en otras bibliotecas o almacenada en un archivo JSON"
" en su carpeta de complementos de calibre no se modificará."
"Las configuraciones en otras bibliotecas o almacenada en un archivo JSON en "
"la carpeta de complementos de calibre no se modificarán."

#: ..\common\common_dialogs.py:192 ..\common\common_dialogs.py:212
msgid "You must restart calibre afterwards."
Expand All @@ -69,8 +69,7 @@ msgstr "Configuración modificada"

#: ..\common\common_dialogs.py:201
msgid "Settings for this plugin in this library have been changed."
msgstr ""
"Se ha cambiado la configuración de este complemento en esta biblioteca."
msgstr "Se ha modificado la configuración del complemento en esta biblioteca."

#: ..\common\common_dialogs.py:202 ..\common\common_dialogs.py:223
msgid "Please restart calibre now."
Expand All @@ -81,18 +80,16 @@ msgid ""
"Are you sure you want to clear your settings in this library for this "
"plugin?"
msgstr ""
"¿Está seguro de que desea borrar su configuración en esta biblioteca para "
"este complemento?"
"¿Está seguro de querer borrar la configuración del complemento en esta "
"biblioteca?"

#: ..\common\common_dialogs.py:221
msgid "Settings deleted"
msgstr "Configuración eliminada"

#: ..\common\common_dialogs.py:222
msgid "All settings for this plugin in this library have been cleared."
msgstr ""
"Se han borrado todas las configuraciones para este complemento en esta "
"biblioteca."
msgstr "Se ha borrado la configuración del complemento en esta biblioteca."

#: ..\common\common_dialogs.py:297
msgid "Copy to clipboard"
Expand All @@ -110,7 +107,7 @@ msgstr "Reinicio requerido"
msgid ""
"Title image not found - you must restart Calibre before using this plugin!"
msgstr ""
"No se encontró la imagen del título - debe reiniciar Calibre antes de usar "
"No se encontró la imagen del título. ¡Debe reiniciar calibre antes de usar "
"este complemento!"

#: ..\common\common_widgets.py:222
Expand All @@ -119,7 +116,7 @@ msgstr "Crear nueva columna"

#: action.py:31
msgid "Manage Series"
msgstr "Administrar serie"
msgstr "Manage Series"

#: action.py:51
msgid "Cannot manage series"
Expand All @@ -131,71 +128,71 @@ msgstr "Ningún libro seleccionado"

#: config.py:43
msgid "Edit the keyboard shortcuts associated with this plugin"
msgstr "Edite los atajos de teclado asociados con este complemento"
msgstr "Modificar los atajos de teclado asociados con este complemento"

#: config.py:47 dialogs.py:476
msgid "&Help"
msgstr "&Ayuda"

#: dialogs.py:57 dialogs.py:60
msgid "Lock Series Index"
msgstr "Bloqueo Índice de series"
msgstr "Bloquear índice de serie"

#: dialogs.py:64
msgid "Series index for book:"
msgstr "Índice de serie para el libro:"

#: dialogs.py:79
msgid "&Assign this index value to all remaining books"
msgstr "&Asigne este valor de índice a todos los libros restantes"
msgstr "&Asignar este valor de índice a todos los libros restantes"

#: dialogs.py:101
msgid "You have conflicting or out of sequence series indexes"
msgstr "Tiene índices de series en conflicto o fuera de secuencia"
msgstr "Tiene índices de serie en conflicto o fuera de secuencia"

#: dialogs.py:104
msgid "Empty book added to series"
msgstr "Libro vacío agregado a la serie"
msgstr "Libro vacío añadido a la serie"

#: dialogs.py:107
msgid "The book data has been changed"
msgstr "Los datos del libro han sido cambiados"
msgstr "Los datos del libro se han modificado"

#: dialogs.py:110
msgid "The series data is unchanged"
msgstr "Los datos de la series no se modifican"
msgstr "Los datos de la serie no se modifican"

#: dialogs.py:131
msgid "Value assigned by user"
msgstr "Valor asignado por el usuario"

#: dialogs.py:178
msgid "Lock old series index"
msgstr "Bloquear índice de series antiguas"
msgstr "Bloquear índice de series antiguo"

#: dialogs.py:182
msgid "Lock series index"
msgstr "Bloquear Índice de series"
msgstr "Bloquear índice de serie"

#: dialogs.py:186 dialogs.py:437
msgid "Unlock series index"
msgstr "Desbloquear índice de series"
msgstr "Desbloquear índice de serie"

#: dialogs.py:190
msgid "Unlock all series index"
msgstr "Desbloquear el índice de todas las series"
msgstr "Desbloquear todos los índices de serie"

#: dialogs.py:197
msgid "Add empty books"
msgstr "Añadir libros vacíos"

#: dialogs.py:204
msgid "Original Series Index"
msgstr "Índice de series originales"
msgstr "Índice de serie original"

#: dialogs.py:204
msgid "Original Series Name"
msgstr "Nombre de la serie original"
msgstr "Nombre de serie original"

#: dialogs.py:204 dialogs.py:225
msgid "PubDate"
Expand All @@ -211,7 +208,7 @@ msgstr "Autor(es)"

#: dialogs.py:225
msgid "New Series"
msgstr "Series nuevas"
msgstr "Nueva serie"

#: dialogs.py:225
msgid "Series"
Expand All @@ -231,31 +228,31 @@ msgstr "Nueva"

#: dialogs.py:369
msgid "Create or Modify Series"
msgstr "Crear o modificar series"
msgstr "Crear o modificar serie"

#: dialogs.py:376
msgid "Series &Column:"
msgstr "&Columna Series:"
msgstr "&Columna de serie:"

#: dialogs.py:384
msgid "Series &Name:"
msgstr "&Nombre de Series:"
msgstr "&Nombre de serie:"

#: dialogs.py:397
msgid "&Start At:"
msgstr "&Empieza en:"

#: dialogs.py:418
msgid "Move book up in series (Alt+Up)"
msgstr "Mover libro hacia arriba en serie (Alt+Arriba)"
msgstr "Mover libro hacia arriba en la serie (Alt+Arriba)"

#: dialogs.py:420
msgid "Alt+Up"
msgstr "Alt+Arriba"

#: dialogs.py:424
msgid "Move book down in series (Alt+Down)"
msgstr "Mover libro hacia abajo en serie (Alt+Abajo)"
msgstr "Mover libro hacia abajo en la serie (Alt+Abajo)"

#: dialogs.py:426
msgid "Alt+Down"
Expand All @@ -267,7 +264,7 @@ msgstr "Bloquear al valor del índice"

#: dialogs.py:444
msgid "Add empty book to the series list"
msgstr "Agregar libro vacío a la lista de series"
msgstr "Añadir libro vacío a la lista de serie"

#: dialogs.py:446
msgid "Ctrl+Shift+E"
Expand Down Expand Up @@ -297,16 +294,16 @@ msgstr "Alt+Derecha"

#: dialogs.py:474
msgid "&Restore Original Series"
msgstr "&Restaurar Serie Original"
msgstr "&Restaurar serie original"

#: dialogs.py:633
msgid "Unknown"
msgstr "Desconocido"

#: dialogs.py:658
msgid "Are you sure?"
msgstr "Está usted seguro?"
msgstr "¿Está seguro?"

#: dialogs.py:659
msgid "Remove the selected book(s) from the series list?"
msgstr "¿Eliminar libro seleccionado(s) de la lista de series?"
msgstr "¿Eliminar los libros seleccionados de la lista de series?"
4 changes: 2 additions & 2 deletions manage_series/translations/ru.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Виктор, 2022
# Victor, 2022
# Caarmi, 2022
# ashed <[email protected]>, 2023
#
Expand All @@ -13,7 +13,7 @@ msgstr ""
"POT-Creation-Date: 2022-10-09 20:09+0100\n"
"PO-Revision-Date: 2022-09-19 15:02+0000\n"
"Last-Translator: ashed <[email protected]>, 2023\n"
"Language-Team: Russian (https://www.transifex.com/calibre/teams/19337/ru/)\n"
"Language-Team: Russian (https://app.transifex.com/calibre/teams/19337/ru/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down
Loading

0 comments on commit 80e007f

Please sign in to comment.