1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-25 01:28:06 +02:00
Commit graph

632 commits

Author SHA1 Message Date
Tim van der Meij
cfbbf61dd9
Update translations to the most recent versions 2024-11-12 20:36:16 +01:00
Tim van der Meij
3854ab5efd
Update translations to the most recent versions 2024-11-02 20:21:59 +01:00
Jonas Jenwald
ee812b5df2 [Editor] Utilize Fluent "better" when localizing the AltText
Currently we manually localize and update the DOM-elements of the AltText-button, and it seems nicer to utilize Fluent "properly" for that task.
This can be achieved by introducing an explicit `span`-element on the AltText-button (similar to e.g. the regular toolbar-buttons), and adding a few more l10n-strings, since that allows just setting the `data-l10n-id`-attribute on all the relevant DOM-elements.

Finally, note how we no longer need to localize any strings eagerly when initializing the various editors.
2024-10-28 17:19:02 +01:00
Calixte Denizet
c0c527266d Add a comment in l10n file for the non-standard attribute default-content 2024-10-23 15:12:52 +02:00
Jonas Jenwald
2ef3fd2a81 Simplify localization of the "default-content" in FreeText editors
By using "data-l10n-attrs" it's possible to instruct Fluent to localize *custom* attributes, which means that we don't need to manually translate/update the "default-content" in FreeText editors.
2024-10-20 18:46:44 +02:00
Tim van der Meij
ccfb8a20c2
Update translations to the most recent versions 2024-10-20 15:59:03 +02:00
Tim van der Meij
e6a413d201
Update translations to the most recent versions 2024-10-06 12:43:07 +02:00
Francesco Lodolo
58d31479d7
Fluent: remove NUMBER() function from variant selector 2024-10-04 07:14:45 +02:00
Tim van der Meij
ed100f2ef2
Update translations to the most recent versions 2024-09-22 20:27:10 +02:00
Francesco Lodolo
6e1b4d63e7
Fluent: use explicit NUMBER() in plural variants 2024-09-12 16:53:18 +02:00
Tim van der Meij
2f2d74ba5c
Update translations to the most recent versions 2024-09-09 19:51:21 +02:00
Tim van der Meij
8084ae2054
Update translations to the most recent versions 2024-09-01 19:59:22 +02:00
Jonas Jenwald
bcc511119e Update l10n files
Given the recent l10n-id changes, let's do one more update before the next release to avoid "broken" translations.
2024-08-31 11:17:38 +02:00
Jonas Jenwald
ac75a05cd4 [Editor] Utilize Fluent "better" when localizing the resizer DOM-elements
Currently we manually localize and update the DOM-elements of the editor-resizers, and it seems nicer to utilize Fluent for that task.
This can be achieved by updating the l10n-strings to directly target the `aria-label` and then just setting the `data-l10n-id` on the DOM-elements.
2024-08-26 21:32:02 +02:00
Tim van der Meij
cd99be0aa5
Merge pull request #18638 from Snuffleupagus/PDFDocumentProperties-l10n-functions
Utilize Fluent to format numbers and dates in `PDFDocumentProperties`/`AnnotationLayer`
2024-08-25 12:44:15 +02:00
Jonas Jenwald
6ce9f97943 Utilize Fluent to format dates in the AnnotationLayer
The `AnnotationLayer` may not display correctly formatted data in PopupAnnotations, especially in the GENERIC viewer, since it's using native methods[1] that depend on the *browser* locale instead of the viewer locale as intended.
With Fluent we're able to improve things since it's got built-in support for formatting dates. Not only does this simplify the JavaScript code slightly, but it also gives the localizer more fine-grained control of the desired output.

Please find additional information here:
 - https://projectfluent.org/fluent/guide/builtins.html
 - https://projectfluent.org/fluent/guide/functions.html

---

[1] `toLocaleDateString`, and `toLocaleTimeString`.
2024-08-25 12:11:02 +02:00
Jonas Jenwald
d96558836e Utilize Fluent to format numbers and dates in PDFDocumentProperties
The `PDFDocumentProperties` dialog may not display correctly formatted data, especially in the GENERIC viewer, since it's using native methods[1] that depend on the *browser* locale instead of the viewer locale as intended.
At the time when this dialog was introduced that was probably all we could easily do, but with Fluent we're able to improve things since it's got built-in support for formatting numbers and dates. Not only does this simplify the JavaScript code, but it also gives the localizer more fine-grained control of the desired output.

Please find additional information here:
 - https://projectfluent.org/fluent/guide/builtins.html
 - https://projectfluent.org/fluent/guide/functions.html

---

[1] `toLocaleString`, `toLocaleDateString`, and `toLocaleTimeString`.
2024-08-25 12:11:02 +02:00
Tim van der Meij
bf778b04a8
Update translations to the most recent versions 2024-08-25 11:40:42 +02:00
Tim van der Meij
0aada51568
Update translations to the most recent versions 2024-08-15 19:52:03 +02:00
Calixte Denizet
fc602c65c0 [Editor] Update the disclaimer string in the new alt-text dialog (bug 1911738)
And tweak the css in order to take into account that disclaimer can be on two (or more lines).
2024-08-06 10:17:18 +02:00
Calixte Denizet
63d0fa5733 [Editor] Fix l10n issues
Remove the strings containing only a variable.
2024-08-02 10:36:18 +02:00
Calixte Denizet
32d09276f0 [Editor] Add a new dialog for alt-text settings (bug 1909604)
This patch adds a new entry in the secondary menu in order to open a dialog to let the user:
 - disables the alt-text generation thanks to a ML model;
 - deletes the alt-text model downloaded in Firefox;
 - disabled the new alt-text flow.
2024-08-01 21:34:50 +02:00
Calixte Denizet
ed22d934e5 Implement the new alt text flow (bug 1909604)
For the Firefox pdf viewer, we want to use AI to guess an alt-text when adding an image to a pdf.
For now the telemtry stuff is not implemented and will come soon.
In order to test it locally:
 - set enableAltText, enableFakeMLManager and enableUpdatedAddImage to true.
or in Firefox:
 - set browser.ml.enable, pdfjs.enableAltText and pdfjs.enableUpdatedAddImage to true.
2024-07-29 14:31:47 +02:00
Tim van der Meij
4e8a015a78
Update translations to the most recent versions 2024-07-02 18:29:19 +02:00
Tim van der Meij
a89c700607
Update translations to the most recent versions 2024-06-21 17:11:30 +02:00
Tim van der Meij
e0a01328f3
Update translations to the most recent versions 2024-06-11 15:13:06 +02:00
Tim van der Meij
ea0d2126ea
Update translations to the most recent versions 2024-05-28 19:25:46 +02:00
Tim van der Meij
af5d7908fe
Update translations to the most recent versions 2024-05-23 16:02:20 +02:00
Tim van der Meij
b0dbacd0e1
Update translations to the most recent versions 2024-05-14 16:26:34 +02:00
Tim van der Meij
9dcb2b3844
Update translations to the most recent versions 2024-04-29 19:57:19 +02:00
Tim van der Meij
7affc7efa1
Update translations to the most recent versions 2024-04-19 14:57:04 +02:00
Tim van der Meij
ac7bd17cf8
Update translations to the most recent versions 2024-04-11 19:48:32 +02:00
Tim van der Meij
cecbcd126f
Update translations to the most recent versions 2024-04-03 14:43:26 +02:00
Tim van der Meij
01a68def44
Update translations to the most recent versions 2024-03-26 16:32:53 +01:00
Calixte Denizet
63c1c787b4 [Editor] Add a label to the highight floating button readable with NVDA (bug 1886964) 2024-03-23 16:12:03 +01:00
Jonas Jenwald
601bf580f9 Update l10n files 2024-03-17 13:52:15 +01:00
Calixte Denizet
b4267cd294 [Editor] Add a floating button close to the selected text to highlight it (bug 1867742)
For now keep this feature behind a pref in order to make some experiments before
deciding to enable it.
2024-03-12 15:06:46 +01:00
Jonas Jenwald
ea4b55a0e6 Update l10n files 2024-03-08 10:09:51 +01:00
Calixte Denizet
39aeea3e94 [Editor] Add a toggle button to show/hide all the highlights (bug 1867740) 2024-03-07 13:16:59 +01:00
Calixte Denizet
3cb58f84a2 [GeckoView] Remove the open-in-app button (bug 1832519) 2024-03-04 19:32:12 +01:00
Tim van der Meij
43cdc1ca8a
Update translations to the most recent versions 2024-02-17 16:00:18 +01:00
Tim van der Meij
b278a74b6b
Update translations to the most recent versions 2024-02-10 19:04:46 +01:00
Tim van der Meij
f103f277ac
Update translations to the most recent versions 2024-01-27 19:13:06 +01:00
Calixte Denizet
0432d1e8e6 [Editor] Add a tooltip to the slider to set the thickness of free highlights 2024-01-26 18:34:26 +01:00
Calixte Denizet
2b8ecf5688 [Editor] Add the possibility to change the thickness of a free highlight (bug 1876096) 2024-01-24 22:04:39 +01:00
Jonas Jenwald
2dd6910aa4 Update l10n files 2024-01-20 09:54:21 +01:00
Calixte Denizet
7580770aac Update l10n files 2024-01-14 21:18:58 +01:00
Jonas Jenwald
2cb93cc344 Update l10n files 2024-01-06 10:10:22 +01:00
Jonas Jenwald
0324187734 Update l10n files 2023-12-23 12:32:00 +01:00
Calixte Denizet
eff8b2c67b [Editor] Add some missing strings to localize for highlighting 2023-12-12 19:57:38 +01:00