Home
Phabricator
Search
Log In
Paste
P421
localized number tests
Active
Public
Actions
Authored by
ngraham
on Jun 24 2019, 11:19 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
diff --git a/autotests/klocalizedstringtest.cpp b/autotests/klocalizedstringtest.cpp
index e68ec32..e1863c4 100644
--- a/autotests/klocalizedstringtest.cpp
+++ b/autotests/klocalizedstringtest.cpp
@@ -218,6 +218,12 @@ void KLocalizedStringTest::correctSubs()
QString(" 42"));
QCOMPARE(ki18n("%1").subs(42, -5, 10, QChar('_')).toString(),
QString("42___"));
+
+ QLocale::setDefault(QLocale(QLocale::French));
+ QCOMPARE(ki18n("%1").subs(4.2, 5, 'f', 2).toString(),
+ QString(" 4,20"));
+
+ QLocale::setDefault(QLocale(QLocale::English, QLocale::UnitedStates));
QCOMPARE(ki18n("%1").subs(4.2, 5, 'f', 2).toString(),
QString(" 4.20"));
}
ngraham
created this paste.
Jun 24 2019, 11:19 AM
ngraham
created this object in space
S1 KDE Community
.
ngraham
mentioned this in
D22069: Localize long number strings
.
Log In to Comment