diff --git a/l10n/en-US/viewer.properties b/l10n/en-US/viewer.properties index a20f72219..324e843ba 100644 --- a/l10n/en-US/viewer.properties +++ b/l10n/en-US/viewer.properties @@ -92,10 +92,12 @@ document_properties_page_count=Page Count: document_properties_page_size=Page Size: document_properties_page_size_unit_inches=in document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=portrait +document_properties_page_size_orientation_landscape=landscape # LOCALIZATION NOTE (document_properties_page_size_dimension_string): -# "{{width}}", "{{height}}", and {{unit}} will be replaced by the size, -# respectively their unit of measurement, of the (current) page. -document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) document_properties_close=Close print_progress_message=Preparing document for printing… diff --git a/l10n/sv-SE/viewer.properties b/l10n/sv-SE/viewer.properties index 59f4a99d3..b31720635 100644 --- a/l10n/sv-SE/viewer.properties +++ b/l10n/sv-SE/viewer.properties @@ -92,10 +92,12 @@ document_properties_page_count=Sidantal: document_properties_page_size=Sidstorlek: document_properties_page_size_unit_inches=tum document_properties_page_size_unit_millimeters=mm +document_properties_page_size_orientation_portrait=stående +document_properties_page_size_orientation_landscape=liggande # LOCALIZATION NOTE (document_properties_page_size_dimension_string): -# "{{width}}", "{{height}}", and {{unit}} will be replaced by the size, -# respectively their unit of measurement, of the (current) page. -document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} +# "{{width}}", "{{height}}", {{unit}}, and {{orientation}} will be replaced by +# the size, respectively their unit of measurement and orientation, of the (current) page. +document_properties_page_size_dimension_string={{width}} × {{height}} {{unit}} ({{orientation}}) document_properties_close=Stäng print_progress_message=Förbereder sidor för utskrift… diff --git a/web/pdf_document_properties.js b/web/pdf_document_properties.js index f65a10656..9513014f3 100644 --- a/web/pdf_document_properties.js +++ b/web/pdf_document_properties.js @@ -14,7 +14,8 @@ */ import { - cloneObj, getPageSizeInches, getPDFFileNameFromURL, NullL10n + cloneObj, getPageSizeInches, getPDFFileNameFromURL, isPortraitOrientation, + NullL10n } from './ui_utils'; import { createPromiseCapability } from 'pdfjs-lib'; @@ -266,6 +267,7 @@ class PDFDocumentProperties { height: pageSizeInches.width, }; } + const isPortrait = isPortraitOrientation(pageSizeInches); const sizeInches = { width: Math.round(pageSizeInches.width * 100) / 100, @@ -282,12 +284,16 @@ class PDFDocumentProperties { this.l10n.get('document_properties_page_size_unit_' + (this._isNonMetricLocale ? 'inches' : 'millimeters'), null, this._isNonMetricLocale ? 'in' : 'mm'), - ]).then(([{ width, height, }, unit]) => { + this.l10n.get('document_properties_page_size_orientation_' + + (isPortrait ? 'portrait' : 'landscape'), null, + isPortrait ? 'portrait' : 'landscape'), + ]).then(([{ width, height, }, unit, orientation]) => { return this.l10n.get('document_properties_page_size_dimension_string', { width: width.toLocaleString(), height: height.toLocaleString(), unit, - }, '{{width}} × {{height}} {{unit}}'); + orientation, + }, '{{width}} × {{height}} {{unit}} ({{orientation}})'); }); }