Add translations for context menu

Added translations for context menu options:
Delete book
Download book
Open Book
Resume Download
Pause Download
Cancel download
This commit is contained in:
Nikhil Tanwar 2023-08-02 16:43:48 +05:30
parent 2eb90bda0b
commit 08b2f25828
2 changed files with 11 additions and 7 deletions

View File

@ -144,5 +144,9 @@
"download-storage-error": "Storage Error", "download-storage-error": "Storage Error",
"download-storage-error-text": "The system doesn't have enough storage available.", "download-storage-error-text": "The system doesn't have enough storage available.",
"download-unavailable": "Download Unavailable", "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"
} }

View File

@ -93,12 +93,12 @@ void ContentManager::onCustomContextMenu(const QPoint &point)
auto bookNode = static_cast<RowNode*>(index.internalPointer()); auto bookNode = static_cast<RowNode*>(index.internalPointer());
const auto id = bookNode->getBookId(); const auto id = bookNode->getBookId();
QAction menuDeleteBook("Delete book", this); QAction menuDeleteBook(gt("delete-book"), this);
QAction menuOpenBook("Open book", this); QAction menuOpenBook(gt("open-book"), this);
QAction menuDownloadBook("Download book", this); QAction menuDownloadBook(gt("download-book"), this);
QAction menuPauseBook("Pause download", this); QAction menuPauseBook(gt("pause-download"), this);
QAction menuResumeBook("Resume download", this); QAction menuResumeBook(gt("resume-download"), this);
QAction menuCancelBook("Cancel download", this); QAction menuCancelBook(gt("cancel-download"), this);
if (bookNode->isDownloading()) { if (bookNode->isDownloading()) {
if (bookNode->getDownloadInfo().paused) { if (bookNode->getDownloadInfo().paused) {