Commit 236837cf authored by Karl Ove Hufthammer's avatar Karl Ove Hufthammer

Make percentage suffix localisable in a bunch of places

In some languages, the percentage suffix is written differently
than in English, often with a (non-breaking) space between the
number and the percentage sign (e.g. ‘75 %’).
parent 687d954e
...@@ -106,7 +106,7 @@ KisDlgLayerProperties::KisDlgLayerProperties(KisNodeList nodes, KisViewManager * ...@@ -106,7 +106,7 @@ KisDlgLayerProperties::KisDlgLayerProperties(KisNodeList nodes, KisViewManager *
connect(d->page->editName, SIGNAL(textChanged(QString)), SLOT(slotNameValueChangedExternally())); connect(d->page->editName, SIGNAL(textChanged(QString)), SLOT(slotNameValueChangedExternally()));
d->page->intOpacity->setRange(0, 100); d->page->intOpacity->setRange(0, 100);
d->page->intOpacity->setSuffix("%"); d->page->intOpacity->setSuffix(i18n("%"));
d->opacityProperty.reset(new KisMultinodeOpacityProperty(nodes)); d->opacityProperty.reset(new KisMultinodeOpacityProperty(nodes));
d->opacityProperty->connectIgnoreCheckBox(d->page->chkOpacity); d->opacityProperty->connectIgnoreCheckBox(d->page->chkOpacity);
d->opacityProperty->connectAutoEnableWidget(d->page->intOpacity); d->opacityProperty->connectAutoEnableWidget(d->page->intOpacity);
......
...@@ -251,7 +251,7 @@ KisPaintopBox::KisPaintopBox(KisViewManager *view, QWidget *parent, const char * ...@@ -251,7 +251,7 @@ KisPaintopBox::KisPaintopBox(KisViewManager *view, QWidget *parent, const char *
slOpacity->setRange(0, 100, 0); slOpacity->setRange(0, 100, 0);
slOpacity->setValue(100); slOpacity->setValue(100);
slOpacity->setSingleStep(5); slOpacity->setSingleStep(5);
slOpacity->setSuffix("%"); slOpacity->setSuffix(i18n("%"));
slOpacity->setMinimumWidth(qMax(sliderWidth, slOpacity->sizeHint().width())); slOpacity->setMinimumWidth(qMax(sliderWidth, slOpacity->sizeHint().width()));
slOpacity->setFixedHeight(iconsize); slOpacity->setFixedHeight(iconsize);
slOpacity->setBlockUpdateSignalOnDrag(true); slOpacity->setBlockUpdateSignalOnDrag(true);
...@@ -259,7 +259,7 @@ KisPaintopBox::KisPaintopBox(KisViewManager *view, QWidget *parent, const char * ...@@ -259,7 +259,7 @@ KisPaintopBox::KisPaintopBox(KisViewManager *view, QWidget *parent, const char *
slFlow->setRange(0, 100, 0); slFlow->setRange(0, 100, 0);
slFlow->setValue(100); slFlow->setValue(100);
slFlow->setSingleStep(5); slFlow->setSingleStep(5);
slFlow->setSuffix("%"); slFlow->setSuffix(i18n("%"));
slFlow->setMinimumWidth(qMax(sliderWidth, slFlow->sizeHint().width())); slFlow->setMinimumWidth(qMax(sliderWidth, slFlow->sizeHint().width()));
slFlow->setFixedHeight(iconsize); slFlow->setFixedHeight(iconsize);
slFlow->setBlockUpdateSignalOnDrag(true); slFlow->setBlockUpdateSignalOnDrag(true);
......
...@@ -94,7 +94,7 @@ KisCustomImageWidget::KisCustomImageWidget(QWidget* parent, qint32 defWidth, qin ...@@ -94,7 +94,7 @@ KisCustomImageWidget::KisCustomImageWidget(QWidget* parent, qint32 defWidth, qin
sliderOpacity->setRange(0, 100, 0); sliderOpacity->setRange(0, 100, 0);
sliderOpacity->setValue(100); sliderOpacity->setValue(100);
sliderOpacity->setSuffix("%"); sliderOpacity->setSuffix(i18n("%"));
connect(cmbPredefined, SIGNAL(activated(int)), SLOT(predefinedClicked(int))); connect(cmbPredefined, SIGNAL(activated(int)), SLOT(predefinedClicked(int)));
connect(doubleResolution, SIGNAL(valueChanged(double)), connect(doubleResolution, SIGNAL(valueChanged(double)),
......
...@@ -155,7 +155,7 @@ QWidget* KisIntegerColorInput::createInput() ...@@ -155,7 +155,7 @@ QWidget* KisIntegerColorInput::createInput()
m_colorSlider->setMinimum(0); m_colorSlider->setMinimum(0);
if (m_usePercentage) { if (m_usePercentage) {
m_intNumInput->setSuffix("%"); m_intNumInput->setSuffix(i18n("%"));
} else { } else {
m_intNumInput->setSuffix(""); m_intNumInput->setSuffix("");
} }
...@@ -198,7 +198,7 @@ void KisIntegerColorInput::setPercentageWise(bool val) ...@@ -198,7 +198,7 @@ void KisIntegerColorInput::setPercentageWise(bool val)
m_usePercentage = val; m_usePercentage = val;
if (m_usePercentage) { if (m_usePercentage) {
m_intNumInput->setSuffix("%"); m_intNumInput->setSuffix(i18n("%"));
} else { } else {
m_intNumInput->setSuffix(""); m_intNumInput->setSuffix("");
} }
......
...@@ -53,7 +53,7 @@ OnionSkinsDocker::OnionSkinsDocker(QWidget *parent) : ...@@ -53,7 +53,7 @@ OnionSkinsDocker::OnionSkinsDocker(QWidget *parent) :
ui->doubleTintFactor->setMinimum(0); ui->doubleTintFactor->setMinimum(0);
ui->doubleTintFactor->setMaximum(100); ui->doubleTintFactor->setMaximum(100);
ui->doubleTintFactor->setPrefix(i18n("Tint: ")); ui->doubleTintFactor->setPrefix(i18n("Tint: "));
ui->doubleTintFactor->setSuffix("%"); ui->doubleTintFactor->setSuffix(i18n("%"));
ui->btnBackwardColor->setToolTip(i18n("Tint color for past frames")); ui->btnBackwardColor->setToolTip(i18n("Tint color for past frames"));
ui->btnForwardColor->setToolTip(i18n("Tint color for future frames")); ui->btnForwardColor->setToolTip(i18n("Tint color for future frames"));
......
...@@ -229,7 +229,7 @@ TimelineFramesView::TimelineFramesView(QWidget *parent) ...@@ -229,7 +229,7 @@ TimelineFramesView::TimelineFramesView(QWidget *parent)
m_d->volumeSlider = new KisSliderSpinBox(this); m_d->volumeSlider = new KisSliderSpinBox(this);
m_d->volumeSlider->setRange(0, 100); m_d->volumeSlider->setRange(0, 100);
m_d->volumeSlider->setSuffix("%"); m_d->volumeSlider->setSuffix(i18n("%"));
m_d->volumeSlider->setPrefix(i18nc("@item:inmenu, slider", "Volume:")); m_d->volumeSlider->setPrefix(i18nc("@item:inmenu, slider", "Volume:"));
m_d->volumeSlider->setSingleStep(1); m_d->volumeSlider->setSingleStep(1);
m_d->volumeSlider->setPageStep(10); m_d->volumeSlider->setPageStep(10);
......
...@@ -194,7 +194,7 @@ LayerBox::LayerBox() ...@@ -194,7 +194,7 @@ LayerBox::LayerBox()
m_wdgLayerBox->doubleOpacity->setPrefix(QString("%1: ").arg(i18n("Opacity"))); m_wdgLayerBox->doubleOpacity->setPrefix(QString("%1: ").arg(i18n("Opacity")));
} }
m_wdgLayerBox->doubleOpacity->setRange(0, 100, 0); m_wdgLayerBox->doubleOpacity->setRange(0, 100, 0);
m_wdgLayerBox->doubleOpacity->setSuffix("%"); m_wdgLayerBox->doubleOpacity->setSuffix(i18n("%"));
connect(m_wdgLayerBox->doubleOpacity, SIGNAL(valueChanged(qreal)), SLOT(slotOpacitySliderMoved(qreal))); connect(m_wdgLayerBox->doubleOpacity, SIGNAL(valueChanged(qreal)), SLOT(slotOpacitySliderMoved(qreal)));
connect(&m_opacityDelayTimer, SIGNAL(timeout()), SLOT(slotOpacityChanged())); connect(&m_opacityDelayTimer, SIGNAL(timeout()), SLOT(slotOpacityChanged()));
......
...@@ -227,9 +227,9 @@ KisWdgOptionsJPEG::KisWdgOptionsJPEG(QWidget *parent) ...@@ -227,9 +227,9 @@ KisWdgOptionsJPEG::KisWdgOptionsJPEG(QWidget *parent)
metaDataFilters->setModel(&m_filterRegistryModel); metaDataFilters->setModel(&m_filterRegistryModel);
qualityLevel->setRange(0, 100, 0); qualityLevel->setRange(0, 100, 0);
qualityLevel->setSuffix("%"); qualityLevel->setSuffix(i18n("%"));
smoothLevel->setRange(0, 100, 0); smoothLevel->setRange(0, 100, 0);
smoothLevel->setSuffix("%"); smoothLevel->setSuffix(i18n("%"));
} }
......
...@@ -68,7 +68,7 @@ KisBrushSizeOption::KisBrushSizeOption() ...@@ -68,7 +68,7 @@ KisBrushSizeOption::KisBrushSizeOption()
m_options->densityBox->setRange(0.0, 100.0, 0); m_options->densityBox->setRange(0.0, 100.0, 0);
m_options->densityBox->setValue(100); m_options->densityBox->setValue(100);
m_options->densityBox->setSuffix("%"); m_options->densityBox->setSuffix(i18n("%"));
m_options->jitterMove->setRange(0.0, 5.0, 2); m_options->jitterMove->setRange(0.0, 5.0, 2);
......
...@@ -42,19 +42,19 @@ KisHairyInkOption::KisHairyInkOption() ...@@ -42,19 +42,19 @@ KisHairyInkOption::KisHairyInkOption()
// init values for slider // init values for slider
m_options->pressureSlider->setRange(0.0, 100, 0); m_options->pressureSlider->setRange(0.0, 100, 0);
m_options->pressureSlider->setValue(50); m_options->pressureSlider->setValue(50);
m_options->pressureSlider->setSuffix("%"); m_options->pressureSlider->setSuffix(i18n("%"));
m_options->bristleLengthSlider->setRange(0, 100, 0); m_options->bristleLengthSlider->setRange(0, 100, 0);
m_options->bristleLengthSlider->setValue(50); m_options->bristleLengthSlider->setValue(50);
m_options->bristleLengthSlider->setSuffix("%"); m_options->bristleLengthSlider->setSuffix(i18n("%"));
m_options->bristleInkAmountSlider->setRange(0, 100, 0); m_options->bristleInkAmountSlider->setRange(0, 100, 0);
m_options->bristleInkAmountSlider->setValue(50); m_options->bristleInkAmountSlider->setValue(50);
m_options->bristleInkAmountSlider->setSuffix("%"); m_options->bristleInkAmountSlider->setSuffix(i18n("%"));
m_options->inkDepletionSlider->setRange(0, 100, 0); m_options->inkDepletionSlider->setRange(0, 100, 0);
m_options->inkDepletionSlider->setValue(50); m_options->inkDepletionSlider->setValue(50);
m_options->inkDepletionSlider->setSuffix("%"); m_options->inkDepletionSlider->setSuffix(i18n("%"));
connect(m_options->inkAmountSpinBox, SIGNAL(valueChanged(int)), SLOT(emitSettingChanged())); connect(m_options->inkAmountSpinBox, SIGNAL(valueChanged(int)), SLOT(emitSettingChanged()));
......
...@@ -106,7 +106,7 @@ KisAutoBrushWidget::KisAutoBrushWidget(QWidget *parent, const char* name) ...@@ -106,7 +106,7 @@ KisAutoBrushWidget::KisAutoBrushWidget(QWidget *parent, const char* name)
density->setRange(0, 100, 0); density->setRange(0, 100, 0);
density->setSingleStep(1); density->setSingleStep(1);
density->setValue(100); density->setValue(100);
density->setSuffix("%"); density->setSuffix(i18n("%"));
density->setBlockUpdateSignalOnDrag(true); density->setBlockUpdateSignalOnDrag(true);
connect(density, SIGNAL(valueChanged(qreal)), m_updateCompressor.data(), SLOT(start())); connect(density, SIGNAL(valueChanged(qreal)), m_updateCompressor.data(), SLOT(start()));
......
...@@ -49,7 +49,7 @@ KisFlowOpacityOptionWidget::KisFlowOpacityOptionWidget(): ...@@ -49,7 +49,7 @@ KisFlowOpacityOptionWidget::KisFlowOpacityOptionWidget():
m_opacitySlider->setRange(0.0, 100.0, 0); m_opacitySlider->setRange(0.0, 100.0, 0);
m_opacitySlider->setValue(100); m_opacitySlider->setValue(100);
m_opacitySlider->setPrefix("Opacity: "); m_opacitySlider->setPrefix("Opacity: ");
m_opacitySlider->setSuffix("%"); m_opacitySlider->setSuffix(i18n("%"));
setConfigurationPage(widget); setConfigurationPage(widget);
......
...@@ -47,11 +47,11 @@ KisSketchOpOption::KisSketchOpOption() ...@@ -47,11 +47,11 @@ KisSketchOpOption::KisSketchOpOption()
m_options->offsetSPBox->setRange(0.0, 200.0, 0); m_options->offsetSPBox->setRange(0.0, 200.0, 0);
m_options->offsetSPBox->setValue(30.0); m_options->offsetSPBox->setValue(30.0);
m_options->offsetSPBox->setSuffix("%"); m_options->offsetSPBox->setSuffix(i18n("%"));
m_options->densitySPBox->setRange(0.0, 100.0, 0); m_options->densitySPBox->setRange(0.0, 100.0, 0);
m_options->densitySPBox->setValue(50.0); m_options->densitySPBox->setValue(50.0);
m_options->densitySPBox->setSuffix("%"); m_options->densitySPBox->setSuffix(i18n("%"));
connect(m_options->offsetSPBox, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged())); connect(m_options->offsetSPBox, SIGNAL(valueChanged(qreal)), SLOT(emitSettingChanged()));
......
...@@ -137,8 +137,8 @@ void KisSprayShapeOption::changeSizeUI(bool proportionalSize) ...@@ -137,8 +137,8 @@ void KisSprayShapeOption::changeSizeUI(bool proportionalSize)
} }
else { else {
m_options->widthSpin->setMaximum(100); m_options->widthSpin->setMaximum(100);
m_options->widthSpin->setSuffix("%"); m_options->widthSpin->setSuffix(i18n("%"));
m_options->heightSpin->setMaximum(100); m_options->heightSpin->setMaximum(100);
m_options->heightSpin->setSuffix("%"); m_options->heightSpin->setSuffix(i18n("%"));
} }
} }
...@@ -57,7 +57,7 @@ KisSprayOpOption::KisSprayOpOption() ...@@ -57,7 +57,7 @@ KisSprayOpOption::KisSprayOpOption()
m_options->coverageSpin->setRange(0.001, 0.02, 3); m_options->coverageSpin->setRange(0.001, 0.02, 3);
m_options->coverageSpin->setValue(0.003); m_options->coverageSpin->setValue(0.003);
m_options->coverageSpin->setSuffix("%"); m_options->coverageSpin->setSuffix(i18n("%"));
m_options->particlesSpinBox->setRange(1.0, 1000.0, 0); m_options->particlesSpinBox->setRange(1.0, 1000.0, 0);
m_options->particlesSpinBox->setValue(12); m_options->particlesSpinBox->setValue(12);
......
...@@ -49,11 +49,11 @@ KisTangentTiltOption::KisTangentTiltOption() ...@@ -49,11 +49,11 @@ KisTangentTiltOption::KisTangentTiltOption()
m_options->sliderElevationSensitivity->setRange(0, 100, 0); m_options->sliderElevationSensitivity->setRange(0, 100, 0);
m_options->sliderElevationSensitivity->setValue(100); m_options->sliderElevationSensitivity->setValue(100);
m_options->sliderElevationSensitivity->setSuffix("%"); m_options->sliderElevationSensitivity->setSuffix(i18n("%"));
m_options->sliderMixValue->setRange(0, 100, 0); m_options->sliderMixValue->setRange(0, 100, 0);
m_options->sliderMixValue->setValue(50); m_options->sliderMixValue->setValue(50);
m_options->sliderMixValue->setSuffix("%"); m_options->sliderMixValue->setSuffix(i18n("%"));
connect(m_options->comboRed, SIGNAL(currentIndexChanged(int)), SLOT(emitSettingChanged())); connect(m_options->comboRed, SIGNAL(currentIndexChanged(int)), SLOT(emitSettingChanged()));
connect(m_options->comboGreen, SIGNAL(currentIndexChanged(int)), SLOT(emitSettingChanged())); connect(m_options->comboGreen, SIGNAL(currentIndexChanged(int)), SLOT(emitSettingChanged()));
......
...@@ -517,25 +517,25 @@ QList<QPointer<QWidget> > KarbonFilterEffectsTool::createOptionWidgets() ...@@ -517,25 +517,25 @@ QList<QPointer<QWidget> > KarbonFilterEffectsTool::createOptionWidgets()
QGridLayout *filterRegionLayout = new QGridLayout(filterRegionWidget); QGridLayout *filterRegionLayout = new QGridLayout(filterRegionWidget);
d->posX = new KisDoubleParseSpinBox(filterRegionWidget); d->posX = new KisDoubleParseSpinBox(filterRegionWidget);
d->posX->setSuffix("%"); d->posX->setSuffix(i18n("%"));
connect(d->posX, SIGNAL(valueChanged(double)), this, SLOT(regionXChanged(double))); connect(d->posX, SIGNAL(valueChanged(double)), this, SLOT(regionXChanged(double)));
filterRegionLayout->addWidget(new QLabel(i18n("X:")), 0, 0); filterRegionLayout->addWidget(new QLabel(i18n("X:")), 0, 0);
filterRegionLayout->addWidget(d->posX, 0, 1); filterRegionLayout->addWidget(d->posX, 0, 1);
d->posY = new KisDoubleParseSpinBox(filterRegionWidget); d->posY = new KisDoubleParseSpinBox(filterRegionWidget);
d->posY->setSuffix("%"); d->posY->setSuffix(i18n("%"));
connect(d->posY, SIGNAL(valueChanged(double)), this, SLOT(regionYChanged(double))); connect(d->posY, SIGNAL(valueChanged(double)), this, SLOT(regionYChanged(double)));
filterRegionLayout->addWidget(new QLabel(i18n("Y:")), 1, 0); filterRegionLayout->addWidget(new QLabel(i18n("Y:")), 1, 0);
filterRegionLayout->addWidget(d->posY, 1, 1); filterRegionLayout->addWidget(d->posY, 1, 1);
d->posW = new KisDoubleParseSpinBox(filterRegionWidget); d->posW = new KisDoubleParseSpinBox(filterRegionWidget);
d->posW->setSuffix("%"); d->posW->setSuffix(i18n("%"));
connect(d->posW, SIGNAL(valueChanged(double)), this, SLOT(regionWidthChanged(double))); connect(d->posW, SIGNAL(valueChanged(double)), this, SLOT(regionWidthChanged(double)));
filterRegionLayout->addWidget(new QLabel(i18n("W:")), 0, 2); filterRegionLayout->addWidget(new QLabel(i18n("W:")), 0, 2);
filterRegionLayout->addWidget(d->posW, 0, 3); filterRegionLayout->addWidget(d->posW, 0, 3);
d->posH = new KisDoubleParseSpinBox(filterRegionWidget); d->posH = new KisDoubleParseSpinBox(filterRegionWidget);
d->posH->setSuffix("%"); d->posH->setSuffix(i18n("%"));
connect(d->posH, SIGNAL(valueChanged(double)), this, SLOT(regionHeightChanged(double))); connect(d->posH, SIGNAL(valueChanged(double)), this, SLOT(regionHeightChanged(double)));
filterRegionLayout->addWidget(new QLabel(i18n("H:")), 1, 2); filterRegionLayout->addWidget(new QLabel(i18n("H:")), 1, 2);
filterRegionLayout->addWidget(d->posH, 1, 3); filterRegionLayout->addWidget(d->posH, 1, 3);
......
...@@ -1184,7 +1184,7 @@ void SvgTextEditor::createActions() ...@@ -1184,7 +1184,7 @@ void SvgTextEditor::createActions()
spnLineHeight->setToolTip(i18n("Line height")); spnLineHeight->setToolTip(i18n("Line height"));
spnLineHeight->setRange(0.0, 1000.0); spnLineHeight->setRange(0.0, 1000.0);
spnLineHeight->setSingleStep(10.0); spnLineHeight->setSingleStep(10.0);
spnLineHeight->setSuffix("%"); spnLineHeight->setSuffix(i18n("%"));
connect(spnLineHeight, SIGNAL(valueChanged(double)), SLOT(setLineHeight(double))); connect(spnLineHeight, SIGNAL(valueChanged(double)), SLOT(setLineHeight(double)));
lineHeight->setDefaultWidget(spnLineHeight); lineHeight->setDefaultWidget(spnLineHeight);
actionCollection()->addAction("svg_line_height", lineHeight); actionCollection()->addAction("svg_line_height", lineHeight);
......
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