aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/tests/QtCore/translation_test.py
diff options
context:
space:
mode:
authorSimo Fält <simo.falt@qt.io>2023-05-25 11:19:39 +0300
committerSimo Fält <simo.falt@qt.io>2023-05-25 11:19:39 +0300
commit40fdea15e6545292212ea6c4acc78c3b2975cbd8 (patch)
treea2209393036458904f52cc418c708a20abcc1fac /sources/pyside2/tests/QtCore/translation_test.py
parentd8f02ce77a4143aa4e7e6c4f7892e6a943c46b3c (diff)
parent63d49d3651257452b9be3982cac573971995e230 (diff)
Merge tag 'v5.15.6-lts' into tqtc/lts-5.15-opensourcev5.15.6-lts-lgpl
Qt For Python Release 5.15.6 Change-Id: I7a6874dfca79fbc46f5a6101e713b0c1dde9a640
Diffstat (limited to 'sources/pyside2/tests/QtCore/translation_test.py')
-rw-r--r--sources/pyside2/tests/QtCore/translation_test.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/sources/pyside2/tests/QtCore/translation_test.py b/sources/pyside2/tests/QtCore/translation_test.py
index 0f36067bd..b2e674aac 100644
--- a/sources/pyside2/tests/QtCore/translation_test.py
+++ b/sources/pyside2/tests/QtCore/translation_test.py
@@ -59,6 +59,19 @@ class TranslationTest(UsesQCoreApplication):
obj = QObject()
obj.setObjectName(obj.tr('Hello World!'))
+ self.assertEqual(obj.objectName(), 'Orbis, te saluto!')
+
+ def testLatinDerived(self):
+ # PYSIDE-131: Test that derived classes work, too.
+ translator = QTranslator()
+ translator.load(os.path.join(self.trdir, 'trans_latin.qm'))
+ self.app.installTranslator(translator)
+
+ class Derived(QObject):
+ pass
+
+ obj = Derived()
+ obj.setObjectName(obj.tr('Hello World!'))
self.assertEqual(obj.objectName(), py3k.unicode_('Orbis, te saluto!'))
def testRussian(self):