Skip to content

Commit

Permalink
Add translations for context menu
Browse files Browse the repository at this point in the history
Added translations for context menu options:
Delete book
Download book
Open Book
Resume Download
Pause Download
Cancel download
  • Loading branch information
juuz0 committed Aug 2, 2023
1 parent 23ff2c8 commit 91e8661
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
6 changes: 5 additions & 1 deletion resources/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,9 @@
"download-storage-error": "Storage Error",
"download-storage-error-text": "The system doesn't have enough storage available.",
"download-unavailable": "Download Unavailable",
"download-unavailable-text": "This download is unavailable."
"download-unavailable-text": "This download is unavailable.",
"open-book": "Open book",
"download-book": "Download book",
"pause-download": "Pause download",
"resume-download": "Resume download"
}
12 changes: 6 additions & 6 deletions src/contentmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ void ContentManager::onCustomContextMenu(const QPoint &point)
auto bookNode = static_cast<RowNode*>(index.internalPointer());
const auto id = bookNode->getBookId();

QAction menuDeleteBook("Delete book", this);
QAction menuOpenBook("Open book", this);
QAction menuDownloadBook("Download book", this);
QAction menuPauseBook("Pause download", this);
QAction menuResumeBook("Resume download", this);
QAction menuCancelBook("Cancel download", this);
QAction menuDeleteBook(gt("delete-book"), this);
QAction menuOpenBook(gt("open-book"), this);
QAction menuDownloadBook(gt("download-book"), this);
QAction menuPauseBook(gt("pause-download"), this);
QAction menuResumeBook(gt("resume-download"), this);
QAction menuCancelBook(gt("cancel-download"), this);

if (bookNode->isDownloading()) {
if (bookNode->getDownloadInfo().paused) {
Expand Down

0 comments on commit 91e8661

Please sign in to comment.