Commit Graph

560 Commits

Author SHA1 Message Date
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
Jonas Jenwald
ab31f95cb4 Update l10n files 2020-10-18 11:01:06 +02:00
Jonas Jenwald
ffb0bb885c Update l10n files 2020-10-04 15:30:24 +02:00
Jonas Jenwald
fcfbc06a9c Update l10n files 2020-09-20 11:43:35 +02:00
Jonas Jenwald
54eeaba014 Update l10n files 2020-09-06 11:51:34 +02:00
Jonas Jenwald
66aabe3ec7 [api-minor] Add support for toggling of Optional Content in the viewer (issue 12096)
*Besides, obviously, adding viewer support:* This patch attempts to improve the general API for Optional Content Groups slightly, by adding a couple of new methods for interacting with the (more complex) data structures of `OptionalContentConfig`-instances. (Thus allowing us to mark some of the data as "private", given that it probably shouldn't be manipulated directly.)

By utilizing not just the "raw" Optional Content Groups, but the data from the `/Order` array when available, we can thus display the Layers in a proper tree-structure with collapsible headings for PDF documents that utilizes that feature.

Note that it's possible to reset all Optional Content Groups to their default visibility state, simply by double-clicking on the Layers-button in the sidebar.
(Currently that's indicated in the Layers-button tooltip, which is obviously easy to overlook, however it's probably the best we can do for now without adding more buttons, or even a dropdown-toolbar, to the sidebar.)

Also, the current Layers-button icons are a little rough around the edges, quite literally, but given that the viewer will soon have its UI modernized anyway they hopefully suffice in the meantime.

To give users *full* control of the visibility of the various Optional Content Groups, even those which according to the `/Order` array should not (by default) be toggleable in the UI, this patch will place those under a *custom* heading which:
 - Is collapsed by default, and placed at the bottom of the Layers-tree, to be a bit less obtrusive.
 - Uses a slightly different formatting, compared to the "regular" headings.
 - Is localizable.

Finally, note that the thumbnails are *purposely* always rendered with all Optional Content Groups at their default visibility state, since that seems the most useful and it's also consistent with other viewers.
To ensure that this works as intended, we'll thus disable the `PDFThumbnailView.setImage` functionality when the Optional Content Groups have been changed in the viewer. (This obviously means that we'll re-render thumbnails instead of using the rendered pages. However, this situation ought to be rare enough for this to not really be a problem.)
2020-08-30 16:28:40 +02:00
Jonas Jenwald
ba8c5bde5f Update l10n files 2020-08-23 10:10:38 +02:00
Jonas Jenwald
7afcdbeebe Update l10n files 2020-08-09 11:05:40 +02:00
Jonas Jenwald
ca61910a2c Update l10n files 2020-07-26 11:18:56 +02:00
Jonas Jenwald
8256981aca Update l10n files 2020-07-13 11:08:28 +02:00
Jonas Jenwald
93b1887512 Update l10n files 2020-06-27 11:37:41 +02:00
Jonas Jenwald
960d639dee Update l10n files 2020-06-13 10:39:20 +02:00
Jonas Jenwald
f2cbd5de42 Update l10n files 2020-05-30 11:01:34 +02:00
Jonas Jenwald
c12c92e598 Update l10n files 2020-05-16 11:47:08 +02:00
Jonas Jenwald
30bd3b24c2 Update l10n files 2020-05-02 13:25:28 +02:00
Jonas Jenwald
cf58f787f1 Update l10n files 2020-04-18 11:11:19 +02:00
Jonas Jenwald
9a3b52f52b Update l10n files 2020-04-02 12:22:18 +02:00
Jonas Jenwald
4ac34c6283 Update l10n files 2020-03-19 09:58:49 +01:00
Jonas Jenwald
af8c371fa9 Update l10n files 2020-03-06 13:08:15 +01:00
Jonas Jenwald
ed01158127 Update l10n files 2020-02-21 17:40:08 +01:00
Jonas Jenwald
9ac5395ca4 Update l10n files 2020-01-31 15:02:59 +01:00
Jonas Jenwald
a977882f54 Remove the supportsDocumentColors warning in MOZCENTRAL builds (bug 844349 follow-up)
With https://bugzilla.mozilla.org/show_bug.cgi?id=844349 now being fixed in Firefox, the textLayer will now actually stay hidden as intended regardless of the browser settings.
Hence it should no longer be necessary to display the fallback bar, nor print a warning in the console, for documents which contains a textLayer.

Besides removing the `supportsDocumentColors` methods in the default viewer, we can also remove a now unused l10n string.
2020-01-19 14:49:26 +01:00
Jonas Jenwald
16a94412e4 Remove the unused id properties from page and thumbnail canvas/image DOM elements (issue 11499)
As described in the issue, having a DOM element with `id=page2` (or any other number) will automatically cause that element to become linkable through the URL hash. That's currently leading to some confusing and outright wrong behaviour, since it obviously only works for pages that have been loaded and rendered.

For PDF documents the only officially supported way to reference a particular page through the URL hash is using the `#page=2` format, which also works for all pages regardless if they're loaded or not.

As far as I can tell there's nothing in the PDF.js default viewer that actually depends on the page/thumbnail `id` at this point in time, hence why I believe that this removal ought to be safe.
Just as a pre-caution this patch adds an `aria-label` to the page canvas, similar to the thumbnail canvas/image, to at least keep this information in the DOM.
2020-01-11 14:11:47 +01:00
Jonas Jenwald
cac953f5a9 Update l10n files 2019-12-28 20:00:03 +01:00
Jonas Jenwald
9386544555 Update l10n files 2019-12-19 11:30:57 +01:00
Jonas Jenwald
1319c9f13b Update l10n files 2019-11-23 12:02:31 +01:00
Jonas Jenwald
d08ecdb9fa Update l10n files 2019-10-26 13:56:37 +02:00
Jonas Jenwald
ee57832de2 Re-add the en-US chrome.properties l10n file, to avoid it being removed at mozilla-central (PR 11256 follow-up)
Unfortunately I forgot to test `gulp mozcentraldiff` with PR 11256, which is really bad since it will cause the en-US `chrome.properties` l10n file to be deleted at mozilla-central; sorry about breaking this!

In order to address this we'll have to re-add (only) the en-US `chrome.properties` l10n file, which is simple enough. Furthermore, since we're not doing any sort of build-specific parsing of the l10n files, we can just copy the en-US files as-is rather than having to run `gulp locale` during `gulp mozcentral`.
2019-10-19 17:28:37 +02:00
Jonas Jenwald
b7ddd10741 Update l10n files 2019-10-17 12:27:16 +02:00
Jonas Jenwald
b663cec383 [Firefox] Stop fetching the chrome.properties files during gulp importl10n (PR 9566 follow-up)
With the removal of the (standalone) Firefox building code in PR 9566 (a year and a half ago), these files are now completely unused in the GitHub repository[1].
Hence it doesn't really seem necessary to keep fetching them with `gulp importl10n`, and the existing files in the `l10n` folder can also be removed (thanks to version control, they're easy enough to restore should the need ever arise).

The patch also allows an additional simplification, for the `gulp locale` and `gulp mozcentral` commands, since it's now possible to stop writing `l10n` files to the `extensions/firefox/` folder and instead just copy them similar to other build targets.

---
[1] They're obviously still used in `mozilla-central`, for fallback messages displayed through `PdfStreamConverter.jsm`, but that doesn't make it necessary to keep them *here* as far as I'm concerned.
2019-10-17 12:27:11 +02:00
Jonas Jenwald
8a057dcf90 [Firefox] Stop building the metadata.inc/chrome.manifest.inc files during gulp locale (PR 9566 follow-up)
With the removal of the (standalone) Firefox building code in PR 9566 (a year and a half ago), these files are now completely unused.
Hence it doesn't really make sense to keep building them as part of `gulp locale`, and the existing files in the `l10n` folder can also be removed (thanks to version control, they're easy enough to restore should the need ever arise).
2019-10-17 11:49:30 +02:00
Jonas Jenwald
307a85901d Remove locales which are unmaintained and/or not shipping in Nightly (PR 11213 follow-up)
With the sole exception of `meh`[1], none of the locales removed here have even been updated since the last change was made to the default `en-US` locale.

Please note that if/when these locales would start shipping in Nightly again, they will automatically be re-added in PDF.js as well with the `gulp importl10n` command.

---
[1] The current translation is also somewhat incomplete, to put it mildly.
2019-10-09 10:18:00 +02:00
Jonas Jenwald
8d74a9ae7f Update l10n files 2019-10-06 18:12:29 +02:00
Tim van der Meij
27dee5e911
Update translations and packages 2019-09-21 13:42:27 +02:00
Tim van der Meij
bdd28fd717
Remove unmaintained localizations
Fixes #11167.
2019-09-21 13:31:42 +02:00
Tim van der Meij
7ce36644e3
Update translations 2019-09-15 15:31:44 +02:00
Tim van der Meij
ce1acff5f0
Update translations 2019-08-24 20:05:47 +02:00
Tim van der Meij
087e975478
Update translations 2019-06-29 12:33:23 +02:00
Tim van der Meij
1f3723f54c
Update translations 2019-05-25 16:21:09 +02:00
Tim van der Meij
be1d6626a7
Implement creation/modification date for annotations
This includes the information in the core and display layers. The
date parsing logic from the document properties is rewritten according
to the specification and now includes unit tests.

Moreover, missing unit tests for the color of a popup annotation have
been added.

Finally the styling of the popup is changed slightly to make the text a
bit smaller (it's currently quite large in comparison to other viewers)
and to make the drop shadow a bit more subtle. The former is done to be
able to easily include the modification date in the popup similar to how
other viewers do this.
2019-05-05 14:51:03 +02:00
Tim van der Meij
b0de15e855
Update translations 2019-04-13 17:23:33 +02:00
Tim van der Meij
4653dc196b
Update translations 2019-03-30 18:56:17 +01:00
Tim van der Meij
ff8e7114f4
Update translations 2019-03-02 14:19:27 +01:00
Tim van der Meij
01ac6cd8c6
Update translations 2019-02-17 16:40:22 +01:00
Tim van der Meij
a84541b271
Update translations 2019-01-20 16:32:35 +01:00
Tim van der Meij
825aceb648
Update translations 2019-01-05 14:24:44 +01:00
Tim van der Meij
11bf77aca4
Update translations 2018-12-22 15:54:42 +01:00
Tim van der Meij
2f2d5776e7
Update translations 2018-11-24 21:03:40 +01:00
Tim van der Meij
5df4d29b0f
Update translations 2018-11-17 21:37:51 +01:00
Tim van der Meij
c74c357157
Update translations 2018-10-23 23:32:42 +02:00
Tim van der Meij
a17aa16ba0
Update translations 2018-09-30 15:50:12 +02:00
Tim van der Meij
3c9e25b839
Update translations 2018-09-21 15:26:10 +02:00
Tim van der Meij
f711dbc011
Improve plural support for the matches counter 2018-09-16 14:23:06 +02:00
Jonas Jenwald
6c4157acd9 Attempt to support plural forms in the matches counter of the findbar (issue 10067)
Based on a quick look at https://github.com/fabi1cazenave/webL10n/#pluralization, it seems that supporting plural forms shouldn't be as difficult as I first thought it might be.
2018-09-13 13:50:51 +02:00
Jonas Jenwald
6d804d657f Add initial support for "Whole words" searching in the viewer
As outlined in https://bugzilla.mozilla.org/show_bug.cgi?id=1282759 the internal Firefox name for the feature is `entireWord`, hence that name is used here as well for consistency (with "Whole words" being limited to the UI).

Given existing limitations of the PDF.js search functionality, e.g. the existing problems of searching across "new lines", there's some edge-cases where "Whole words" searching will ignore (valid) results.
However, considering that this is a pre-existing issue related to the way that the find controller joins text-content together, that shouldn't have to block this new feature in my opionion.

*Please note:* In order to enable this feature in the `MOZCENTRAL` version, a small follow-up patch for [PdfjsChromeUtils.jsm](https://hg.mozilla.org/mozilla-central/file/tip/browser/extensions/pdfjs/content/PdfjsChromeUtils.jsm) will be required once this has landed in `mozilla-central`.
2018-09-10 11:59:29 +02:00
Tim van der Meij
04dfbb91fb
Translate the new find match count strings to Dutch 2018-09-09 20:23:07 +02:00
Tim van der Meij
38baaea8f4
Merge pull request #10052 from Snuffleupagus/matchesCount
Display the index of the currently active search result in the matches counter of the findbar (issue 6993, bug 1062025)
2018-09-09 19:56:03 +02:00
Tim van der Meij
97aaf06fde
Update translations 2018-09-09 17:48:43 +02:00
Jonas Jenwald
c9a2564882 Display the index of the currently active search result in the matches counter of the findbar (issue 6993, bug 1062025)
For the `PDFFindBar` implementation, similar to the native Firefox findbar, the matches count displayed is now limited to a (hopefully) reasonable value.

*Please note:* In order to enable this feature in the `MOZCENTRAL` version, a follow-up patch will be required once this has landed in `mozilla-central`.
2018-09-08 21:50:22 +02:00
Tim van der Meij
b6d89ffa9c
Update translations 2018-08-25 16:21:27 +02:00
Tim van der Meij
8cae41d25d
Update translations 2018-08-19 16:14:30 +02:00
Tim van der Meij
fa40c068af
Update translations 2018-08-05 21:15:58 +02:00
Jonas Jenwald
522040d130 Expose the Linearization status in the document properties dialog
This uses the same terminology, i.e. "Fast Web View", as is used by Adobe software.
2018-07-26 17:30:46 +02:00
Tim van der Meij
8a6b7373a0
Remove the jp-JP-mac locale
It gives warnings when running `gulp locale`, in a previous patch it was
explicitly asked to remove it and there is quite a bit of discussion
about the validity of the locale at
https://bugzilla.mozilla.org/show_bug.cgi?id=418485. In short, let's
remove it to prevent these issues.
2018-07-08 15:40:38 +02:00
Tim van der Meij
fa7eb95eed
Update the localization README to indicate that the translations are imported from the Nightly channel 2018-06-30 21:47:44 +02:00
Tim van der Meij
5baec1eeb4
Update translations 2018-06-30 20:36:17 +02:00
Tim van der Meij
32a44a054f
Import translations 2018-06-09 14:32:45 +02:00
Tim van der Meij
321681d867
Import translations 2018-05-20 16:53:20 +02:00
Ryan Hendrickson
3d83c646c6 Add spread modes to web viewer
This builds on the scrolling mode work to add three buttons for joining
page spreads together: one for the default view, with no page spreads,
and two for spreads starting on odd-numbered or even-numbered pages.
2018-05-14 23:10:32 -04:00
Ryan Hendrickson
91cbc185da Add scrolling modes to web viewer
In addition to the default scrolling mode (vertical), this commit adds
horizontal and wrapped scrolling, implemented primarily with CSS.
2018-05-14 23:10:32 -04:00
Tim van der Meij
e0b63cc7af
Update packages and translations 2018-04-08 15:49:17 +02:00
Jonas Jenwald
d86b816c2b Display the names, for a couple of standard page sizes, in the document properties dialog
Please note that this patch *purposely* doesn't add every standard (or semi-standard) page name in existence, but rather only a few common ones. This is done to lessen the burden on localizers, since it's quite possible that all of the page names could need translation (depending on locale).

It's easy to add more standard page sizes in the future, but we should take care to *only* add those that are very commonly used in actual PDF files.
2018-03-25 18:50:17 +02:00
Jonas Jenwald
fc0038d609 Add orientation description to the pageSize information, displayed in the properties dialog
Since the l10n strings were added in a previous commit, modifying them here shouldn't be a problem since they haven't landed in mozilla-central yet.
2018-03-25 18:50:17 +02:00
Jonas Jenwald
b7b5d93231 Reduce the duplication for the document_properties_page_size_* strings, by defining the units separately 2018-03-25 18:48:53 +02:00
Tim van der Meij
0d391daccc
Merge pull request #9577 from Snuffleupagus/pagesize-info-fixes
[api-minor] Fix various issues related to pageSize, and display the size for the active page in the document properties dialog
2018-03-18 15:01:21 +01:00
Jonas Jenwald
1730447ca1 Tweak the pageSize l10n strings for the document properties dialog
The units are currently repeated after each dimension, which seems unnecessary and is also not done in other PDF viewers (such as e.g. Adobe Reader).

Furthermore, the name of the l10n arguments can be simplified slightly, since the name of the strings themselves should be enough information.

Finally, the `width`/`height` should be formatted according to the current locale, as is already done for other strings in the document properties dialog.
2018-03-18 09:10:21 +01:00
Tim van der Meij
2247af7e95
Update translations
This required changing the import script in two ways:

- we should use the `default` branch and not the `tip` tag since the
  latter may refer to another branch than `default` (this is the case for
  the `vi` locale, which caused in the files to be overwritten with
  incorrect contents since `tip` referred to the
  `THUNDERBIRD600b1_2018031614_RELBRANCH` branch);
- we should check if the response code is indeed 200 because recently a
  script removed all empty localization files upstream (refer to
  https://bugzilla.mozilla.org/show_bug.cgi?id=1443175).
2018-03-17 16:31:04 +01:00
Yury Delendik
e0fb18a339
Merge pull request #9508 from pal03377/file-info-page-size
Add paper size to document information/properties
2018-03-08 11:57:38 -06:00
palsch
8558c5b1d9 Add page size to the document properties dialog 2018-03-08 18:23:47 +01:00
Jonas Jenwald
ae7821484c Update l10n files 2018-02-28 12:30:13 +01:00
Jonas Jenwald
0de49ed1e2 Update l10n files 2018-02-05 12:23:54 +01:00
Jonas Jenwald
22a9274193 Update l10n files 2018-01-17 11:37:44 +01:00
Jonas Jenwald
5bf4fb979e Update l10n files 2018-01-01 10:19:59 +01:00
Jonas Jenwald
fffd5cb875 Update l10n files 2017-11-30 13:35:00 +01:00
Jonas Jenwald
b8e7a0b2f4 Update l10n files 2017-11-20 16:07:24 +01:00
Jonas Jenwald
4e66c69d30 Update l10n files 2017-10-30 11:46:54 +01:00
Jonas Jenwald
3ac4baff36 Update l10n files 2017-10-23 09:54:39 +02:00
Jonas Jenwald
4c384e151e Update l10n files 2017-10-16 09:31:16 +02:00
Tim van der Meij
9a1f8b864e
Update translations 2017-10-01 14:42:00 +02:00
Jonas Jenwald
a1f5c26f54 Update l10n files 2017-09-25 09:39:21 +02:00
Jonas Jenwald
50bd4a5ac0 Update l10n files 2017-09-18 10:59:44 +02:00
Jonas Jenwald
ba21996576 Update l10n files 2017-09-11 11:43:12 +02:00
Jonas Jenwald
cd25a51abe Update l10n files 2017-09-04 11:33:04 +02:00
Jonas Jenwald
b7fcaff07c Update l10n files 2017-08-28 14:30:27 +02:00
Jonas Jenwald
723bc25bc3 Update l10n files 2017-08-14 10:19:07 +02:00
Jonas Jenwald
5cb8389757 Update l10n files 2017-08-07 10:10:49 +02:00
Jonas Jenwald
38d566f1e5 Update l10n files 2017-07-24 09:37:07 +02:00
Jonas Jenwald
85161fa6dc Update l10n files 2017-07-10 12:20:25 +02:00
Jonas Jenwald
699f3392e4 Update l10n files 2017-07-03 11:10:21 +02:00
Jonas Jenwald
1db290e818 Update l10n files 2017-06-26 14:30:41 +02:00
Jonas Jenwald
b0bf69dd8c Update l10n files 2017-06-19 11:37:18 +02:00
Jonas Jenwald
c2641045e6 Update l10n files 2017-06-12 10:36:26 +02:00
Jonas Jenwald
e696589a09 Update l10n files 2017-06-05 12:45:42 +02:00
Jonas Jenwald
263479fd6a Update l10n files 2017-05-29 09:59:26 +02:00
Tim van der Meij
836695986c Add icons for the new "Select tool" button
Also adds the Dutch localizations for the new select/hand tool buttons.
2017-05-22 00:51:03 +02:00
Jonas Jenwald
36c2791296 Unify handling of various cursor tools, e.g. the current Hand Tool and a possible future Zoom Tool, in a new PDFCursorTools module
With the current way that the `HandTool` is implemented, if someone would try to also add a Zoom tool (as issue 1260 asks for) that probably wouldn't work very well given that you'd then have two cursor tools which may not play nice together.
Hence this patch, which attempts to refactor things so that it should be simpler to add e.g. a Zoom tool as well (given that that issue is marked as "good-beginner-bug", and I'm not sure if that really applies considering the current state of the code).

Note that I personally have no interest in implementing a Zoom tool (similar to Adobe Reader) since I wouldn't use it, but I figured that it can't hurt to make this code a bit more future proof.
2017-05-22 00:51:01 +02:00
Jonas Jenwald
95660a2ab3 Update l10n files 2017-05-18 12:41:01 +02:00
Jonas Jenwald
9e9676e54e Update l10n files 2017-04-22 16:29:37 +02:00
Jonas Jenwald
c5199d0814 Update l10n files 2017-04-07 12:31:54 +02:00
Jonas Jenwald
da326a3137 Update l10n files 2017-03-19 13:46:11 +01:00
Jonas Jenwald
c79e5b3f17
Viewer: replace find label with placeholder/tooltip
This is common in the rest of the UI and helps us prevent responsiveness
issues for different length strings in different locales.
2017-03-08 23:54:14 +01:00
Jonas Jenwald
afc3cd2a81 Update l10n files 2017-02-26 13:46:58 +01:00
Tim van der Meij
dae71559da Update localization files 2017-02-07 23:14:06 +01:00
Jonas Jenwald
616e5fadff Display a notification on the sidebarToggle button for PDF documents with outline/attachments
A longstanding issue with the viewer is that you cannot tell if a PDF document includes an outline and/or attachments without actually opening the sidebar.
This patch contains a suggested solution for that, by displaying an hide-on-interaction notification on the `sidebarToggle` button (and the relevant sidebar view buttons). Note that this was inspired by e.g. the update notification that is displayed on the menu button in Firefox.

For an initial implementation, I've tried to do this in such a way that the notification isn't too distracting. Without being an UX expert, I don't think that we'd want something too in-your-face, in order to keep the viewer toolbars reasonable clean. (We probably do *not* want e.g. an entire notification bar in these situations, since that would take up unnecessary screen space and require actions from the user to close.)

However it's certainly possible that the current notification might simply be *too* inconspicuous to be truly helpful to users, but we could probably iterate on that if the feature itself is deemed useful.
2017-01-30 15:39:04 +01:00
Jonas Jenwald
e835774d9c Update l10n files 2017-01-26 21:24:30 +01:00
Jonas Jenwald
c0a47fddcc Update l10n files 2017-01-16 09:54:50 +01:00
Jonas Jenwald
4e62562a36 Update l10n files 2017-01-02 13:26:09 +01:00
Jonas Jenwald
33063a486e Update l10n files 2016-12-19 11:10:14 +01:00
Jonas Jenwald
caf81685cb Update l10n files 2016-12-05 10:10:17 +01:00
Jonas Jenwald
362d20b23a Update l10n files 2016-11-28 10:30:05 +01:00
Jonas Jenwald
8a1ed8ab1f Update l10n files 2016-11-21 17:23:22 +01:00
Jonas Jenwald
7f678e3af1 Update l10n files 2016-11-17 12:03:31 +01:00
Jonas Jenwald
40d2d3f569 [l10n] Add Swedish translations for a couple of new/changed localization IDs
I got tired of staring at a bunch of localization warnings every time that I open the console, hence this patch adds the missing translations to the Swedish locale.
2016-11-01 10:09:47 +01:00
Tim van der Meij
775b294bb9 L10n: import upstream translations 2016-10-31 23:35:05 +01:00
Tim van der Meij
f8e29ad80f L10n: update the Dutch translation after recent string changes 2016-10-31 23:31:14 +01:00
Jonas Jenwald
077e644437 Fix a typo in the page_of_pages l10n ID for the en-US locale 2016-10-31 23:14:22 +01:00
Tim van der Meij
e9c63a2b32 Merge pull request #6945 from Snuffleupagus/page-labels-viewer
Add support for PageLabels in the viewer (issue 6902, bug 793632)
2016-10-31 22:59:56 +01:00
Yury Delendik
ab464df336 Import L10n files. 2016-10-27 16:16:27 -05:00
Jonas Jenwald
f461fd64aa Add support for PageLabels in the viewer
This patch implements the page label functionality in a similar way as Adobe Reader.
For documents with page labels, if a non-existent page label is entered we'll try to fallback to the page number instead.
The patch also includes a preference (`disablePageLabels`), to make it easy to opt-out of using page labels if the user/implementor so wishes.

The way that `get/set currentPageLabel` is implemented in `PDFViewer`, is as wrappers for the corresponding `get/set currentPageNumber` functions, since that seemed like the cleanest solution.
The page labels are purposely *only* added to the page controls in the viewer UI, and not stored in e.g. the `ViewHistory`. Since doing so would mean adding unnecessary code complexity, without any real added value, and would also mean delaying the inital loading of PDF documents.

Note that this patch will ignore page labels if they are identical to standard page numbering, since in this case displaying the page labels adds no value (but only UI noise). The reason for handling this case specially, is that in practice a surprising number of PDF files include "pointless" page labels.
2016-10-26 13:30:36 +02:00
Jonas Jenwald
23ec02bb93 Remove the "Page: " label and replace it with a tooltip
The following reasoning was used for deciding to remove the "Page: " label, and replace it with a tooltip, from the main toolbar:
 - We have no other visible labels in the *main* toolbar (e.g. the Zoom dropdown doesn't have a label, but only a tooltip).
 - We already hide the "Page: " label when the viewer is narrow.
 - The varying width of the "Page: " label in different locales is already causing issues for many languages, with overlap in the main toolbar as a result.
Trying to create responsive CSS styles that works well in all locales is already difficult, and if we add support for page labels that will only further compound the issues.
 - Some PDF viewers (e.g. Adobe Reader, pdfium in Chrome) doesn't show labels in the UI by default.
2016-10-26 13:30:26 +02:00
Jonas Jenwald
47a1c7797e Update l10n files 2016-10-23 12:19:00 +02:00
Jeenu Viswambharan
f2dcacd164 Explain double-click behaviour on tool tip
The outline toggle button has a feature where it can be double-clicked
to expand/collapse all items shown therein. Although this is described
in the FAQ, can go potentially unnoticed. This, however, being a useful
feature, advertise on the tool tip itself.

l10n translation for en-US and IDs updated.

Signed-off-by: Jeenu Viswambharan <jeenuv@gmail.com>
2016-10-16 09:22:48 +01:00
Tim van der Meij
fb5aa58008 Merge pull request #7697 from yurydelendik/print-v2
Refactoring of printing code and mozPrintCallback polyfill
2016-10-11 21:22:07 +02:00
Yury Delendik
1a056caf88 Localization of the print dialog. 2016-10-11 10:08:13 -05:00
Jonas Jenwald
d7148735ba Update l10n files 2016-10-09 12:11:53 +02:00
Jonas Jenwald
9e927ded93 Update l10n files 2016-09-20 12:51:52 +02:00
Tim van der Meij
d1ca5c11ec Update translations 2016-08-28 16:14:03 +02:00
Brendan Dahl
8cf32cde6c Upstream l10n changes from Bug 1259859. 2016-08-24 09:47:36 -07:00
Jonas Jenwald
3a1e794512 Update l10n files 2016-08-06 12:44:06 +02:00
Jonas Jenwald
11381cdb0f Update l10n files 2016-07-15 11:48:37 +02:00
Jonas Jenwald
87229a086f Update mxr.mozilla.org links to point to dxr.mozilla.org instead
Given that MXR has been officially retired, see https://groups.google.com/forum/#!topic/mozilla.dev.platform/_k-ditFrne4, we've got a couple of links that are no longer working.
2016-07-06 11:42:16 +02:00
Jonas Jenwald
2e42c19202 Update l10n files 2016-06-22 09:41:18 +02:00
Jonas Jenwald
7c7d239995 Update l10n files 2016-05-29 12:47:00 +02:00