Skip to content

Commit

Permalink
Improve shortcuts in Cards tab
Browse files Browse the repository at this point in the history
  • Loading branch information
ping committed Aug 1, 2023
1 parent d9880e1 commit 3031f7f
Show file tree
Hide file tree
Showing 6 changed files with 151 additions and 110 deletions.
6 changes: 6 additions & 0 deletions calibre-plugin/dialog/cards.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def __init__(self, card, library, tab, *args, **kwargs):
library_lbl.customContextMenuRequested.connect(
self.library_lbl_context_menu_requested
)
library_lbl.setToolTip(_("Right-click for shortcuts"))
layout.addWidget(library_lbl, widget_row_pos, 0, 1, 2)
widget_row_pos += 1

Expand Down Expand Up @@ -160,6 +161,7 @@ def __init__(self, card, library, tab, *args, **kwargs):
loans_progressbar.customContextMenuRequested.connect(
self.loans_progressbar_context_menu_requested
)
loans_progressbar.setToolTip(_("Right-click for shortcuts"))
layout.addWidget(loans_progressbar, widget_row_pos, 0, 1, 2)
widget_row_pos += 1

Expand All @@ -181,10 +183,12 @@ def __init__(self, card, library, tab, *args, **kwargs):
holds_progressbar.customContextMenuRequested.connect(
self.holds_progressbar_context_menu_requested
)
holds_progressbar.setToolTip(_("Right-click for shortcuts"))
layout.addWidget(holds_progressbar, widget_row_pos, 0, 1, 2)

def library_lbl_context_menu_requested(self):
menu = QMenu(self)
menu.addSection(_("Library"))
view_in_libby_action = menu.addAction(_("View in Libby"))
view_in_libby_action.setIcon(self.icons[PluginIcons.ExternalLink])
view_in_libby_action.triggered.connect(self.open_libby_library)
Expand All @@ -195,6 +199,7 @@ def library_lbl_context_menu_requested(self):

def loans_progressbar_context_menu_requested(self):
menu = QMenu(self)
menu.addSection(_("Loans"))
view_in_libby_action = menu.addAction(_("View in Libby"))
view_in_libby_action.setIcon(self.icons[PluginIcons.ExternalLink])
view_in_libby_action.triggered.connect(self.open_libby_loans)
Expand All @@ -205,6 +210,7 @@ def loans_progressbar_context_menu_requested(self):

def holds_progressbar_context_menu_requested(self):
menu = QMenu(self)
menu.addSection(_("Holds"))
view_in_libby_action = menu.addAction(_("View in Libby"))
view_in_libby_action.setIcon(self.icons[PluginIcons.ExternalLink])
view_in_libby_action.triggered.connect(self.open_libby_holds)
Expand Down
51 changes: 29 additions & 22 deletions calibre-plugin/translations/default.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: libby-calibre-plugin 0.1.6\n"
"Report-Msgid-Bugs-To: https://github.com/ping/libby-calibre-plugin/\n"
"POT-Creation-Date: 2023-08-01 19:35+0800\n"
"POT-Creation-Date: 2023-08-01 22:38+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -127,11 +127,11 @@ msgstr ""
msgid "Returning"
msgstr ""

#: calibre-plugin/magazine_download.py:429
#: calibre-plugin/magazine_download.py:424
msgid "Getting loan details"
msgstr ""

#: calibre-plugin/magazine_download.py:469
#: calibre-plugin/magazine_download.py:464
msgid "Getting book details"
msgstr ""

Expand Down Expand Up @@ -192,6 +192,7 @@ msgid "Expire Date"
msgstr ""

#: calibre-plugin/models.py:170 calibre-plugin/models.py:330
#: calibre-plugin/dialog/cards.py:191
msgid "Library"
msgstr ""

Expand Down Expand Up @@ -294,44 +295,50 @@ msgstr ""
msgid "Check your connection or retry in a few minutes."
msgstr ""

#: calibre-plugin/dialog/cards.py:92
#: calibre-plugin/dialog/cards.py:87 calibre-plugin/dialog/cards.py:164
#: calibre-plugin/dialog/cards.py:186
msgid "Right-click for shortcuts"
msgstr ""

#: calibre-plugin/dialog/cards.py:94
msgid "Card name"
msgstr ""

#: calibre-plugin/dialog/cards.py:103
#: calibre-plugin/dialog/cards.py:105
msgid "Card account"
msgstr ""

#: calibre-plugin/dialog/cards.py:114
#: calibre-plugin/dialog/cards.py:116
msgid "Created date"
msgstr ""

#: calibre-plugin/dialog/cards.py:131
#: calibre-plugin/dialog/cards.py:133
msgid "Verified date"
msgstr ""

#: calibre-plugin/dialog/cards.py:148 calibre-plugin/dialog/loans.py:154
#: calibre-plugin/dialog/cards.py:150 calibre-plugin/dialog/cards.py:202
#: calibre-plugin/dialog/loans.py:154
msgid "Loans"
msgstr ""

#: calibre-plugin/dialog/cards.py:169 calibre-plugin/dialog/holds.py:155
#: calibre-plugin/dialog/holds.py:169
#: calibre-plugin/dialog/cards.py:172 calibre-plugin/dialog/cards.py:213
#: calibre-plugin/dialog/holds.py:155 calibre-plugin/dialog/holds.py:169
msgid "Holds"
msgstr ""

#: calibre-plugin/dialog/cards.py:187 calibre-plugin/dialog/cards.py:197
#: calibre-plugin/dialog/holds.py:259 calibre-plugin/dialog/loans.py:188
#: calibre-plugin/dialog/magazines.py:260
#: calibre-plugin/dialog/cards.py:192 calibre-plugin/dialog/cards.py:203
#: calibre-plugin/dialog/cards.py:214 calibre-plugin/dialog/holds.py:259
#: calibre-plugin/dialog/loans.py:188 calibre-plugin/dialog/magazines.py:260
msgid "View in Libby"
msgstr ""

#: calibre-plugin/dialog/cards.py:190 calibre-plugin/dialog/cards.py:200
#: calibre-plugin/dialog/holds.py:264 calibre-plugin/dialog/loans.py:193
#: calibre-plugin/dialog/magazines.py:265
#: calibre-plugin/dialog/cards.py:195 calibre-plugin/dialog/cards.py:206
#: calibre-plugin/dialog/cards.py:217 calibre-plugin/dialog/holds.py:264
#: calibre-plugin/dialog/loans.py:193 calibre-plugin/dialog/magazines.py:265
msgid "View in OverDrive"
msgstr ""

#: calibre-plugin/dialog/cards.py:253
#: calibre-plugin/dialog/cards.py:276
msgid "Cards"
msgstr ""

Expand Down Expand Up @@ -446,28 +453,28 @@ msgid_plural "Return {n} loans"
msgstr[0] ""
msgstr[1] ""

#: calibre-plugin/dialog/loans.py:305
#: calibre-plugin/dialog/loans.py:294
#, python-brace-format
msgid "Downloading {format} for {book}"
msgstr ""

#: calibre-plugin/dialog/loans.py:404
#: calibre-plugin/dialog/loans.py:363
#, python-brace-format
msgid "Return this loan?"
msgid_plural "Return these {n} loans?"
msgstr[0] ""
msgstr[1] ""

#: calibre-plugin/dialog/loans.py:416
#: calibre-plugin/dialog/loans.py:375
msgid "Return Loans"
msgstr ""

#: calibre-plugin/dialog/loans.py:427
#: calibre-plugin/dialog/loans.py:386
#, python-brace-format
msgid "Returning {book}"
msgstr ""

#: calibre-plugin/dialog/loans.py:448
#: calibre-plugin/dialog/loans.py:407
msgid "Failed to return loan"
msgstr ""

Expand Down
51 changes: 29 additions & 22 deletions calibre-plugin/translations/ja.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: libby-calibre-plugin 0.1.6\n"
"Report-Msgid-Bugs-To: https://github.com/ping/libby-calibre-plugin/\n"
"POT-Creation-Date: 2023-08-01 19:35+0800\n"
"POT-Creation-Date: 2023-08-01 22:38+0800\n"
"PO-Revision-Date: 2023-07-04 07:26+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
Expand Down Expand Up @@ -127,11 +127,11 @@ msgstr ""
msgid "Returning"
msgstr ""

#: calibre-plugin/magazine_download.py:429
#: calibre-plugin/magazine_download.py:424
msgid "Getting loan details"
msgstr ""

#: calibre-plugin/magazine_download.py:469
#: calibre-plugin/magazine_download.py:464
msgid "Getting book details"
msgstr ""

Expand Down Expand Up @@ -192,6 +192,7 @@ msgid "Expire Date"
msgstr ""

#: calibre-plugin/models.py:170 calibre-plugin/models.py:330
#: calibre-plugin/dialog/cards.py:191
msgid "Library"
msgstr "ライブラリー"

Expand Down Expand Up @@ -294,44 +295,50 @@ msgstr ""
msgid "Check your connection or retry in a few minutes."
msgstr "接続を確認するか、数分後に再試行してください。"

#: calibre-plugin/dialog/cards.py:92
#: calibre-plugin/dialog/cards.py:87 calibre-plugin/dialog/cards.py:164
#: calibre-plugin/dialog/cards.py:186
msgid "Right-click for shortcuts"
msgstr ""

#: calibre-plugin/dialog/cards.py:94
msgid "Card name"
msgstr "カードの名前"

#: calibre-plugin/dialog/cards.py:103
#: calibre-plugin/dialog/cards.py:105
msgid "Card account"
msgstr ""

#: calibre-plugin/dialog/cards.py:114
#: calibre-plugin/dialog/cards.py:116
msgid "Created date"
msgstr ""

#: calibre-plugin/dialog/cards.py:131
#: calibre-plugin/dialog/cards.py:133
msgid "Verified date"
msgstr ""

#: calibre-plugin/dialog/cards.py:148 calibre-plugin/dialog/loans.py:154
#: calibre-plugin/dialog/cards.py:150 calibre-plugin/dialog/cards.py:202
#: calibre-plugin/dialog/loans.py:154
msgid "Loans"
msgstr "貸出中"

#: calibre-plugin/dialog/cards.py:169 calibre-plugin/dialog/holds.py:155
#: calibre-plugin/dialog/holds.py:169
#: calibre-plugin/dialog/cards.py:172 calibre-plugin/dialog/cards.py:213
#: calibre-plugin/dialog/holds.py:155 calibre-plugin/dialog/holds.py:169
msgid "Holds"
msgstr "予約中"

#: calibre-plugin/dialog/cards.py:187 calibre-plugin/dialog/cards.py:197
#: calibre-plugin/dialog/holds.py:259 calibre-plugin/dialog/loans.py:188
#: calibre-plugin/dialog/magazines.py:260
#: calibre-plugin/dialog/cards.py:192 calibre-plugin/dialog/cards.py:203
#: calibre-plugin/dialog/cards.py:214 calibre-plugin/dialog/holds.py:259
#: calibre-plugin/dialog/loans.py:188 calibre-plugin/dialog/magazines.py:260
msgid "View in Libby"
msgstr "Libbyで見る"

#: calibre-plugin/dialog/cards.py:190 calibre-plugin/dialog/cards.py:200
#: calibre-plugin/dialog/holds.py:264 calibre-plugin/dialog/loans.py:193
#: calibre-plugin/dialog/magazines.py:265
#: calibre-plugin/dialog/cards.py:195 calibre-plugin/dialog/cards.py:206
#: calibre-plugin/dialog/cards.py:217 calibre-plugin/dialog/holds.py:264
#: calibre-plugin/dialog/loans.py:193 calibre-plugin/dialog/magazines.py:265
msgid "View in OverDrive"
msgstr "OverDriveで見る"

#: calibre-plugin/dialog/cards.py:253
#: calibre-plugin/dialog/cards.py:276
msgid "Cards"
msgstr "ライブラリーカード"

Expand Down Expand Up @@ -441,27 +448,27 @@ msgid "Return {n} loan"
msgid_plural "Return {n} loans"
msgstr[0] "借りた本を{n}冊返却する"

#: calibre-plugin/dialog/loans.py:305
#: calibre-plugin/dialog/loans.py:294
#, python-brace-format
msgid "Downloading {format} for {book}"
msgstr ""

#: calibre-plugin/dialog/loans.py:404
#: calibre-plugin/dialog/loans.py:363
#, python-brace-format
msgid "Return this loan?"
msgid_plural "Return these {n} loans?"
msgstr[0] "この本のローンを返しますか?"

#: calibre-plugin/dialog/loans.py:416
#: calibre-plugin/dialog/loans.py:375
msgid "Return Loans"
msgstr "図書貸出返還"

#: calibre-plugin/dialog/loans.py:427
#: calibre-plugin/dialog/loans.py:386
#, python-brace-format
msgid "Returning {book}"
msgstr "{book}を返却中"

#: calibre-plugin/dialog/loans.py:448
#: calibre-plugin/dialog/loans.py:407
msgid "Failed to return loan"
msgstr "図書貸出返還失敗"

Expand Down
Loading

0 comments on commit 3031f7f

Please sign in to comment.