Skip to content

Adding tooltips for pdf previous/next, zoom in/out/reset #278

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/locales/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"msgPluginRecipients": "المستلمين",
"msgPluginSender": "المرسل",
"pdfPluginLoading": "تحميل ...",
"pdfPluginPageNumber": " {{ allPagesCount }} \\ {{ currentPage }} صفحة "
"pdfPluginPageNumber": " {{ allPagesCount }} \\ {{ currentPage }} صفحة ",
"pdfZoomInLabel": "تكبير",
"pdfZoomOutLabel": "تصغير",
"pdfZoomResetLabel": "إعادة الضبط على مستوى التكبير أو التصغير التلقائي",
"pdfNextPageLabel": "الصفحة التالية",
"pdfPreviousPageLabel": ">الصفحة السابقة"
}
7 changes: 6 additions & 1 deletion src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"msgPluginRecipients": "Empfänger",
"msgPluginSender": "Absender",
"pdfPluginLoading": "Wird geladen...",
"pdfPluginPageNumber": "Seite {{ currentPage }}/{{ allPagesCount }}"
"pdfPluginPageNumber": "Seite {{ currentPage }}/{{ allPagesCount }}",
"pdfZoomInLabel": "Vergrößern",
"pdfZoomOutLabel": "Verkleinern",
"pdfZoomResetLabel": "Auf Standard-Zoomstufe zurücksetzen",
"pdfNextPageLabel": "Nächste Seite",
"pdfPreviousPageLabel": "Vorherige Seite"
}
7 changes: 6 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"msgPluginRecipients": "Recipients",
"msgPluginSender": "Sender",
"pdfPluginLoading": "Loading...",
"pdfPluginPageNumber": "Page {{ currentPage }}/{{ allPagesCount }}"
"pdfPluginPageNumber": "Page {{ currentPage }}/{{ allPagesCount }}",
"pdfZoomInLabel": "Zoom in",
"pdfZoomOutLabel": "Zoom out",
"pdfZoomResetLabel": "Reset to default zoom level",
"pdfNextPageLabel": "Next page",
"pdfPreviousPageLabel": "Previous page"
}
7 changes: 6 additions & 1 deletion src/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"msgPluginRecipients": "Destinatarios",
"msgPluginSender": "Remitente",
"pdfPluginLoading": "Cargando...",
"pdfPluginPageNumber": "Página {{ currentPage }}/{{ allPagesCount }}"
"pdfPluginPageNumber": "Página {{ currentPage }}/{{ allPagesCount }}",
"pdfZoomInLabel": "Acercar",
"pdfZoomOutLabel": "Alejar",
"pdfZoomResetLabel": "Restablecer el nivel de zoom predeterminado",
"pdfNextPageLabel": "Página siguiente",
"pdfPreviousPageLabel": "Página anterior"
}
7 changes: 6 additions & 1 deletion src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"msgPluginRecipients": "Destinataires",
"msgPluginSender": "Expéditeur",
"pdfPluginLoading": "Chargement...",
"pdfPluginPageNumber": "Page {{ currentPage }}/{{ allPagesCount }}"
"pdfPluginPageNumber": "Page {{ currentPage }}/{{ allPagesCount }}",
"pdfZoomInLabel": "Zoom avant",
"pdfZoomOutLabel": "Zoom arrière",
"pdfZoomResetLabel": "Réinitialiser le niveau de zoom par défaut",
"pdfNextPageLabel": "Page suivante",
"pdfPreviousPageLabel": "Page précédente"
}
7 changes: 6 additions & 1 deletion src/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"msgPluginRecipients": "Destinatari",
"msgPluginSender": "Mittente",
"pdfPluginLoading": "Caricamento in corso...",
"pdfPluginPageNumber": "Pagina {{ currentPage }}/{{ allPagesCount }}"
"pdfPluginPageNumber": "Pagina {{ currentPage }}/{{ allPagesCount }}",
"pdfZoomInLabel": "Ingrandisci",
"pdfZoomOutLabel": "Riduci",
"pdfZoomResetLabel": "Ripristina il livello di zoom predefinito",
"pdfNextPageLabel": "Pagina successiva",
"pdfPreviousPageLabel": "Pagina precedente"
}
7 changes: 6 additions & 1 deletion src/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"msgPluginRecipients": "受信者",
"msgPluginSender": "送信者",
"pdfPluginLoading": "ローティング中...",
"pdfPluginPageNumber": "ページ {{ currentPage }}/{{ allPagesCount }}"
"pdfPluginPageNumber": "ページ {{ currentPage }}/{{ allPagesCount }}",
"pdfZoomInLabel": "拡大",
"pdfZoomOutLabel": "縮小",
"pdfZoomResetLabel": "リセットしてデフォルトのズームレベルに戻す",
"pdfNextPageLabel": "次のページ",
"pdfPreviousPageLabel": "前のページ"
}
7 changes: 6 additions & 1 deletion src/locales/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"msgPluginRecipients": "Odbiorcy",
"msgPluginSender": "Nadawca",
"pdfPluginLoading": "Wczytywanie...",
"pdfPluginPageNumber": "Strona {{ currentPage }}/{{ allPagesCount }}"
"pdfPluginPageNumber": "Strona {{ currentPage }}/{{ allPagesCount }}",
"pdfZoomInLabel": "Powiększ",
"pdfZoomOutLabel": "Pomniejsz",
"pdfZoomResetLabel": "Przywróć domyślny poziom powiększeni",
"pdfNextPageLabel": "Następna strona",
"pdfPreviousPageLabel": "Poprzednia strona"
}
7 changes: 6 additions & 1 deletion src/locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"msgPluginRecipients": "Destinatários",
"msgPluginSender": "Remetente",
"pdfPluginLoading": "Carregando...",
"pdfPluginPageNumber": "Página {{ currentPage }}/{{ allPagesCount }}"
"pdfPluginPageNumber": "Página {{ currentPage }}/{{ allPagesCount }}",
"pdfZoomInLabel": "Ampliar",
"pdfZoomOutLabel": "Reduzir",
"pdfZoomResetLabel": "Repor o nível de zoom predefinido",
"pdfNextPageLabel": "Página seguinte",
"pdfPreviousPageLabel": "Página anterior"
}
7 changes: 6 additions & 1 deletion src/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"msgPluginRecipients": "Получатели",
"msgPluginSender": "Отправитель",
"pdfPluginLoading": "Загрузка...",
"pdfPluginPageNumber": "Страница {{ currentPage }}/{{ allPagesCount }}"
"pdfPluginPageNumber": "Страница {{ currentPage }}/{{ allPagesCount }}",
"pdfZoomInLabel": "Увеличить",
"pdfZoomOutLabel": "Уменьшить",
"pdfZoomResetLabel": "Восстановить масштаб по умолчанию",
"pdfNextPageLabel": "Следующая страница",
"pdfPreviousPageLabel": "Предыдущая страница"
}
7 changes: 6 additions & 1 deletion src/locales/se.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"msgPluginRecipients": "Mottagare",
"msgPluginSender": "Avsändare",
"pdfPluginLoading": "Laddar...",
"pdfPluginPageNumber": "Sida {{ currentPage }}/{{ allPagesCount }}"
"pdfPluginPageNumber": "Sida {{ currentPage }}/{{ allPagesCount }}",
"pdfZoomInLabel": "Zooma in",
"pdfZoomOutLabel": "Zooma out",
"pdfZoomResetLabel": "Återställ standardzoomnivån",
"pdfNextPageLabel": "Nästa sida",
"pdfPreviousPageLabel": "Föregående sida"
}
7 changes: 6 additions & 1 deletion src/locales/sr.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"msgPluginRecipients": "Primaoci",
"msgPluginSender": "Pošiljalac",
"pdfPluginLoading": "Učitavanje...",
"pdfPluginPageNumber": "Strana {{ currentPage }}/{{ allPagesCount }}"
"pdfPluginPageNumber": "Strana {{ currentPage }}/{{ allPagesCount }}",
"pdfZoomInLabel": "Povećaj",
"pdfZoomOutLabel": "Smanji",
"pdfZoomResetLabel": "Vraćanje na zadanu razinu zumiranja",
"pdfNextPageLabel": "Sljedeća stranica",
"pdfPreviousPageLabel": "Prethodna stranica"
}
7 changes: 6 additions & 1 deletion src/locales/sr_cyr.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
"msgPluginRecipients": "Примаоци",
"msgPluginSender": "Пошиљалац",
"pdfPluginLoading": "Учитавање...",
"pdfPluginPageNumber": "Страна {{ currentPage }}/{{ allPagesCount }}"
"pdfPluginPageNumber": "Страна {{ currentPage }}/{{ allPagesCount }}",
"pdfZoomInLabel": "Увећај",
"pdfZoomOutLabel": "Умањи",
"pdfZoomResetLabel": "Ресетуј на подразумевани ниво зумирања",
"pdfNextPageLabel": "Следећа страница",
"pdfPreviousPageLabel": "Претходна страница"
}
3 changes: 3 additions & 0 deletions src/renderers/pdf/components/PDFControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,23 @@ const PDFControls: FC = () => {

<ControlButton
id="pdf-zoom-out"
title={t("pdfZoomOutLabel")}
onMouseDown={() => dispatch(setZoomLevel(zoomLevel - zoomJump))}
>
<ZoomOutPDFIcon color="#000" size="80%" />
</ControlButton>

<ControlButton
id="pdf-zoom-in"
title={t("pdfZoomInLabel")}
onMouseDown={() => dispatch(setZoomLevel(zoomLevel + zoomJump))}
>
<ZoomInPDFIcon color="#000" size="80%" />
</ControlButton>

<ControlButton
id="pdf-zoom-reset"
title={t("pdfZoomResetLabel")}
onMouseDown={() => dispatch(setZoomLevel(defaultZoomLevel))}
disabled={zoomLevel === defaultZoomLevel}
>
Expand Down
2 changes: 2 additions & 0 deletions src/renderers/pdf/components/PDFPagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const PDFPagination: FC = () => {
<Container id="pdf-pagination">
<PageNavButtonLeft
id="pdf-pagination-prev"
title={t("pdfPreviousPageLabel")}
onClick={() => dispatch(setCurrentPage(currentPage - 1))}
disabled={currentPage === 1}
>
Expand All @@ -33,6 +34,7 @@ const PDFPagination: FC = () => {

<PageNavButtonRight
id="pdf-pagination-next"
title={t("pdfNextPageLabel")}
onClick={() => dispatch(setCurrentPage(currentPage + 1))}
disabled={currentPage >= numPages}
>
Expand Down
Loading