summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsepython/main.py10
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsepython/project.ts.result13
2 files changed, 21 insertions, 2 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsepython/main.py b/tests/auto/linguist/lupdate/testdata/good/parsepython/main.py
index 6375ff4da..e2bf9ac93 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsepython/main.py
+++ b/tests/auto/linguist/lupdate/testdata/good/parsepython/main.py
@@ -5,10 +5,10 @@ from PySide6.QtCore import (QItemSelection, QLibraryInfo, QLocale, QTranslator,
Qt, Slot)
from PySide6.QtWidgets import (QAbstractItemView, QApplication, QListWidget,
QMainWindow, QWidget)
-
-
import linguist_rc
+""""
+ Misleading indentation (5) for PYSIDE-2379"""
class Window(QMainWindow):
def __init__(self):
@@ -66,6 +66,12 @@ class Window(QMainWindow):
"THIS SHOULD NOT WORK"
)
+ class NestedClass:
+ def foo(self):
+ msg = self.tr("Nested Message")
+
+ def window_method(self): # PYSIDE-2379, Don't put this into NestedClass
+ msg = self.tr("Window Message")
if __name__ == '__main__':
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsepython/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsepython/project.ts.result
index f081bc23a..658485339 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsepython/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/parsepython/project.ts.result
@@ -38,6 +38,14 @@
</message>
</context>
<context>
+ <name>NestedClass</name>
+ <message>
+ <location filename="main.py" line="73"/>
+ <source>Nested Message</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>Window</name>
<message>
<location filename="main.py" line="17"/>
@@ -72,5 +80,10 @@
<numerusform></numerusform>
</translation>
</message>
+ <message>
+ <location filename="main.py" line="77"/>
+ <source>Window Message</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
</TS>