Commit Graph

502 Commits

Author SHA1 Message Date
Tim van der Meij
58fed00bc3
Update translations to the most recent versions 2022-05-01 13:10:20 +02:00
Jonas Jenwald
0c086467a9 Update l10n files 2022-04-17 10:25:20 +02:00
Tim van der Meij
312595eb47
Update translations to the most recent versions 2022-04-02 19:43:34 +02:00
Jonas Jenwald
579ff9459e Update l10n files 2022-03-20 10:59:15 +01:00
Jonas Jenwald
114d5e68af Update l10n files 2022-03-06 10:45:24 +01:00
Jonas Jenwald
21f1d1ace2 Update l10n files 2022-02-20 10:10:21 +01:00
Jonas Jenwald
86949cc930 Update l10n files 2022-02-06 11:34:26 +01:00
Jonas Jenwald
cd7fe27468 [GENERIC viewer] Use consistent casing, for the labels, in the findbar
Note that the *browser* findbar in Firefox uses "Title Case" for the labels, and it thus seem like a good idea to ensure that `PDFFindBar` in consistent with that.
Furthermore, the new label added in PR #13261 uses the "Title Case" format which means that currently the default viewer findbar looks inconsistent.

*Please note:* Based on the official Firefox localization docs, see https://firefox-source-docs.mozilla.org/l10n/overview.html#string-updates, changing only the casing should *not* require updating the key:
> 1) If the change is minor, like fixing a spelling error or case, the developer should update the en-US translation without changing the l10n-id.
2022-02-05 11:18:20 +01:00
Calixte Denizet
1f41028fcb Support search with or without diacritics (bug 1508345, bug 916883, bug 1651113)
- get original index in using a dichotomic seach instead of a linear one;
  - normalize the text in using NFD;
  - convert the query string into a RegExp;
  - replace whitespaces in the query with \s+;
  - handle hyphens at eol use to break a word;
  - add some \s* around punctuation signs
2022-02-03 15:42:55 +01:00
Jonas Jenwald
4f03f2a3a7 Update l10n files 2022-01-23 11:00:06 +01:00
Jonas Jenwald
365538a383 Update l10n files 2022-01-09 11:32:34 +01:00
Jonas Jenwald
ea55e8bf41 Update l10n files 2021-12-26 11:19:19 +01:00
Tim van der Meij
c5847141b4
Update translations to the most recent versions 2021-12-11 19:44:52 +01:00
Jonas Jenwald
37bed4ea45 Update l10n files 2021-11-28 11:14:03 +01:00
Jonas Jenwald
c47f5e81fe Update l10n files 2021-11-14 10:48:50 +01:00
Jonas Jenwald
822856e044 Update l10n files 2021-10-31 09:56:41 +01:00
Jonas Jenwald
ee800a064a Update l10n files 2021-10-17 11:49:08 +02:00
Jonas Jenwald
511458fbbc Add a new Page scrolling mode (issue 2638, 8952, 10907)
This implements a new Page scrolling mode, essentially bringing (and extending) the functionality from `PDFSinglePageViewer` into the regular `PDFViewer`-class. Compared to `PDFSinglePageViewer`, which as its name suggests will only display one page at a time, in the `PDFViewer`-implementation this new Page scrolling mode also support spreadModes properly (somewhat similar to e.g. Adobe Reader).

Given the size and scope of these changes, I've tried to focus on implementing the basic functionality. Hence there's room for further clean-up and/or improvements, including e.g. simplifying the CSS/JS related to PresentationMode and implementing easier page-switching with the mouse-wheel/arrow-keys.
2021-10-12 13:45:15 +02:00
Jonas Jenwald
65118bc04d Update l10n files 2021-10-03 08:33:21 +02:00
Jonas Jenwald
32ad677f9c Update l10n files 2021-09-19 09:43:15 +02:00
Jonas Jenwald
a6f8591cc2 Update l10n files 2021-09-05 10:01:23 +02:00
Jonas Jenwald
ab06773758 Update l10n files 2021-08-22 10:43:02 +02:00
Jonas Jenwald
d24476e02c Update l10n files 2021-08-08 10:52:26 +02:00
Jonas Jenwald
aad0316137 Update l10n files 2021-07-25 10:31:40 +02:00
Jonas Jenwald
c9ed65a0c4 Update l10n files 2021-07-11 12:25:54 +02:00
Jonas Jenwald
0326c05db0 Update l10n files 2021-06-27 10:31:06 +02:00
Jonas Jenwald
59f72bbde1 Update l10n files 2021-06-13 10:35:58 +02:00
Jonas Jenwald
0bfd99ae98 Update l10n files 2021-05-30 08:02:55 +02:00
Jonas Jenwald
30908451b4 Update l10n files 2021-05-16 11:44:05 +02:00
Jonas Jenwald
809cb1de4d Update l10n files 2021-05-02 09:38:15 +02:00
Jonas Jenwald
d3ed3761bc Update l10n files 2021-04-18 11:24:51 +02:00
Jonas Jenwald
7d7a8a1a3c [GENERIC viewer] Don't display the errorWrapper, for documents with signatures (PR 13217 follow-up)
According to a decision by UX and PM, please see https://bugzilla.mozilla.org/show_bug.cgi?id=1705060#c2, in Firefox we should first of all *not* display the notification-bar for signatures. Secondly, as can also be seen there, we shouldn't display the notification-bar *at all* and it's thus disabled in https://bugzilla.mozilla.org/show_bug.cgi?id=1705327.

If we purposely don't display a notification, for documents with signatures, in the *built in* Firefox PDF Viewer then it cannot be necessary in the GENERIC viewer either.
2021-04-16 09:53:59 +02:00
Jonas Jenwald
52494be545 [GENERIC viewer] Display a warning message, using the errorWrapper, for documents with signatures (PR 13214 follow-up, issue 13215)
To simplify the overall implementation, given that it only applies to the GENERIC-viewer, this patch purposely re-uses the existing `errorWrapper`-functionality to display the message.
While that one is mostly intended for actual *errors*, by re-using it here we considerably reduce the amount of code/complexity necessary for supporting this new warning. It's obviously possible to re-factor/improve this later on, but the patch should do just fine here since it'll indeed inform users (of the GENERIC-viewer) about unverified signatures.

Finally this patch also tweaks the background-color of the `errorWrapper`, making it 20 percent lighter respectively darker (depending on the theme) to make it "stand out" a little bit *less*.[1] While it may perhaps be useful to re-style/re-factor the `errorWrapper`, this patch probably isn't the right place for doing that.

---
[1] Note how in the MOZCENTRAL-viewer, which instead uses the browser notification-bar, we're purposely using a neutral colour to not draw too much attention to the notification-bar.
2021-04-11 12:46:17 +02:00
Calixte Denizet
5875ebb1ca Display widget signature
- but don't validate them for now;
  - Firefox will display a bar to warn that the signature validation is not supported (see https://bugzilla.mozilla.org/show_bug.cgi?id=854315)
  - almost all (all ?) pdf readers display signatures;
  - validation is done in edge but for now it's behind a pref.
2021-04-10 19:13:28 +02:00
Jonas Jenwald
3d9f6ec0f9 Update l10n files 2021-04-04 11:04:05 +02:00
Jonas Jenwald
4814e23310 Add (temporary) Swedish localizations for the page_landmark/loading strings (PR 13118 follow-up)
I'm adding these temporary l10n strings, so that I don't have to stare at a bunch of warning messages in the web-console when using the development viewer.
2021-03-21 11:12:20 +01:00
Jonas Jenwald
36e79edfaf Update l10n files 2021-03-21 11:12:18 +01:00
Brendan Dahl
9fb0f3b0da Add landmark region and aria-label for each page.
Allows screen readers to jump landmarks and announce
the page. Since landmarks must have content, I also added
aria labels for the loading images.
2021-03-19 14:13:51 -07:00
Jonas Jenwald
d4cf751f91 Update l10n files 2021-03-07 12:05:10 +01:00
Jonas Jenwald
476230bd17 Update l10n files 2021-02-21 12:07:32 +01:00
Jonas Jenwald
6e2ae2264b Remove the unused "loading_error_indicator" l10n string (PR 2719 follow-up)
This l10n string has been completely unused ever since PR 2719, which is now *eight* years ago.
2021-02-12 13:12:37 +01:00
Jonas Jenwald
32a4a30f3a Remove the contentmenu usage, from PresentationMode, since it's no longer working
This feature was Firefox-specific, and it's now been removed from the HTML specification and it's disabled by default starting with Firefox 85. Hence it seems completely unnecessary to keep this code in the default viewer.

Please refer to https://groups.google.com/g/mozilla.dev.platform/c/tc11BCenm2c and the resources that it links to.
2021-02-09 14:29:48 +01:00
Jonas Jenwald
1d56785b6b Update l10n files 2021-02-07 12:04:23 +01:00
Jonas Jenwald
09442351b8 Update l10n files 2021-01-24 08:43:09 +01:00
Jonas Jenwald
3210b91cf8 Update l10n files 2021-01-10 13:34:49 +01:00
Jonas Jenwald
5729c0b32f Add support for finding/highlighting the outlineItem, corresponding to the currently visible page, in the sidebar (issue 7557, bug 1253820, bug 1499050)
This implementation is inspired by the behaviour in (recent versions of) Adobe Reader, since it leads to reasonably simple and straightforward code as far as I'm concerned.
*Specifically:* We'll only consider *one* destination per page when finding/highlighting the current outline item, which is similar to e.g. Adobe Reader, and we choose the *first* outline item at the *lowest* level of the outline tree.

Given that this functionality requires not only parsing of the `outline`, but looking up *all* of the destinations in the document, this feature can when initialized have a non-trivial performance overhead for larger PDF documents.
In an attempt to reduce the performance impact, the following steps are taken here:

 - The "find current outline item"-functionality will only be enabled once *one* page has rendered and *all* the pages have been loaded[1], to prevent it interfering with data regular fetching/parsing early on during document loading and viewer initialization.

 - With the exception of a couple of small and simple `eventBus`-listeners, in `PDFOutlineViewer`, this new functionality is initialized *lazily* the first time that the user clicks on the `currentOutlineItem`-button.

 - The entire "find current outline item"-functionality is disabled when `disableAutoFetch = true` is set, since it can easily lead to the setting becoming essentially pointless[2] by triggering *a lot* of data fetching from a relatively minor viewer-feature.

 - Fetch the destinations *individually*, since that's generally more efficient than using `PDFDocumentProxy.getDestinations` to fetch them all at once. Despite making the overall parsing code *more* asynchronous, and leading to a lot more main/worker-thread message passing, in practice this seems faster for larger documents.

Finally, we'll now always highlight an outline item that the user manually clicked on, since only highlighting when the new "find current outline item"-functionality is used seemed inconsistent.

---
[1] Keep in mind that the `outline` itself already isn't fetched/parsed until at least *one* page has been rendered in the viewer.

[2] And also quite slow, since it can take a fair amount of time to fetch all of the necessary `destinations` data when `disableAutoFetch = true` is set.
2021-01-09 16:09:44 +01:00
Jonas Jenwald
689e3e9732 Update l10n files 2020-12-27 11:13:54 +01:00
Jonas Jenwald
ad91972eb2 Update l10n files 2020-12-13 11:43:49 +01:00
Jonas Jenwald
cd2e6d803a Update l10n files 2020-11-29 09:50:36 +01:00
Jonas Jenwald
237c2f7832 Update l10n files 2020-11-15 13:57:28 +01:00