Fix translation of QtPrintSupport and QPageSize.

Add translator comments, fix spelling, reduce repetitive
messages.

Change-Id: Id4cbbc3de8fa261cf8f125c5faf735dc608e2b15
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
This commit is contained in:
Friedemann Kleint 2014-03-17 17:27:21 +01:00 committed by The Qt Project
parent 163a8d5a76
commit 513a49d62c
2 changed files with 22 additions and 10 deletions

View File

@ -1484,6 +1484,12 @@ QString QPageSize::key(QPageSize::PageSizeId pageSizeId)
return QString::fromUtf8(qt_pageSizes[pageSizeId].mediaOption);
}
static QString msgImperialPageSizeInch(int width, int height)
{
//: Page size in 'Inch'.
return QCoreApplication::translate("QPageSize", "%1 x %2 in").arg(width).arg(height);
}
/*!
Returns the localized name of the standard \a pageSizeId.
@ -1605,7 +1611,7 @@ QString QPageSize::name(QPageSize::PageSizeId pageSizeId)
case QPageSize::LetterSmall:
return QCoreApplication::translate("QPageSize", "Letter Small");
case QPageSize::TabloidExtra:
return QCoreApplication::translate("QPageSize", "Tabliod Extra");
return QCoreApplication::translate("QPageSize", "Tabloid Extra");
case QPageSize::ArchA:
return QCoreApplication::translate("QPageSize", "Architect A");
case QPageSize::ArchB:
@ -1617,23 +1623,23 @@ QString QPageSize::name(QPageSize::PageSizeId pageSizeId)
case QPageSize::ArchE:
return QCoreApplication::translate("QPageSize", "Architect E");
case QPageSize::Imperial7x9:
return QCoreApplication::translate("QPageSize", "7 x 9 in");
return msgImperialPageSizeInch(7, 9);
case QPageSize::Imperial8x10:
return QCoreApplication::translate("QPageSize", "8 x 10 in");
return msgImperialPageSizeInch(8, 10);
case QPageSize::Imperial9x11:
return QCoreApplication::translate("QPageSize", "9 x 11 in");
return msgImperialPageSizeInch(9, 11);
case QPageSize::Imperial9x12:
return QCoreApplication::translate("QPageSize", "9 x 12 in");
return msgImperialPageSizeInch(9, 12);
case QPageSize::Imperial10x11:
return QCoreApplication::translate("QPageSize", "10 x 11 in");
return msgImperialPageSizeInch(10, 11);
case QPageSize::Imperial10x13:
return QCoreApplication::translate("QPageSize", "10 x 13 in");
return msgImperialPageSizeInch(10, 13);
case QPageSize::Imperial10x14:
return QCoreApplication::translate("QPageSize", "10 x 14 in");
return msgImperialPageSizeInch(10, 14);
case QPageSize::Imperial12x11:
return QCoreApplication::translate("QPageSize", "12 x 11 in");
return msgImperialPageSizeInch(12, 11);
case QPageSize::Imperial15x11:
return QCoreApplication::translate("QPageSize", "15 x 11 in");
return msgImperialPageSizeInch(15, 11);
case QPageSize::Note:
return QCoreApplication::translate("QPageSize", "Note");
case QPageSize::Quarto:

View File

@ -412,21 +412,27 @@ void QPageSetupWidget::updateWidget()
QString suffix;
switch (m_units) {
case QPageLayout::Millimeter:
//: Unit 'Millimeter'
suffix = tr("mm");
break;
case QPageLayout::Point:
//: Unit 'Points'
suffix = tr("pt");
break;
case QPageLayout::Inch:
//: Unit 'Inch'
suffix = tr("in");
break;
case QPageLayout::Pica:
//: Unit 'Pica'
suffix = tr("");
break;
case QPageLayout::Didot:
//: Unit 'Didot'
suffix = tr("DD");
break;
case QPageLayout::Cicero:
//: Unit 'Cicero'
suffix = tr("CC");
break;
}