Commit Graph

26 Commits

Author SHA1 Message Date
Jonas Jenwald
e696589a09 Update l10n files 2017-06-05 12:45:42 +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
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
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
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
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
7c7d239995 Update l10n files 2016-05-29 12:47:00 +02:00
Yury Delendik
17780dab31 Import l10n. 2015-12-26 22:37:07 -06:00
Jonas Jenwald
eff28eef3c Update l10n files 2015-10-19 18:15:22 +02:00
Yury Delendik
ec7bab651b Import L10n files. 2015-02-26 17:41:03 -06:00
Yury Delendik
3b9a78d3d8 Merge pull request #5416 from Snuffleupagus/percent-sign-l10n
Allow localization of the placement of percent signs in the zoom box
2014-11-11 08:30:07 -06:00
Yury Delendik
ade8dccb73 Import L10n 2014-11-11 08:27:54 -06:00
Jonas Jenwald
2505c8613b Allow localization of the placement of percent signs in the zoom box 2014-10-21 21:41:06 +02:00
Yury Delendik
bd1c7be0cb Import L10n 2014-07-23 10:48:49 -05:00
Jonas Jenwald
a4b71f9c35 Re-add Attachment strings to the Swedish l10n 2014-06-12 23:09:44 +02:00
Tim van der Meij
446bc9cf8b Imports most recent l10n files 2014-06-12 22:01:13 +02:00
Jonas Jenwald
bd1cfbe8a9 Add Attachment strings to the Swedish l10n 2014-04-19 01:01:28 +02:00
Tim van der Meij
eda3fbe994 Importing all locales from mozilla-aurora, keeping our own metadata.inc files 2014-03-26 23:48:04 +01:00
Jonas Jenwald
730e536b90 Add Document Properties to the Swedish l10n 2014-01-23 11:35:39 +01:00
Jonas Jenwald
1bba4d6da3 Move the Swedish l10n 2014-01-13 18:42:48 +01:00