Skip to content

Commit 3f70c00

Browse files
committedFeb 5, 2025·
Update "viewer.php" to PDF.js 4.0.189
The "viewer.php" acts as the "viewer.html" file included in the PDF.js package. This commit updates "viewer.php" with the changes to "viewer.html" from PDF.js 3.11.174 to 4.0.189 while respecting the customized parts of "viewer.php". Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
1 parent 0440310 commit 3f70c00

File tree

1 file changed

+140
-140
lines changed

1 file changed

+140
-140
lines changed
 

‎templates/viewer.php

+140-140
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@
3939
See https://github.com/adobe-type-tools/cmap-resources
4040
-->
4141
<html dir="ltr" mozdisallowselectionprint>
42-
<head data-workersrc="<?php p($urlGenerator->linkTo('files_pdfviewer', 'js/pdfjs/build/pdf.worker.js')) ?>?v=<?php p($version) ?>"
42+
<head data-workersrc="<?php p($urlGenerator->linkTo('files_pdfviewer', 'js/pdfjs/build/pdf.worker.mjs')) ?>?v=<?php p($version) ?>"
4343
data-enableScripting="<?php p($enableScripting ? true : false) ?>"
44-
data-sandbox="<?php p($urlGenerator->linkTo('files_pdfviewer', 'js/pdfjs/build/pdf.sandbox.js'))?>"
44+
data-sandbox="<?php p($urlGenerator->linkTo('files_pdfviewer', 'js/pdfjs/build/pdf.sandbox.mjs'))?>"
4545
data-cmapurl="<?php p($urlGenerator->linkTo('files_pdfviewer', 'js/pdfjs/web/cmaps/')) ?>"
4646
data-imageresourcespath="<?php p($urlGenerator->linkTo('files_pdfviewer', 'js/pdfjs/web/images/')) ?>">
4747
<meta charset="utf-8">
@@ -57,9 +57,9 @@
5757

5858

5959
<!-- This snippet is used in production (included from viewer.html) -->
60-
<link rel="resource" type="application/l10n" href="<?php p($urlGenerator->linkTo('files_pdfviewer', 'js/pdfjs/web/locale/locale.properties')) ?>?v=<?php p($version) ?>"/>
61-
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php p($urlGenerator->linkTo('files_pdfviewer', 'js/pdfjs/build/pdf.js')) ?>?v=<?php p($version) ?>"></script>
62-
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php p($urlGenerator->linkTo('files_pdfviewer', 'js/pdfjs/web/viewer.js')) ?>?v=<?php p($version) ?>"></script>
60+
<link rel="resource" type="application/l10n" href="<?php p($urlGenerator->linkTo('files_pdfviewer', 'js/pdfjs/web/locale/locale.json')) ?>?v=<?php p($version) ?>"/>
61+
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php p($urlGenerator->linkTo('files_pdfviewer', 'js/pdfjs/build/pdf.mjs')) ?>?v=<?php p($version) ?>" type="module"></script>
62+
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php p($urlGenerator->linkTo('files_pdfviewer', 'js/pdfjs/web/viewer.mjs')) ?>?v=<?php p($version) ?>" type="module"></script>
6363
<script nonce="<?php p(\OC::$server->getContentSecurityPolicyNonceManager()->getNonce()) ?>" src="<?php p($urlGenerator->linkTo('files_pdfviewer', 'js/files_pdfviewer-workersrc.js')) ?>?v=<?php p($version) ?>"></script>
6464
</head>
6565

@@ -70,17 +70,17 @@
7070
<div id="toolbarSidebar">
7171
<div id="toolbarSidebarLeft">
7272
<div id="sidebarViewButtons" class="splitToolbarButton toggled" role="radiogroup">
73-
<button id="viewThumbnail" class="toolbarButton toggled" title="Show Thumbnails" tabindex="2" data-l10n-id="thumbs" role="radio" aria-checked="true" aria-controls="thumbnailView">
74-
<span data-l10n-id="thumbs_label">Thumbnails</span>
73+
<button id="viewThumbnail" class="toolbarButton toggled" title="Show Thumbnails" tabindex="2" data-l10n-id="pdfjs-thumbs-button" role="radio" aria-checked="true" aria-controls="thumbnailView">
74+
<span data-l10n-id="pdfjs-thumbs-button-label">Thumbnails</span>
7575
</button>
76-
<button id="viewOutline" class="toolbarButton" title="Show Document Outline (double-click to expand/collapse all items)" tabindex="3" data-l10n-id="document_outline" role="radio" aria-checked="false" aria-controls="outlineView">
77-
<span data-l10n-id="document_outline_label">Document Outline</span>
76+
<button id="viewOutline" class="toolbarButton" title="Show Document Outline (double-click to expand/collapse all items)" tabindex="3" data-l10n-id="pdfjs-document-outline-button" role="radio" aria-checked="false" aria-controls="outlineView">
77+
<span data-l10n-id="pdfjs-document-outline-button-label">Document Outline</span>
7878
</button>
79-
<button id="viewAttachments" class="toolbarButton" title="Show Attachments" tabindex="4" data-l10n-id="attachments" role="radio" aria-checked="false" aria-controls="attachmentsView">
80-
<span data-l10n-id="attachments_label">Attachments</span>
79+
<button id="viewAttachments" class="toolbarButton" title="Show Attachments" tabindex="4" data-l10n-id="pdfjs-attachments-button" role="radio" aria-checked="false" aria-controls="attachmentsView">
80+
<span data-l10n-id="pdfjs-attachments-button-label">Attachments</span>
8181
</button>
82-
<button id="viewLayers" class="toolbarButton" title="Show Layers (double-click to reset all layers to the default state)" tabindex="5" data-l10n-id="layers" role="radio" aria-checked="false" aria-controls="layersView">
83-
<span data-l10n-id="layers_label">Layers</span>
82+
<button id="viewLayers" class="toolbarButton" title="Show Layers (double-click to reset all layers to the default state)" tabindex="5" data-l10n-id="pdfjs-layers-button" role="radio" aria-checked="false" aria-controls="layersView">
83+
<span data-l10n-id="pdfjs-layers-button-label">Layers</span>
8484
</button>
8585
</div>
8686
</div>
@@ -89,8 +89,8 @@
8989
<div id="outlineOptionsContainer" class="hidden">
9090
<div class="verticalToolbarSeparator"></div>
9191

92-
<button id="currentOutlineItem" class="toolbarButton" disabled="disabled" title="Find Current Outline Item" tabindex="6" data-l10n-id="current_outline_item">
93-
<span data-l10n-id="current_outline_item_label">Current Outline Item</span>
92+
<button id="currentOutlineItem" class="toolbarButton" disabled="disabled" title="Find Current Outline Item" tabindex="6" data-l10n-id="pdfjs-current-outline-item-button">
93+
<span data-l10n-id="pdfjs-current-outline-item-button-label">Current Outline Item</span>
9494
</button>
9595
</div>
9696
</div>
@@ -111,29 +111,29 @@
111111
<div id="mainContainer">
112112
<div class="findbar hidden doorHanger" id="findbar">
113113
<div id="findbarInputContainer">
114-
<input id="findInput" class="toolbarField" title="Find" placeholder="Find in document…" tabindex="91" data-l10n-id="find_input" aria-invalid="false">
114+
<input id="findInput" class="toolbarField" title="Find" placeholder="Find in document…" tabindex="91" data-l10n-id="pdfjs-find-input" aria-invalid="false">
115115
<div class="splitToolbarButton">
116-
<button id="findPrevious" class="toolbarButton" title="Find the previous occurrence of the phrase" tabindex="92" data-l10n-id="find_previous">
117-
<span data-l10n-id="find_previous_label">Previous</span>
116+
<button id="findPrevious" class="toolbarButton" title="Find the previous occurrence of the phrase" tabindex="92" data-l10n-id="pdfjs-find-previous-button">
117+
<span data-l10n-id="pdfjs-find-previous-button-label">Previous</span>
118118
</button>
119119
<div class="splitToolbarButtonSeparator"></div>
120-
<button id="findNext" class="toolbarButton" title="Find the next occurrence of the phrase" tabindex="93" data-l10n-id="find_next">
121-
<span data-l10n-id="find_next_label">Next</span>
120+
<button id="findNext" class="toolbarButton" title="Find the next occurrence of the phrase" tabindex="93" data-l10n-id="pdfjs-find-next-button">
121+
<span data-l10n-id="pdfjs-find-next-button-label">Next</span>
122122
</button>
123123
</div>
124124
</div>
125125

126126
<div id="findbarOptionsOneContainer">
127127
<input type="checkbox" id="findHighlightAll" class="toolbarField" tabindex="94">
128-
<label for="findHighlightAll" class="toolbarLabel" data-l10n-id="find_highlight">Highlight All</label>
128+
<label for="findHighlightAll" class="toolbarLabel" data-l10n-id="pdfjs-find-highlight-checkbox">Highlight All</label>
129129
<input type="checkbox" id="findMatchCase" class="toolbarField" tabindex="95">
130-
<label for="findMatchCase" class="toolbarLabel" data-l10n-id="find_match_case_label">Match Case</label>
130+
<label for="findMatchCase" class="toolbarLabel" data-l10n-id="pdfjs-find-match-case-checkbox-label">Match Case</label>
131131
</div>
132132
<div id="findbarOptionsTwoContainer">
133133
<input type="checkbox" id="findMatchDiacritics" class="toolbarField" tabindex="96">
134-
<label for="findMatchDiacritics" class="toolbarLabel" data-l10n-id="find_match_diacritics_label">Match Diacritics</label>
134+
<label for="findMatchDiacritics" class="toolbarLabel" data-l10n-id="pdfjs-find-match-diacritics-checkbox-label">Match Diacritics</label>
135135
<input type="checkbox" id="findEntireWord" class="toolbarField" tabindex="97">
136-
<label for="findEntireWord" class="toolbarLabel" data-l10n-id="find_entire_word_label">Whole Words</label>
136+
<label for="findEntireWord" class="toolbarLabel" data-l10n-id="pdfjs-find-entire-word-checkbox-label">Whole Words</label>
137137
</div>
138138

139139
<div id="findbarMessageContainer" aria-live="polite">
@@ -145,11 +145,11 @@
145145
<div class="editorParamsToolbar hidden doorHangerRight" id="editorFreeTextParamsToolbar">
146146
<div class="editorParamsToolbarContainer">
147147
<div class="editorParamsSetter">
148-
<label for="editorFreeTextColor" class="editorParamsLabel" data-l10n-id="editor_free_text_color">Color</label>
148+
<label for="editorFreeTextColor" class="editorParamsLabel" data-l10n-id="pdfjs-editor-free-text-color-input">Color</label>
149149
<input type="color" id="editorFreeTextColor" class="editorParamsColor" tabindex="100">
150150
</div>
151151
<div class="editorParamsSetter">
152-
<label for="editorFreeTextFontSize" class="editorParamsLabel" data-l10n-id="editor_free_text_size">Size</label>
152+
<label for="editorFreeTextFontSize" class="editorParamsLabel" data-l10n-id="pdfjs-editor-free-text-size-input">Size</label>
153153
<input type="range" id="editorFreeTextFontSize" class="editorParamsSlider" value="10" min="5" max="100" step="1" tabindex="101">
154154
</div>
155155
</div>
@@ -158,116 +158,116 @@
158158
<div class="editorParamsToolbar hidden doorHangerRight" id="editorInkParamsToolbar">
159159
<div class="editorParamsToolbarContainer">
160160
<div class="editorParamsSetter">
161-
<label for="editorInkColor" class="editorParamsLabel" data-l10n-id="editor_ink_color">Color</label>
161+
<label for="editorInkColor" class="editorParamsLabel" data-l10n-id="pdfjs-editor-ink-color-input">Color</label>
162162
<input type="color" id="editorInkColor" class="editorParamsColor" tabindex="102">
163163
</div>
164164
<div class="editorParamsSetter">
165-
<label for="editorInkThickness" class="editorParamsLabel" data-l10n-id="editor_ink_thickness">Thickness</label>
165+
<label for="editorInkThickness" class="editorParamsLabel" data-l10n-id="pdfjs-editor-ink-thickness-input">Thickness</label>
166166
<input type="range" id="editorInkThickness" class="editorParamsSlider" value="1" min="1" max="20" step="1" tabindex="103">
167167
</div>
168168
<div class="editorParamsSetter">
169-
<label for="editorInkOpacity" class="editorParamsLabel" data-l10n-id="editor_ink_opacity">Opacity</label>
169+
<label for="editorInkOpacity" class="editorParamsLabel" data-l10n-id="pdfjs-editor-ink-opacity-input">Opacity</label>
170170
<input type="range" id="editorInkOpacity" class="editorParamsSlider" value="100" min="1" max="100" step="1" tabindex="104">
171171
</div>
172172
</div>
173173
</div>
174174

175175
<div class="editorParamsToolbar hidden doorHangerRight" id="editorStampParamsToolbar">
176176
<div class="editorParamsToolbarContainer">
177-
<button id="editorStampAddImage" class="secondaryToolbarButton" title="Add image" tabindex="105" data-l10n-id="editor_stamp_add_image">
178-
<span data-l10n-id="editor_stamp_add_image_label">Add image</span>
177+
<button id="editorStampAddImage" class="secondaryToolbarButton" title="Add image" tabindex="105" data-l10n-id="pdfjs-editor-stamp-add-image-button">
178+
<span data-l10n-id="pdfjs-editor-stamp-add-image-button-label">Add image</span>
179179
</button>
180180
</div>
181181
</div>
182182

183183
<div id="secondaryToolbar" class="secondaryToolbar hidden doorHangerRight">
184184
<div id="secondaryToolbarButtonContainer">
185-
<button id="secondaryOpenFile" class="secondaryToolbarButton visibleLargeView" title="Open File" tabindex="51" data-l10n-id="open_file" hidden="true">
186-
<span data-l10n-id="open_file_label">Open</span>
185+
<button id="secondaryOpenFile" class="secondaryToolbarButton visibleLargeView" title="Open File" tabindex="51" data-l10n-id="pdfjs-open-file-button" hidden="true">
186+
<span data-l10n-id="pdfjs-open-file-button-label">Open</span>
187187
</button>
188188

189-
<button id="secondaryPrint" class="secondaryToolbarButton visibleMediumView" title="Print" tabindex="52" data-l10n-id="print">
190-
<span data-l10n-id="print_label">Print</span>
189+
<button id="secondaryPrint" class="secondaryToolbarButton visibleMediumView" title="Print" tabindex="52" data-l10n-id="pdfjs-print-button">
190+
<span data-l10n-id="pdfjs-print-button-label">Print</span>
191191
</button>
192192

193-
<button id="secondaryDownload" class="secondaryToolbarButton visibleMediumView" title="Save" tabindex="53" data-l10n-id="save" hidden="true">
194-
<span data-l10n-id="save_label">Save</span>
193+
<button id="secondaryDownload" class="secondaryToolbarButton visibleMediumView" title="Save" tabindex="53" data-l10n-id="pdfjs-save-button" hidden="true">
194+
<span data-l10n-id="pdfjs-save-button-label">Save</span>
195195
</button>
196196

197197
<div class="horizontalToolbarSeparator visibleLargeView"></div>
198198

199-
<button id="presentationMode" class="secondaryToolbarButton" title="Switch to Presentation Mode" tabindex="54" data-l10n-id="presentation_mode">
200-
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
199+
<button id="presentationMode" class="secondaryToolbarButton" title="Switch to Presentation Mode" tabindex="54" data-l10n-id="pdfjs-presentation-mode-button">
200+
<span data-l10n-id="pdfjs-presentation-mode-button-label">Presentation Mode</span>
201201
</button>
202202

203-
<a href="#" id="viewBookmark" class="secondaryToolbarButton" title="Current Page (View URL from Current Page)" tabindex="55" data-l10n-id="bookmark1">
204-
<span data-l10n-id="bookmark1_label">Current Page</span>
203+
<a href="#" id="viewBookmark" class="secondaryToolbarButton" title="Current Page (View URL from Current Page)" tabindex="55" data-l10n-id="pdfjs-bookmark-button">
204+
<span data-l10n-id="pdfjs-bookmark-button-label">Current Page</span>
205205
</a>
206206

207207
<div id="viewBookmarkSeparator" class="horizontalToolbarSeparator"></div>
208208

209-
<button id="firstPage" class="secondaryToolbarButton" title="Go to First Page" tabindex="56" data-l10n-id="first_page">
210-
<span data-l10n-id="first_page_label">Go to First Page</span>
209+
<button id="firstPage" class="secondaryToolbarButton" title="Go to First Page" tabindex="56" data-l10n-id="pdfjs-first-page-button">
210+
<span data-l10n-id="pdfjs-first-page-button-label">Go to First Page</span>
211211
</button>
212-
<button id="lastPage" class="secondaryToolbarButton" title="Go to Last Page" tabindex="57" data-l10n-id="last_page">
213-
<span data-l10n-id="last_page_label">Go to Last Page</span>
212+
<button id="lastPage" class="secondaryToolbarButton" title="Go to Last Page" tabindex="57" data-l10n-id="pdfjs-last-page-button">
213+
<span data-l10n-id="pdfjs-last-page-button-label">Go to Last Page</span>
214214
</button>
215215

216216
<div class="horizontalToolbarSeparator"></div>
217217

218-
<button id="pageRotateCw" class="secondaryToolbarButton" title="Rotate Clockwise" tabindex="58" data-l10n-id="page_rotate_cw">
219-
<span data-l10n-id="page_rotate_cw_label">Rotate Clockwise</span>
218+
<button id="pageRotateCw" class="secondaryToolbarButton" title="Rotate Clockwise" tabindex="58" data-l10n-id="pdfjs-page-rotate-cw-button">
219+
<span data-l10n-id="pdfjs-page-rotate-cw-button-label">Rotate Clockwise</span>
220220
</button>
221-
<button id="pageRotateCcw" class="secondaryToolbarButton" title="Rotate Counterclockwise" tabindex="59" data-l10n-id="page_rotate_ccw">
222-
<span data-l10n-id="page_rotate_ccw_label">Rotate Counterclockwise</span>
221+
<button id="pageRotateCcw" class="secondaryToolbarButton" title="Rotate Counterclockwise" tabindex="59" data-l10n-id="pdfjs-page-rotate-ccw-button">
222+
<span data-l10n-id="pdfjs-page-rotate-ccw-button-label">Rotate Counterclockwise</span>
223223
</button>
224224

225225
<div class="horizontalToolbarSeparator"></div>
226226

227227
<div id="cursorToolButtons" role="radiogroup">
228-
<button id="cursorSelectTool" class="secondaryToolbarButton toggled" title="Enable Text Selection Tool" tabindex="60" data-l10n-id="cursor_text_select_tool" role="radio" aria-checked="true">
229-
<span data-l10n-id="cursor_text_select_tool_label">Text Selection Tool</span>
228+
<button id="cursorSelectTool" class="secondaryToolbarButton toggled" title="Enable Text Selection Tool" tabindex="60" data-l10n-id="pdfjs-cursor-text-select-tool-button" role="radio" aria-checked="true">
229+
<span data-l10n-id="pdfjs-cursor-text-select-tool-button-label">Text Selection Tool</span>
230230
</button>
231-
<button id="cursorHandTool" class="secondaryToolbarButton" title="Enable Hand Tool" tabindex="61" data-l10n-id="cursor_hand_tool" role="radio" aria-checked="false">
232-
<span data-l10n-id="cursor_hand_tool_label">Hand Tool</span>
231+
<button id="cursorHandTool" class="secondaryToolbarButton" title="Enable Hand Tool" tabindex="61" data-l10n-id="pdfjs-cursor-hand-tool-button" role="radio" aria-checked="false">
232+
<span data-l10n-id="pdfjs-cursor-hand-tool-button-label">Hand Tool</span>
233233
</button>
234234
</div>
235235

236236
<div class="horizontalToolbarSeparator"></div>
237237

238238
<div id="scrollModeButtons" role="radiogroup">
239-
<button id="scrollPage" class="secondaryToolbarButton" title="Use Page Scrolling" tabindex="62" data-l10n-id="scroll_page" role="radio" aria-checked="false">
240-
<span data-l10n-id="scroll_page_label">Page Scrolling</span>
239+
<button id="scrollPage" class="secondaryToolbarButton" title="Use Page Scrolling" tabindex="62" data-l10n-id="pdfjs-scroll-page-button" role="radio" aria-checked="false">
240+
<span data-l10n-id="pdfjs-scroll-page-button-label">Page Scrolling</span>
241241
</button>
242-
<button id="scrollVertical" class="secondaryToolbarButton toggled" title="Use Vertical Scrolling" tabindex="63" data-l10n-id="scroll_vertical" role="radio" aria-checked="true">
243-
<span data-l10n-id="scroll_vertical_label" >Vertical Scrolling</span>
242+
<button id="scrollVertical" class="secondaryToolbarButton toggled" title="Use Vertical Scrolling" tabindex="63" data-l10n-id="pdfjs-scroll-vertical-button" role="radio" aria-checked="true">
243+
<span data-l10n-id="pdfjs-scroll-vertical-button-label" >Vertical Scrolling</span>
244244
</button>
245-
<button id="scrollHorizontal" class="secondaryToolbarButton" title="Use Horizontal Scrolling" tabindex="64" data-l10n-id="scroll_horizontal" role="radio" aria-checked="false">
246-
<span data-l10n-id="scroll_horizontal_label">Horizontal Scrolling</span>
245+
<button id="scrollHorizontal" class="secondaryToolbarButton" title="Use Horizontal Scrolling" tabindex="64" data-l10n-id="pdfjs-scroll-horizontal-button" role="radio" aria-checked="false">
246+
<span data-l10n-id="pdfjs-scroll-horizontal-button-label">Horizontal Scrolling</span>
247247
</button>
248-
<button id="scrollWrapped" class="secondaryToolbarButton" title="Use Wrapped Scrolling" tabindex="65" data-l10n-id="scroll_wrapped" role="radio" aria-checked="false">
249-
<span data-l10n-id="scroll_wrapped_label">Wrapped Scrolling</span>
248+
<button id="scrollWrapped" class="secondaryToolbarButton" title="Use Wrapped Scrolling" tabindex="65" data-l10n-id="pdfjs-scroll-wrapped-button" role="radio" aria-checked="false">
249+
<span data-l10n-id="pdfjs-scroll-wrapped-button-label">Wrapped Scrolling</span>
250250
</button>
251251
</div>
252252

253253
<div class="horizontalToolbarSeparator"></div>
254254

255255
<div id="spreadModeButtons" role="radiogroup">
256-
<button id="spreadNone" class="secondaryToolbarButton toggled" title="Do not join page spreads" tabindex="66" data-l10n-id="spread_none" role="radio" aria-checked="true">
257-
<span data-l10n-id="spread_none_label">No Spreads</span>
256+
<button id="spreadNone" class="secondaryToolbarButton toggled" title="Do not join page spreads" tabindex="66" data-l10n-id="pdfjs-spread-none-button" role="radio" aria-checked="true">
257+
<span data-l10n-id="pdfjs-spread-none-button-label">No Spreads</span>
258258
</button>
259-
<button id="spreadOdd" class="secondaryToolbarButton" title="Join page spreads starting with odd-numbered pages" tabindex="67" data-l10n-id="spread_odd" role="radio" aria-checked="false">
260-
<span data-l10n-id="spread_odd_label">Odd Spreads</span>
259+
<button id="spreadOdd" class="secondaryToolbarButton" title="Join page spreads starting with odd-numbered pages" tabindex="67" data-l10n-id="pdfjs-spread-odd-button" role="radio" aria-checked="false">
260+
<span data-l10n-id="pdfjs-spread-odd-button-label">Odd Spreads</span>
261261
</button>
262-
<button id="spreadEven" class="secondaryToolbarButton" title="Join page spreads starting with even-numbered pages" tabindex="68" data-l10n-id="spread_even" role="radio" aria-checked="false">
263-
<span data-l10n-id="spread_even_label">Even Spreads</span>
262+
<button id="spreadEven" class="secondaryToolbarButton" title="Join page spreads starting with even-numbered pages" tabindex="68" data-l10n-id="pdfjs-spread-even-button" role="radio" aria-checked="false">
263+
<span data-l10n-id="pdfjs-spread-even-button-label">Even Spreads</span>
264264
</button>
265265
</div>
266266

267267
<div class="horizontalToolbarSeparator"></div>
268268

269-
<button id="documentProperties" class="secondaryToolbarButton" title="Document Properties…" tabindex="69" data-l10n-id="document_properties" aria-controls="documentPropertiesDialog">
270-
<span data-l10n-id="document_properties_label">Document Properties…</span>
269+
<button id="documentProperties" class="secondaryToolbarButton" title="Document Properties…" tabindex="69" data-l10n-id="pdfjs-document-properties-button" aria-controls="documentPropertiesDialog">
270+
<span data-l10n-id="pdfjs-document-properties-button-label">Document Properties…</span>
271271
</button>
272272
</div>
273273
</div> <!-- secondaryToolbar -->
@@ -276,83 +276,83 @@
276276
<div id="toolbarContainer">
277277
<div id="toolbarViewer">
278278
<div id="toolbarViewerLeft">
279-
<button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="11" data-l10n-id="toggle_sidebar" aria-expanded="false" aria-controls="sidebarContainer">
280-
<span data-l10n-id="toggle_sidebar_label">Toggle Sidebar</span>
279+
<button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="11" data-l10n-id="pdfjs-toggle-sidebar-button" aria-expanded="false" aria-controls="sidebarContainer">
280+
<span data-l10n-id="pdfjs-toggle-sidebar-button-label">Toggle Sidebar</span>
281281
</button>
282282
<div class="toolbarButtonSpacer"></div>
283-
<button id="viewFind" class="toolbarButton" title="Find in Document" tabindex="12" data-l10n-id="findbar" aria-expanded="false" aria-controls="findbar">
284-
<span data-l10n-id="findbar_label">Find</span>
283+
<button id="viewFind" class="toolbarButton" title="Find in Document" tabindex="12" data-l10n-id="pdfjs-findbar-button" aria-expanded="false" aria-controls="findbar">
284+
<span data-l10n-id="pdfjs-findbar-button-label">Find</span>
285285
</button>
286286
<div class="splitToolbarButton hiddenSmallView">
287-
<button class="toolbarButton" title="Previous Page" id="previous" tabindex="13" data-l10n-id="previous">
288-
<span data-l10n-id="previous_label">Previous</span>
287+
<button class="toolbarButton" title="Previous Page" id="previous" tabindex="13" data-l10n-id="pdfjs-previous-button">
288+
<span data-l10n-id="pdfjs-previous-button-label">Previous</span>
289289
</button>
290290
<div class="splitToolbarButtonSeparator"></div>
291-
<button class="toolbarButton" title="Next Page" id="next" tabindex="14" data-l10n-id="next">
292-
<span data-l10n-id="next_label">Next</span>
291+
<button class="toolbarButton" title="Next Page" id="next" tabindex="14" data-l10n-id="pdfjs-next-button">
292+
<span data-l10n-id="pdfjs-next-button-label">Next</span>
293293
</button>
294294
</div>
295-
<input type="number" id="pageNumber" class="toolbarField" title="Page" value="1" min="1" tabindex="15" data-l10n-id="page" autocomplete="off">
295+
<input type="number" id="pageNumber" class="toolbarField" title="Page" value="1" min="1" tabindex="15" data-l10n-id="pdfjs-page-input" autocomplete="off">
296296
<span id="numPages" class="toolbarLabel"></span>
297297
</div>
298298
<div id="toolbarViewerRight">
299-
<button id="openFile" class="toolbarButton hiddenLargeView" title="Open File" tabindex="31" data-l10n-id="open_file" hidden="true">
300-
<span data-l10n-id="open_file_label">Open</span>
299+
<button id="openFile" class="toolbarButton hiddenLargeView" title="Open File" tabindex="31" data-l10n-id="pdfjs-open-file-button" hidden="true">
300+
<span data-l10n-id="pdfjs-open-file-button-label">Open</span>
301301
</button>
302302

303-
<button id="print" class="toolbarButton hiddenMediumView" title="Print" tabindex="32" data-l10n-id="print">
304-
<span data-l10n-id="print_label">Print</span>
303+
<button id="print" class="toolbarButton hiddenMediumView" title="Print" tabindex="32" data-l10n-id="pdfjs-print-button">
304+
<span data-l10n-id="pdfjs-print-button-label">Print</span>
305305
</button>
306306

307-
<button id="download" class="toolbarButton hiddenMediumView" disabled="disabled" title="Save" tabindex="33" data-l10n-id="save" hidden="true">
308-
<span data-l10n-id="save_label">Save</span>
307+
<button id="download" class="toolbarButton hiddenMediumView" disabled="disabled" title="Save" tabindex="33" data-l10n-id="pdfjs-save-button" hidden="true">
308+
<span data-l10n-id="pdfjs-save-button-label">Save</span>
309309
</button>
310310

311311
<div class="verticalToolbarSeparator hiddenMediumView"></div>
312312

313313
<div id="editorModeButtons" class="splitToolbarButton toggled" role="radiogroup">
314-
<button id="editorFreeText" class="toolbarButton" disabled="disabled" title="Text" role="radio" aria-checked="false" aria-controls="editorFreeTextParamsToolbar" tabindex="34" data-l10n-id="editor_free_text2">
315-
<span data-l10n-id="editor_free_text2_label">Text</span>
314+
<button id="editorFreeText" class="toolbarButton" disabled="disabled" title="Text" role="radio" aria-checked="false" aria-controls="editorFreeTextParamsToolbar" tabindex="34" data-l10n-id="pdfjs-editor-free-text-button">
315+
<span data-l10n-id="pdfjs-editor-free-text-button-label">Text</span>
316316
</button>
317-
<button id="editorInk" class="toolbarButton" disabled="disabled" title="Draw" role="radio" aria-checked="false" aria-controls="editorInkParamsToolbar" tabindex="35" data-l10n-id="editor_ink2">
318-
<span data-l10n-id="editor_ink2_label">Draw</span>
317+
<button id="editorInk" class="toolbarButton" disabled="disabled" title="Draw" role="radio" aria-checked="false" aria-controls="editorInkParamsToolbar" tabindex="35" data-l10n-id="pdfjs-editor-ink-button">
318+
<span data-l10n-id="pdfjs-editor-ink-button-label">Draw</span>
319319
</button>
320-
<button id="editorStamp" class="toolbarButton hidden" disabled="disabled" title="Add or edit images" role="radio" aria-checked="false" aria-controls="editorStampParamsToolbar" tabindex="36" data-l10n-id="editor_stamp1">
321-
<span data-l10n-id="editor_stamp1_label">Add or edit images</span>
320+
<button id="editorStamp" class="toolbarButton" disabled="disabled" title="Add or edit images" role="radio" aria-checked="false" aria-controls="editorStampParamsToolbar" tabindex="36" data-l10n-id="pdfjs-editor-stamp-button">
321+
<span data-l10n-id="pdfjs-editor-stamp-button-label">Add or edit images</span>
322322
</button>
323323
</div>
324324

325325
<div id="editorModeSeparator" class="verticalToolbarSeparator"></div>
326326

327-
<button id="secondaryToolbarToggle" class="toolbarButton" title="Tools" tabindex="48" data-l10n-id="tools" aria-expanded="false" aria-controls="secondaryToolbar">
328-
<span data-l10n-id="tools_label">Tools</span>
327+
<button id="secondaryToolbarToggle" class="toolbarButton" title="Tools" tabindex="48" data-l10n-id="pdfjs-tools-button" aria-expanded="false" aria-controls="secondaryToolbar">
328+
<span data-l10n-id="pdfjs-tools-button-label">Tools</span>
329329
</button>
330330
</div>
331331
<div id="toolbarViewerMiddle">
332332
<div class="splitToolbarButton">
333-
<button id="zoomOut" class="toolbarButton" title="Zoom Out" tabindex="21" data-l10n-id="zoom_out">
334-
<span data-l10n-id="zoom_out_label">Zoom Out</span>
333+
<button id="zoomOut" class="toolbarButton" title="Zoom Out" tabindex="21" data-l10n-id="pdfjs-zoom-out-button">
334+
<span data-l10n-id="pdfjs-zoom-out-button-label">Zoom Out</span>
335335
</button>
336336
<div class="splitToolbarButtonSeparator"></div>
337-
<button id="zoomIn" class="toolbarButton" title="Zoom In" tabindex="22" data-l10n-id="zoom_in">
338-
<span data-l10n-id="zoom_in_label">Zoom In</span>
337+
<button id="zoomIn" class="toolbarButton" title="Zoom In" tabindex="22" data-l10n-id="pdfjs-zoom-in-button">
338+
<span data-l10n-id="pdfjs-zoom-in-button-label">Zoom In</span>
339339
</button>
340340
</div>
341341
<span id="scaleSelectContainer" class="dropdownToolbarButton">
342-
<select id="scaleSelect" title="Zoom" tabindex="23" data-l10n-id="zoom">
343-
<option id="pageAutoOption" title="" value="auto" selected="selected" data-l10n-id="page_scale_auto">Automatic Zoom</option>
344-
<option id="pageActualOption" title="" value="page-actual" data-l10n-id="page_scale_actual">Actual Size</option>
345-
<option id="pageFitOption" title="" value="page-fit" data-l10n-id="page_scale_fit">Page Fit</option>
346-
<option id="pageWidthOption" title="" value="page-width" data-l10n-id="page_scale_width">Page Width</option>
347-
<option id="customScaleOption" title="" value="custom" disabled="disabled" hidden="true"></option>
348-
<option title="" value="0.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 50 }'>50%</option>
349-
<option title="" value="0.75" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 75 }'>75%</option>
350-
<option title="" value="1" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 100 }'>100%</option>
351-
<option title="" value="1.25" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 125 }'>125%</option>
352-
<option title="" value="1.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 150 }'>150%</option>
353-
<option title="" value="2" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 200 }'>200%</option>
354-
<option title="" value="3" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 300 }'>300%</option>
355-
<option title="" value="4" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 400 }'>400%</option>
342+
<select id="scaleSelect" title="Zoom" tabindex="23" data-l10n-id="pdfjs-zoom-select">
343+
<option id="pageAutoOption" title="" value="auto" selected="selected" data-l10n-id="pdfjs-page-scale-auto">Automatic Zoom</option>
344+
<option id="pageActualOption" title="" value="page-actual" data-l10n-id="pdfjs-page-scale-actual">Actual Size</option>
345+
<option id="pageFitOption" title="" value="page-fit" data-l10n-id="pdfjs-page-scale-fit">Page Fit</option>
346+
<option id="pageWidthOption" title="" value="page-width" data-l10n-id="pdfjs-page-scale-width">Page Width</option>
347+
<option id="customScaleOption" title="" value="custom" disabled="disabled" hidden="true" data-l10n-id="pdfjs-page-scale-percent" data-l10n-args='{ "scale": 0 }'>0%</option>
348+
<option title="" value="0.5" data-l10n-id="pdfjs-page-scale-percent" data-l10n-args='{ "scale": 50 }'>50%</option>
349+
<option title="" value="0.75" data-l10n-id="pdfjs-page-scale-percent" data-l10n-args='{ "scale": 75 }'>75%</option>
350+
<option title="" value="1" data-l10n-id="pdfjs-page-scale-percent" data-l10n-args='{ "scale": 100 }'>100%</option>
351+
<option title="" value="1.25" data-l10n-id="pdfjs-page-scale-percent" data-l10n-args='{ "scale": 125 }'>125%</option>
352+
<option title="" value="1.5" data-l10n-id="pdfjs-page-scale-percent" data-l10n-args='{ "scale": 150 }'>150%</option>
353+
<option title="" value="2" data-l10n-id="pdfjs-page-scale-percent" data-l10n-args='{ "scale": 200 }'>200%</option>
354+
<option title="" value="3" data-l10n-id="pdfjs-page-scale-percent" data-l10n-args='{ "scale": 300 }'>300%</option>
355+
<option title="" value="4" data-l10n-id="pdfjs-page-scale-percent" data-l10n-args='{ "scale": 400 }'>400%</option>
356356
</select>
357357
</span>
358358
</div>
@@ -374,133 +374,133 @@
374374
<div id="dialogContainer">
375375
<dialog id="passwordDialog">
376376
<div class="row">
377-
<label for="password" id="passwordText" data-l10n-id="password_label">Enter the password to open this PDF file:</label>
377+
<label for="password" id="passwordText" data-l10n-id="pdfjs-password-label">Enter the password to open this PDF file:</label>
378378
</div>
379379
<div class="row">
380380
<input type="password" id="password" class="toolbarField">
381381
</div>
382382
<div class="buttonRow">
383-
<button id="passwordCancel" class="dialogButton"><span data-l10n-id="password_cancel">Cancel</span></button>
384-
<button id="passwordSubmit" class="dialogButton"><span data-l10n-id="password_ok">OK</span></button>
383+
<button id="passwordCancel" class="dialogButton"><span data-l10n-id="pdfjs-password-cancel-button">Cancel</span></button>
384+
<button id="passwordSubmit" class="dialogButton"><span data-l10n-id="pdfjs-password-ok-button">OK</span></button>
385385
</div>
386386
</dialog>
387387
<dialog id="documentPropertiesDialog">
388388
<div class="row">
389-
<span id="fileNameLabel" data-l10n-id="document_properties_file_name">File name:</span>
389+
<span id="fileNameLabel" data-l10n-id="pdfjs-document-properties-file-name">File name:</span>
390390
<p id="fileNameField" aria-labelledby="fileNameLabel">-</p>
391391
</div>
392392
<div class="row">
393-
<span id="fileSizeLabel" data-l10n-id="document_properties_file_size">File size:</span>
393+
<span id="fileSizeLabel" data-l10n-id="pdfjs-document-properties-file-size">File size:</span>
394394
<p id="fileSizeField" aria-labelledby="fileSizeLabel">-</p>
395395
</div>
396396
<div class="separator"></div>
397397
<div class="row">
398-
<span id="titleLabel" data-l10n-id="document_properties_title">Title:</span>
398+
<span id="titleLabel" data-l10n-id="pdfjs-document-properties-title">Title:</span>
399399
<p id="titleField" aria-labelledby="titleLabel">-</p>
400400
</div>
401401
<div class="row">
402-
<span id="authorLabel" data-l10n-id="document_properties_author">Author:</span>
402+
<span id="authorLabel" data-l10n-id="pdfjs-document-properties-author">Author:</span>
403403
<p id="authorField" aria-labelledby="authorLabel">-</p>
404404
</div>
405405
<div class="row">
406-
<span id="subjectLabel" data-l10n-id="document_properties_subject">Subject:</span>
406+
<span id="subjectLabel" data-l10n-id="pdfjs-document-properties-subject">Subject:</span>
407407
<p id="subjectField" aria-labelledby="subjectLabel">-</p>
408408
</div>
409409
<div class="row">
410-
<span id="keywordsLabel" data-l10n-id="document_properties_keywords">Keywords:</span>
410+
<span id="keywordsLabel" data-l10n-id="pdfjs-document-properties-keywords">Keywords:</span>
411411
<p id="keywordsField" aria-labelledby="keywordsLabel">-</p>
412412
</div>
413413
<div class="row">
414-
<span id="creationDateLabel" data-l10n-id="document_properties_creation_date">Creation Date:</span>
414+
<span id="creationDateLabel" data-l10n-id="pdfjs-document-properties-creation-date">Creation Date:</span>
415415
<p id="creationDateField" aria-labelledby="creationDateLabel">-</p>
416416
</div>
417417
<div class="row">
418-
<span id="modificationDateLabel" data-l10n-id="document_properties_modification_date">Modification Date:</span>
418+
<span id="modificationDateLabel" data-l10n-id="pdfjs-document-properties-modification-date">Modification Date:</span>
419419
<p id="modificationDateField" aria-labelledby="modificationDateLabel">-</p>
420420
</div>
421421
<div class="row">
422-
<span id="creatorLabel" data-l10n-id="document_properties_creator">Creator:</span>
422+
<span id="creatorLabel" data-l10n-id="pdfjs-document-properties-creator">Creator:</span>
423423
<p id="creatorField" aria-labelledby="creatorLabel">-</p>
424424
</div>
425425
<div class="separator"></div>
426426
<div class="row">
427-
<span id="producerLabel" data-l10n-id="document_properties_producer">PDF Producer:</span>
427+
<span id="producerLabel" data-l10n-id="pdfjs-document-properties-producer">PDF Producer:</span>
428428
<p id="producerField" aria-labelledby="producerLabel">-</p>
429429
</div>
430430
<div class="row">
431-
<span id="versionLabel" data-l10n-id="document_properties_version">PDF Version:</span>
431+
<span id="versionLabel" data-l10n-id="pdfjs-document-properties-version">PDF Version:</span>
432432
<p id="versionField" aria-labelledby="versionLabel">-</p>
433433
</div>
434434
<div class="row">
435-
<span id="pageCountLabel" data-l10n-id="document_properties_page_count">Page Count:</span>
435+
<span id="pageCountLabel" data-l10n-id="pdfjs-document-properties-page-count">Page Count:</span>
436436
<p id="pageCountField" aria-labelledby="pageCountLabel">-</p>
437437
</div>
438438
<div class="row">
439-
<span id="pageSizeLabel" data-l10n-id="document_properties_page_size">Page Size:</span>
439+
<span id="pageSizeLabel" data-l10n-id="pdfjs-document-properties-page-size">Page Size:</span>
440440
<p id="pageSizeField" aria-labelledby="pageSizeLabel">-</p>
441441
</div>
442442
<div class="separator"></div>
443443
<div class="row">
444-
<span id="linearizedLabel" data-l10n-id="document_properties_linearized">Fast Web View:</span>
444+
<span id="linearizedLabel" data-l10n-id="pdfjs-document-properties-linearized">Fast Web View:</span>
445445
<p id="linearizedField" aria-labelledby="linearizedLabel">-</p>
446446
</div>
447447
<div class="buttonRow">
448-
<button id="documentPropertiesClose" class="dialogButton"><span data-l10n-id="document_properties_close">Close</span></button>
448+
<button id="documentPropertiesClose" class="dialogButton"><span data-l10n-id="pdfjs-document-properties-close-button">Close</span></button>
449449
</div>
450450
</dialog>
451451
<dialog id="altTextDialog" aria-labelledby="dialogLabel" aria-describedby="dialogDescription">
452452
<div id="altTextContainer">
453453
<div id="overallDescription">
454-
<span id="dialogLabel" data-l10n-id="editor_alt_text_dialog_label" class="title">Choose an option</span>
455-
<span id="dialogDescription" data-l10n-id="editor_alt_text_dialog_description">
454+
<span id="dialogLabel" data-l10n-id="pdfjs-editor-alt-text-dialog-label" class="title">Choose an option</span>
455+
<span id="dialogDescription" data-l10n-id="pdfjs-editor-alt-text-dialog-description">
456456
Alt text (alternative text) helps when people can’t see the image or when it doesn’t load.
457457
</span>
458458
</div>
459459
<div id="addDescription">
460460
<div class="radio">
461461
<div class="radioButton">
462462
<input type="radio" id="descriptionButton" name="altTextOption" tabindex="0" aria-describedby="descriptionAreaLabel" checked>
463-
<label for="descriptionButton" data-l10n-id="editor_alt_text_add_description_label">Add a description</label>
463+
<label for="descriptionButton" data-l10n-id="pdfjs-editor-alt-text-add-description-label">Add a description</label>
464464
</div>
465465
<div class="radioLabel">
466-
<span id="descriptionAreaLabel" data-l10n-id="editor_alt_text_add_description_description">
466+
<span id="descriptionAreaLabel" data-l10n-id="pdfjs-editor-alt-text-add-description-description">
467467
Aim for 1-2 sentences that describe the subject, setting, or actions.
468468
</span>
469469
</div>
470470
</div>
471471
<div class="descriptionArea">
472-
<textarea id="descriptionTextarea" placeholder="For example, “A young man sits down at a table to eat a meal”" aria-labelledby="descriptionAreaLabel" data-l10n-id="editor_alt_text_textarea" tabindex="0"></textarea>
472+
<textarea id="descriptionTextarea" placeholder="For example, “A young man sits down at a table to eat a meal”" aria-labelledby="descriptionAreaLabel" data-l10n-id="pdfjs-editor-alt-text-textarea" tabindex="0"></textarea>
473473
</div>
474474
</div>
475475
<div id="markAsDecorative">
476476
<div class="radio">
477477
<div class="radioButton">
478478
<input type="radio" id="decorativeButton" name="altTextOption" aria-describedby="decorativeLabel">
479-
<label for="decorativeButton" data-l10n-id="editor_alt_text_mark_decorative_label">Mark as decorative</label>
479+
<label for="decorativeButton" data-l10n-id="pdfjs-editor-alt-text-mark-decorative-label">Mark as decorative</label>
480480
</div>
481481
<div class="radioLabel">
482-
<span id="decorativeLabel" data-l10n-id="editor_alt_text_mark_decorative_description">
482+
<span id="decorativeLabel" data-l10n-id="pdfjs-editor-alt-text-mark-decorative-description">
483483
This is used for ornamental images, like borders or watermarks.
484484
</span>
485485
</div>
486486
</div>
487487
</div>
488488
<div id="buttons">
489-
<button id="altTextCancel" tabindex="0"><span data-l10n-id="editor_alt_text_cancel_button">Cancel</span></button>
490-
<button id="altTextSave" tabindex="0"><span data-l10n-id="editor_alt_text_save_button">Save</span></button>
489+
<button id="altTextCancel" tabindex="0"><span data-l10n-id="pdfjs-editor-alt-text-cancel-button">Cancel</span></button>
490+
<button id="altTextSave" tabindex="0"><span data-l10n-id="pdfjs-editor-alt-text-save-button">Save</span></button>
491491
</div>
492492
</div>
493493
</dialog>
494494
<dialog id="printServiceDialog" style="min-width: 200px;">
495495
<div class="row">
496-
<span data-l10n-id="print_progress_message">Preparing document for printing…</span>
496+
<span data-l10n-id="pdfjs-print-progress-message">Preparing document for printing…</span>
497497
</div>
498498
<div class="row">
499499
<progress value="0" max="100"></progress>
500-
<span data-l10n-id="print_progress_percent" data-l10n-args='{ "progress": 0 }' class="relative-progress">0%</span>
500+
<span data-l10n-id="pdfjs-print-progress-percent" data-l10n-args='{ "progress": 0 }' class="relative-progress">0%</span>
501501
</div>
502502
<div class="buttonRow">
503-
<button id="printCancel" class="dialogButton"><span data-l10n-id="print_progress_close">Cancel</span></button>
503+
<button id="printCancel" class="dialogButton"><span data-l10n-id="pdfjs-print-progress-close-button">Cancel</span></button>
504504
</div>
505505
</dialog>
506506
</div> <!-- dialogContainer -->

0 commit comments

Comments
 (0)
Please sign in to comment.