Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(812)

Unified Diff: chrome/browser/resources/print_preview.js

Issue 7187027: Different Print Preview string when printing to PDF. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/print_preview.js
diff --git a/chrome/browser/resources/print_preview.js b/chrome/browser/resources/print_preview.js
index 52e96e37aaadc2c59cb1b559f9c942ba7c3c246d..91f7306de021d944547c19c8dbddb9663c985932 100644
--- a/chrome/browser/resources/print_preview.js
+++ b/chrome/browser/resources/print_preview.js
@@ -787,29 +787,35 @@ function updatePrintSummary() {
var pageSet = getSelectedPagesSet();
var numOfSheets = pageSet.length;
- var sheetsLabel = localStrings.getString('printPreviewSheetsLabelSingular');
+ var summaryLabel = localStrings.getString('printPreviewSheetsLabelSingular');
var numOfPagesText = '';
- var pagesLabel = '';
+ var pagesLabel = localStrings.getString('printPreviewPageLabelPlural');
+
+ if (printToPDF)
+ summaryLabel = localStrings.getString('printPreviewPageLabelSingular');
if (!printToPDF && isTwoSided())
numOfSheets = Math.ceil(numOfSheets / 2);
numOfSheets *= copies;
- if (numOfSheets > 1)
- sheetsLabel = localStrings.getString('printPreviewSheetsLabelPlural');
+ if (numOfSheets > 1) {
+ if (printToPDF)
+ summaryLabel = pagesLabel;
+ else
+ summaryLabel = localStrings.getString('printPreviewSheetsLabelPlural');
+ }
var html = '';
if (pageSet.length * copies != numOfSheets) {
numOfPagesText = pageSet.length * copies;
- pagesLabel = localStrings.getString('printPreviewPageLabelPlural');
html = localStrings.getStringF('printPreviewSummaryFormatLong',
'<b>' + numOfSheets + '</b>',
- '<b>' + sheetsLabel + '</b>',
+ '<b>' + summaryLabel + '</b>',
numOfPagesText, pagesLabel);
} else
html = localStrings.getStringF('printPreviewSummaryFormatShort',
'<b>' + numOfSheets + '</b>',
- '<b>' + sheetsLabel + '</b>');
+ '<b>' + summaryLabel + '</b>');
// Removing extra spaces from within the string.
html = html.replace(/\s{2,}/g, ' ');
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698