[kde-doc-english] [kxstitch] src: Added context to some strings to clarify meaning
Steve Allewell
steve.allewell at gmail.com
Sun Jul 13 15:41:13 UTC 2014
Git commit f5da5078ff7b4115a619eb1fcc679bb1e9404be2 by Steve Allewell.
Committed on 13/07/2014 at 15:40.
Pushed by sallewell into branch 'master'.
Added context to some strings to clarify meaning
GUI: Added context to some strings to clarify meaning
M +1 -1 src/CalibrateFlossDlg.cpp
M +1 -1 src/Element.cpp
M +1 -1 src/ImportImageDlg.cpp
M +1 -1 src/Palette.cpp
M +4 -4 src/PrintSetupDlg.cpp
http://commits.kde.org/kxstitch/f5da5078ff7b4115a619eb1fcc679bb1e9404be2
diff --git a/src/CalibrateFlossDlg.cpp b/src/CalibrateFlossDlg.cpp
index a04fc93..68c2847 100644
--- a/src/CalibrateFlossDlg.cpp
+++ b/src/CalibrateFlossDlg.cpp
@@ -120,7 +120,7 @@ void CalibrateFlossDlg::updateSample()
void CalibrateFlossDlg::updateName(bool modified)
{
- KLocalizedString str = modified ? ki18n("%1-%2 (Modified)") : ki18n("%1-%2");
+ KLocalizedString str = modified ? ki18nc("%1 is floss name, %2 is floss description", "%1-%2 (Modified)") : ki18nc("%1 is floss name, %2 is floss description", "%1-%2");
ui.SelectedColorName->setText(str.subs(m_item->data(Qt::UserRole).toString()).subs(m_item->data(Qt::UserRole + 1).toString()).toString());
}
diff --git a/src/Element.cpp b/src/Element.cpp
index 840aea3..4012e6a 100644
--- a/src/Element.cpp
+++ b/src/Element.cpp
@@ -560,7 +560,7 @@ void KeyElement::render(Document *document, QPainter *painter) const
painter->setFont(font);
- painter->drawText(deviceTextArea.topLeft() + QPoint(0, y), i18n("%1 Flosses", scheme->schemeName()));
+ painter->drawText(deviceTextArea.topLeft() + QPoint(0, y), i18nc("%1 is a scheme name", "%1 Flosses", scheme->schemeName()));
y += (2 * lineSpacing);
if (m_symbolColumn) {
diff --git a/src/ImportImageDlg.cpp b/src/ImportImageDlg.cpp
index 191e00b..89ac113 100644
--- a/src/ImportImageDlg.cpp
+++ b/src/ImportImageDlg.cpp
@@ -209,7 +209,7 @@ void ImportImageDlg::clothCountChanged(double horizontalClothCount, double verti
QString formattedSizeWidth = QString("%1").arg(preferredSizeWidth, 0, 'g', 3);
QString formattedSizeHeight = QString("%1").arg(preferredSizeHeight, 0, 'g', 3);
// TODO is there a better way of representing the dimensional values below for correct translations.
- ui.FinalSize->setText(QString(i18nc("dimension with units identifier", "%1 x %2 %3", QString("%1").arg(preferredSizeWidth, 0, 'g', 3), QString("%1").arg(preferredSizeHeight, 0, 'g', 3), suffix)));
+ ui.FinalSize->setText(QString(i18nc("%1 width, %2 height and %3 units", "%1 x %2 %3", QString("%1").arg(preferredSizeWidth, 0, 'g', 3), QString("%1").arg(preferredSizeHeight, 0, 'g', 3), suffix)));
}
diff --git a/src/Palette.cpp b/src/Palette.cpp
index 81499fb..bce3f0c 100644
--- a/src/Palette.cpp
+++ b/src/Palette.cpp
@@ -257,7 +257,7 @@ bool Palette::event(QEvent *event)
FlossScheme *flossScheme = SchemeManager::scheme(m_document->pattern()->palette().schemeName());
Floss *floss = flossScheme->find(documentFloss->flossName());
FlossUsage flossUsage = m_document->pattern()->stitches().flossUsage()[m_paletteIndex[i]];
- QString tip = i18np("%2 %3\n%1 Stitch", "%2 %3\n%1 Stitches", flossUsage.stitchCount() + flossUsage.backstitchCount, floss->name(), floss->description());
+ QString tip = i18ncp("%1 is the number of stitches of a particular floss, %2 is the floss name and %3 the floss description", "%2 %3\n%1 Stitch", "%2 %3\n%1 Stitches", flossUsage.stitchCount() + flossUsage.backstitchCount, floss->name(), floss->description());
QToolTip::showText(helpEvent->globalPos(), tip);
} else {
QToolTip::hideText();
diff --git a/src/PrintSetupDlg.cpp b/src/PrintSetupDlg.cpp
index 1f1d9ab..b163a88 100644
--- a/src/PrintSetupDlg.cpp
+++ b/src/PrintSetupDlg.cpp
@@ -486,13 +486,13 @@ void PrintSetupDlg::on_Templates_clicked()
element = new TextElement(page, QRect(printableArea.topLeft() + QPoint(20, 60 + printableArea.height() / 3 + 5), QSize(printableArea.width() - 40, 60)));
static_cast<TextElement *>(element)->setAlignment(Qt::AlignTop | Qt::AlignLeft);
- static_cast<TextElement *>(element)->setText(i18n("Created by ${author}\n(C) ${copyright}\n\nPattern Size: ${width.stitches} x ${height.stitches}\nFlosses from the ${scheme} range."));
+ static_cast<TextElement *>(element)->setText(i18nc("Do not translate elements in ${...} which are substituted by properties", "Created by ${author}\n(C) ${copyright}\n\nPattern Size: ${width.stitches} x ${height.stitches}\nFlosses from the ${scheme} range."));
page->addElement(element);
element = new TextElement(page, pageNumberArea);
static_cast<TextElement *>(element)->setTextFont(pageFont);
static_cast<TextElement *>(element)->setAlignment(Qt::AlignCenter);
- static_cast<TextElement *>(element)->setText(i18n("Page ${page}"));
+ static_cast<TextElement *>(element)->setText(i18nc("Do not translate elements in ${...} which are substituted by properties", "Page ${page}"));
page->addElement(element);
// pattern sheets
@@ -546,7 +546,7 @@ void PrintSetupDlg::on_Templates_clicked()
element = new TextElement(page, pageNumberArea);
static_cast<TextElement *>(element)->setTextFont(pageFont);
static_cast<TextElement *>(element)->setAlignment(Qt::AlignCenter);
- static_cast<TextElement *>(element)->setText(i18n("Page ${page}"));
+ static_cast<TextElement *>(element)->setText(i18nc("Do not translate elements in ${...} which are substituted by properties", "Page ${page}"));
page->addElement(element);
}
}
@@ -568,7 +568,7 @@ void PrintSetupDlg::on_Templates_clicked()
element = new TextElement(page, pageNumberArea);
static_cast<TextElement *>(element)->setTextFont(titleFont);
static_cast<TextElement *>(element)->setAlignment(Qt::AlignCenter);
- static_cast<TextElement *>(element)->setText(i18n("Page ${page}"));
+ static_cast<TextElement *>(element)->setText(i18nc("Do not translate elements in ${...} which are substituted by properties", "Page ${page}"));
page->addElement(element);
for (int i = 0 ; i < ui.Pages->count() ; ++i) {
More information about the kde-doc-english
mailing list