Adjust page rotation labels in PDF reader

Fixes #2669
This commit is contained in:
Martynas Bagdonas 2022-07-01 16:32:23 +03:00
parent 49f9642c0d
commit 92d89becc7
2 changed files with 13 additions and 13 deletions

View file

@ -695,9 +695,18 @@ class ReaderInstance {
popup.remove();
});
let menuitem;
// Rotate 90
// Rotate Left
menuitem = this._window.document.createElement('menuitem');
menuitem.setAttribute('label', Zotero.getString('pdfReader.rotate90'));
menuitem.setAttribute('label', Zotero.getString('pdfReader.rotateLeft'));
menuitem.addEventListener('command', async () => {
this._postMessage({ action: 'reloading' });
await Zotero.PDFWorker.rotatePages(this._itemID, data.pageIndexes, 270, true);
await this.reload();
});
popup.appendChild(menuitem);
// Rotate Right
menuitem = this._window.document.createElement('menuitem');
menuitem.setAttribute('label', Zotero.getString('pdfReader.rotateRight'));
menuitem.addEventListener('command', async () => {
this._postMessage({ action: 'reloading' });
await Zotero.PDFWorker.rotatePages(this._itemID, data.pageIndexes, 90, true);
@ -713,15 +722,6 @@ class ReaderInstance {
await this.reload();
});
popup.appendChild(menuitem);
// Rotate 270
menuitem = this._window.document.createElement('menuitem');
menuitem.setAttribute('label', Zotero.getString('pdfReader.rotate270'));
menuitem.addEventListener('command', async () => {
this._postMessage({ action: 'reloading' });
await Zotero.PDFWorker.rotatePages(this._itemID, data.pageIndexes, 270, true);
await this.reload();
});
popup.appendChild(menuitem);
// Separator
popup.appendChild(this._window.document.createElement('menuseparator'));
// Delete

View file

@ -1385,9 +1385,9 @@ pdfReader.promptTransferToPDF.text = Annotations will be transferred to the PDF
pdfReader.promptPasswordProtected = The operation is not supported for password-protected PDF files.
pdfReader.promptDeletePages.title = Delete Pages
pdfReader.promptDeletePages.text = Are you sure you want to delete %1$S page from the PDF file?;Are you sure you want to delete %1$S pages from the PDF file?
pdfReader.rotate90 = Rotate 90°
pdfReader.rotateLeft = Rotate Left
pdfReader.rotateRight = Rotate Right
pdfReader.rotate180 = Rotate 180°
pdfReader.rotate270 = Rotate 270°
pdfReader.editPageNumber = Edit Page Number…
pdfReader.editHighlightedText = Edit Highlighted Text
pdfReader.pageNumberPopupHeader = Change page number for: