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 d8f5642d authored by Alexander Potashev's avatar Alexander Potashev

Fix i18n in "Save" section of configuration dialog

Test Plan: tested with Russian spectacle.po

Reviewers: ngraham, davidre, #spectacle

Reviewed By: ngraham, #spectacle

Subscribers: yurchor, #spectacle

Tags: #spectacle

Differential Revision: https://phabricator.kde.org/D19914
parent 6b9bd358
......@@ -514,15 +514,35 @@ void ExportManager::doPrint(QPrinter *printer)
return;
}
const QMap<QString, QString> ExportManager::filenamePlaceholders {
{QStringLiteral("%Y"), i18nc("A placeholder in the user configurable filename will replaced by the specified value","Year (4 digit)")},
{QStringLiteral("%y"), i18nc("A placeholder in the user configurable filename will replaced by the specified value","Year (2 digit)")},
{QStringLiteral("%M"), i18nc("A placeholder in the user configurable filename will replaced by the specified value","Month")},
{QStringLiteral("%D"), i18nc("A placeholder in the user configurable filename will replaced by the specified value","Day")},
{QStringLiteral("%H"), i18nc("A placeholder in the user configurable filename will replaced by the specified value","Hour")},
{QStringLiteral("%m"), i18nc("A placeholder in the user configurable filename will replaced by the specified value","Minute")},
{QStringLiteral("%S"), i18nc("A placeholder in the user configurable filename will replaced by the specified value","Second")},
{QStringLiteral("%T"), i18nc("A placeholder in the user configurable filename will replaced by the specified value","Window Title")},
{QStringLiteral("%d"), i18nc("A placeholder in the user configurable filename will replaced by the specified value","Sequential numbering")},
{QStringLiteral("%Nd"), i18nc("A placeholder in the user configurable filename will replaced by the specified value","Sequential numbering, padded out to N digits")},
const QMap<QString, const char*> ExportManager::filenamePlaceholders {
{QStringLiteral("%Y"), I18N_NOOP2(
"A placeholder in the user configurable filename will replaced by the specified value",
"Year (4 digit)")},
{QStringLiteral("%y"), I18N_NOOP2(
"A placeholder in the user configurable filename will replaced by the specified value",
"Year (2 digit)")},
{QStringLiteral("%M"), I18N_NOOP2(
"A placeholder in the user configurable filename will replaced by the specified value",
"Month")},
{QStringLiteral("%D"), I18N_NOOP2(
"A placeholder in the user configurable filename will replaced by the specified value",
"Day")},
{QStringLiteral("%H"), I18N_NOOP2(
"A placeholder in the user configurable filename will replaced by the specified value",
"Hour")},
{QStringLiteral("%m"), I18N_NOOP2(
"A placeholder in the user configurable filename will replaced by the specified value",
"Minute")},
{QStringLiteral("%S"), I18N_NOOP2(
"A placeholder in the user configurable filename will replaced by the specified value",
"Second")},
{QStringLiteral("%T"), I18N_NOOP2(
"A placeholder in the user configurable filename will replaced by the specified value",
"Window Title")},
{QStringLiteral("%d"), I18N_NOOP2(
"A placeholder in the user configurable filename will replaced by the specified value",
"Sequential numbering")},
{QStringLiteral("%Nd"), I18N_NOOP2(
"A placeholder in the user configurable filename will replaced by the specified value",
"Sequential numbering, padded out to N digits")},
};
......@@ -68,7 +68,7 @@ class ExportManager : public QObject
ImageGrabber::GrabMode grabMode() const;
void setGrabMode(const ImageGrabber::GrabMode &grabMode);
static const QMap<QString, QString> filenamePlaceholders;
static const QMap<QString, const char*> filenamePlaceholders;
Q_SIGNALS:
......
......@@ -130,7 +130,9 @@ SaveOptionsPage::SaveOptionsPage(QWidget *parent) :
);
for (auto option = ExportManager::filenamePlaceholders.cbegin();
option != ExportManager::filenamePlaceholders.cend(); ++option) {
helpText += QStringLiteral("<a href=%1>%1</a>: %2<br>").arg(option.key(), option.value());
helpText += QStringLiteral("<a href=%1>%1</a>: %2<br>").arg(
option.key(),
i18nc("A placeholder in the user configurable filename will replaced by the specified value", option.value()));
}
helpText += QStringLiteral("<a href='/'>/</a>: ") + i18n("To save to a sub-folder");
helpText += QStringLiteral("</blockquote>");
......
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