Browse Source

Localization of the print dialog.

Yury Delendik 9 years ago
parent
commit
1a056caf88
  1. 6
      l10n/en-US/viewer.properties
  2. 4
      web/pdf_print_service.js
  3. 6
      web/viewer.html

6
l10n/en-US/viewer.properties

@ -88,6 +88,12 @@ document_properties_version=PDF Version: @@ -88,6 +88,12 @@ document_properties_version=PDF Version:
document_properties_page_count=Page Count:
document_properties_close=Close
print_progress_message=Preparing document for printing…
# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
# a numerical per cent value.
print_progress_percent={{progress}}%
print_progress_close=Cancel
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)

4
web/pdf_print_service.js

@ -28,6 +28,7 @@ @@ -28,6 +28,7 @@
root.pdfjsWebOverlayManager, root.pdfjsWebApp, root.pdfjsWebPDFJS);
}
}(this, function (exports, uiUtils, overlayManager, app, pdfjsLib) {
var mozL10n = uiUtils.mozL10n;
var CSS_UNITS = uiUtils.CSS_UNITS;
var PDFPrintServiceFactory = app.PDFPrintServiceFactory;
var OverlayManager = overlayManager.OverlayManager;
@ -235,7 +236,8 @@ @@ -235,7 +236,8 @@
var progressBar = progressContainer.querySelector('progress');
var progressPerc = progressContainer.querySelector('.relative-progress');
progressBar.value = progress;
progressPerc.textContent = progress + '%';
progressPerc.textContent = mozL10n.get('print_progress_percent',
{progress: progress}, progress + '%');
}
var hasAttachEvent = !!document.attachEvent;

6
web/viewer.html

@ -364,14 +364,14 @@ See https://github.com/adobe-type-tools/cmap-resources @@ -364,14 +364,14 @@ See https://github.com/adobe-type-tools/cmap-resources
<div id="printServiceOverlay" class="container hidden">
<div class="dialog">
<div class="row">
<span>Preparing document for printing...</span>
<span data-l10n-id="print_progress_message">Preparing document for printing</span>
</div>
<div class="row">
<progress value="0" max="100"></progress>
<span class="relative-progress">0%</span>
<span data-l10n-id="print_progress_percent" data-l10n-args='{ "progress": 0 }' class="relative-progress">0%</span>
</div>
<div class="buttonRow">
<button id="printCancel" class="overlayButton"><span>Cancel</span></button>
<button id="printCancel" class="overlayButton"><span data-l10n-id="print_progress_close">Cancel</span></button>
</div>
</div>
</div>

Loading…
Cancel
Save