Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit f7514355 authored by Agata Cacko's avatar Agata Cacko

Add context to i18n in fill tool and selection tool

Before this commit, translators could be confused what is the string
about. This commit adds contexts to every translated string so it should
be clear how to translate it into other languages.
parent 28ae5ece
......@@ -257,16 +257,18 @@ void KisSelectionOptions::slotSampleLayersModeChanged(int index)
QString KisSelectionOptions::sampleLayerModeToUserString(QString sampleLayersModeId)
{
QString currentLayer = i18nc("Option in selection tool: take only the current layer into account when calculating the selection", "Current Layer");
if (sampleLayersModeId == SAMPLE_LAYERS_MODE_CURRENT) {
return i18n("Current Layer");
return currentLayer;
} else if (sampleLayersModeId == SAMPLE_LAYERS_MODE_ALL) {
return i18n("All Layers");
return i18nc("Option in selection tool: take all layers (merged) into account when calculating the selection", "All Layers");
} else if (sampleLayersModeId == SAMPLE_LAYERS_MODE_COLOR_LABELED) {
return i18n("Color Labeled Layers");
return i18nc("Option in selection tool: take all layers that were marked with specific color labels (more precisely, all of them merged) "
"into account when calculating the selection", "Color Labeled Layers");
}
KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE(false, i18n("Current Layer"));
return i18n("Current Layer");
KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE(false, currentLayer);
return currentLayer;
}
void KisSelectionOptions::setCmbSampleLayersMode(QString sampleLayersModeId)
......
......@@ -255,7 +255,10 @@ QWidget* KisToolFill::createOptionWidget()
m_checkUsePattern = new QCheckBox(QString(), widget);
m_checkUsePattern->setToolTip(i18n("When checked do not use the foreground color, but the pattern selected to fill with"));
QLabel *lbl_sampleLayers = new QLabel(i18n("Sample:"), widget);
QLabel *lbl_sampleLayers = new QLabel(i18nc("This is a label before a combobox with different choices regarding which layers "
"to take into considerationg when calculating the area to fill. "
"Options together with the label are: /Sample current layer/ /Sample all layers/ "
"/Sample color labeled layers/. Sample is a verb here and means something akin to 'take into account'.", "Sample:"), widget);
m_cmbSampleLayersMode = new QComboBox(widget);
m_cmbSampleLayersMode->addItem(sampleLayerModeToUserString(SAMPLE_LAYERS_MODE_CURRENT), SAMPLE_LAYERS_MODE_CURRENT);
m_cmbSampleLayersMode->addItem(sampleLayerModeToUserString(SAMPLE_LAYERS_MODE_ALL), SAMPLE_LAYERS_MODE_ALL);
......@@ -336,16 +339,18 @@ void KisToolFill::updateGUI()
QString KisToolFill::sampleLayerModeToUserString(QString sampleLayersModeId)
{
QString currentLayer = i18nc("Option in fill tool: take only the current layer into account when calculating the area to fill", "Current Layer");
if (sampleLayersModeId == SAMPLE_LAYERS_MODE_CURRENT) {
return i18n("Current Layer");
return currentLayer;
} else if (sampleLayersModeId == SAMPLE_LAYERS_MODE_ALL) {
return i18n("All Layers");
return i18nc("Option in fill tool: take all layers (merged) into account when calculating the area to fill", "All Layers");
} else if (sampleLayersModeId == SAMPLE_LAYERS_MODE_COLOR_LABELED) {
return i18n("Color Labeled Layers");
return i18nc("Option in fill tool: take all layers that were labeled with a color label (more precisely: all those layers merged)"
" into account when calculating the area to fill", "Color Labeled Layers");
}
KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE(false, i18n("Current Layer"));
return i18n("Current Layer");
KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE(false, currentLayer);
return currentLayer;
}
void KisToolFill::setCmbSampleLayersMode(QString sampleLayersModeId)
......
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