forked from qt-creator/qt-creator
I10N: First translation fixes for 2.1
Fix README, some spelling errors, remove contractions, exclamation marks, correct some plural forms, join split messages. Add QCoreApplication::translate to non-Q_OBJECT-classes. Fix some lupdate warnings about discarding meta-data (//:).
This commit is contained in:
@@ -252,23 +252,27 @@ bool FilterSettingsPage::matches(const QString &s) const
|
||||
return m_searchKeywords.contains(s, Qt::CaseInsensitive);
|
||||
}
|
||||
|
||||
QString FilterSettingsPage::msgFilterLabel(const QString &filter) const
|
||||
{
|
||||
if (m_filterMap.keys().isEmpty())
|
||||
return tr("No user defined filters available or no filter selected.");
|
||||
|
||||
const QStringList &checkedList = m_filterMap.value(filter);
|
||||
if (checkedList.isEmpty())
|
||||
return tr("The filter \"%1\" will show every documentation file"
|
||||
" available, as no attributes are specified.").arg(filter);
|
||||
|
||||
if (checkedList.size() == 1)
|
||||
return tr("The filter \"%1\" will only show documentation files that"
|
||||
" have the attribute %2 specified.").
|
||||
arg(filter, checkedList.first());
|
||||
|
||||
return tr("The filter \"%1\" will only show documentation files that"
|
||||
" have the attributes %2 specified.").
|
||||
arg(filter, checkedList.join(QLatin1String(", ")));
|
||||
}
|
||||
|
||||
void FilterSettingsPage::updateFilterDescription(const QString &filter)
|
||||
{
|
||||
const QStringList &checkedList = m_filterMap.value(filter);
|
||||
if (!m_filterMap.keys().isEmpty()) {
|
||||
const QString prefix = tr("The filter \"%1\" will").arg(filter);
|
||||
if (checkedList.isEmpty()) {
|
||||
m_ui.label->setText(prefix + tr(" show every documentation file "
|
||||
"available, as no attributes are specified."));
|
||||
} else if (checkedList.count() == 1) {
|
||||
m_ui.label->setText(prefix + tr(" only show documentation files that"
|
||||
" have the attribute %2 specified.").arg(checkedList.first()));
|
||||
} else {
|
||||
m_ui.label->setText(prefix + tr(" only show documentation files that"
|
||||
" have the attributes %2 specified.").arg(checkedList.join(", ")));
|
||||
}
|
||||
} else {
|
||||
m_ui.label->setText(tr("No user defined filters available or no filter "
|
||||
"selected."));
|
||||
}
|
||||
m_ui.label->setText(msgFilterLabel(filter));
|
||||
}
|
||||
|
||||
@@ -69,6 +69,7 @@ private:
|
||||
void updateFilterDescription(const QString &filter);
|
||||
|
||||
private:
|
||||
QString msgFilterLabel(const QString &filter) const;
|
||||
Ui::FilterSettingsPage m_ui;
|
||||
|
||||
FilterMap m_filterMap;
|
||||
|
||||
Reference in New Issue
Block a user