mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kdecore: drop redundant "emphasis" markup tag
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
f8e1de3728
commit
f56c50e41a
4 changed files with 6 additions and 34 deletions
|
@ -245,7 +245,6 @@ class KLocalizedStringPrivate;
|
|||
* the process depending on wheather the message is rich text or not. Currently, the following HTML
|
||||
* tags are recognized in the message:
|
||||
* \li filename
|
||||
* \li emphasis
|
||||
* \li email
|
||||
* \li title
|
||||
* \li warning
|
||||
|
|
|
@ -34,10 +34,6 @@ KuitSemantics::KuitSemantics(const QString &lang)
|
|||
format.plain = m_catalog.translate("@filename/plain", "‘%1’");
|
||||
format.rich = m_catalog.translate("@filename/rich", "<tt>%1</tt>");
|
||||
m_formats.append(format);
|
||||
format.tag = QString::fromLatin1("emphasis");
|
||||
format.plain = m_catalog.translate("@emphasis/plain", "*%1*");
|
||||
format.rich = m_catalog.translate("@emphasis/rich", "<i>%1</i>");
|
||||
m_formats.append(format);
|
||||
format.tag = QString::fromLatin1("email");
|
||||
format.plain = m_catalog.translate("@email/plain", "<%1>");
|
||||
format.rich = m_catalog.translate("@email/rich", "<<a href=\"mailto:%1\">%1</a>>");
|
||||
|
|
|
@ -146,31 +146,27 @@ void KLocalizedStringTest::correctSubs ()
|
|||
QString("<html>E < mc^2</html>")
|
||||
);
|
||||
QCOMPARE(
|
||||
i18n("E ? <emphasis>mc^2</emphasis>"),
|
||||
QString("E ? *mc^2*")
|
||||
);
|
||||
QCOMPARE(
|
||||
i18n("E < <emphasis>mc^2</emphasis>"),
|
||||
i18n("E < <i>mc^2</i>"),
|
||||
QString("E < <i>mc^2</i>")
|
||||
);
|
||||
QCOMPARE(
|
||||
i18n("<html>E < <emphasis>mc^2</emphasis></html>"),
|
||||
i18n("<html>E < <i>mc^2</i></html>"),
|
||||
QString("<html>E < <i>mc^2</i></html>")
|
||||
);
|
||||
QCOMPARE(
|
||||
i18n("<b>E</b> < <emphasis>mc^2</emphasis>"),
|
||||
i18n("<b>E</b> < <i>mc^2</i>"),
|
||||
QString("<b>E</b> < <i>mc^2</i>")
|
||||
);
|
||||
QCOMPARE(
|
||||
i18n("<emphasis>E</emphasis> < <b>mc^2</b>"),
|
||||
i18n("<i>E</i> < <b>mc^2</b>"),
|
||||
QString("<i>E</i> < <b>mc^2</b>")
|
||||
);
|
||||
QCOMPARE(
|
||||
i18nc("@label", "E < <emphasis>mc^2</emphasis>"),
|
||||
i18nc("@label", "E < <i>mc^2</i>"),
|
||||
QString("E < <i>mc^2</i>")
|
||||
);
|
||||
QCOMPARE(
|
||||
i18nc("@info", "E < <emphasis>mc^2</emphasis>"),
|
||||
i18nc("@info", "E < <i>mc^2</i>"),
|
||||
QString("E < <i>mc^2</i>")
|
||||
);
|
||||
QCOMPARE(i18n("E = mc^2"), QString("E = mc^2"));
|
||||
|
@ -187,24 +183,6 @@ void KLocalizedStringTest::correctSubs ()
|
|||
}
|
||||
}
|
||||
|
||||
void KLocalizedStringTest::correctButIllFormed()
|
||||
{
|
||||
// ...and some ill-formed i18n, to test markup salvage.
|
||||
// (prevent debug info about bad markup).
|
||||
KConfig dc("kdebugrc", KConfig::SimpleConfig );
|
||||
dc.group(QString::number(173)).writeEntry("InfoOutput", 4);
|
||||
dc.sync();
|
||||
QCOMPARE(i18n("E < %1 * mc^2", 10), QString("E < 10 * mc^2"));
|
||||
QCOMPARE(
|
||||
i18n("<emphasis>%1</emphasis> < mc^2", QString("<E>")),
|
||||
QString("*<E>* < mc^2")
|
||||
);
|
||||
QCOMPARE(
|
||||
i18n("<emphasis>%1</emphasis> < <b>mc^2</b>", QString("<E>")),
|
||||
QString("<i><E></i> < <b>mc^2</b>")
|
||||
);
|
||||
}
|
||||
|
||||
void KLocalizedStringTest::wrongSubs()
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
|
|
|
@ -27,7 +27,6 @@ class KLocalizedStringTest : public QObject
|
|||
private Q_SLOTS:
|
||||
void initTestCase();
|
||||
void correctSubs();
|
||||
void correctButIllFormed();
|
||||
void wrongSubs();
|
||||
void miscMethods();
|
||||
void translateToFrench();
|
||||
|
|
Loading…
Add table
Reference in a new issue