Commit dd39e1fb authored by Pino Toscano's avatar Pino Toscano
Browse files

i18n: add placeholder to KSaneOption::unitString() strings

The resulting string is set as suffix for KPluralHandlingSpinBox.
KPluralHandlingSpinBox updates its text on value change replacing the
value as placeholder/argument in the suffix string; if the
KLocalizedString suffix does not have a placeholder, there will be a
command line warning about the extra placeholder.

BUG: 370940
FIXED-IN: 20.07.80
parent aa9d22e1
......@@ -366,12 +366,12 @@ KLocalizedString KSaneOption::unitString()
{
switch (m_optDesc->unit) {
case SANE_UNIT_NONE: return KLocalizedString();
case SANE_UNIT_PIXEL: return ki18ncp("SpinBox parameter unit", " Pixel", " Pixels");
case SANE_UNIT_BIT: return ki18ncp("SpinBox parameter unit", " Bit", " Bits");
case SANE_UNIT_MM: return ki18nc("SpinBox parameter unit (Millimeter)", " mm");
case SANE_UNIT_DPI: return ki18nc("SpinBox parameter unit (Dots Per Inch)", " DPI");
case SANE_UNIT_PERCENT: return ki18nc("SpinBox parameter unit (Percentage)", " %");
case SANE_UNIT_MICROSECOND: return ki18nc("SpinBox parameter unit (Microseconds)", " µs");
case SANE_UNIT_PIXEL: return ki18ncp("SpinBox parameter unit", "%1 Pixel", "%1 Pixels");
case SANE_UNIT_BIT: return ki18ncp("SpinBox parameter unit", "%1 Bit", "%1 Bits");
case SANE_UNIT_MM: return ki18nc("SpinBox parameter unit (Millimeter)", "%1 mm");
case SANE_UNIT_DPI: return ki18nc("SpinBox parameter unit (Dots Per Inch)", "%1 DPI");
case SANE_UNIT_PERCENT: return ki18nc("SpinBox parameter unit (Percentage)", "%1 %");
case SANE_UNIT_MICROSECOND: return ki18nc("SpinBox parameter unit (Microseconds)", "%1 µs");
}
return KLocalizedString();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment