Skip to content

Possible indentation issue with lupdate parser #12

@xgvargas

Description

@xgvargas
class ThisWorks(QtGui.QWidget):
    def __init__(self, parent=None):
        super().__init__(parent)

        self.a =self.tr("i'm fine")

class ThisFails(QtGui.QWidget):
    def __init__(self, parent=None):
        super().__init__(parent)

        self.b = '''a long text with
more them one line'''                 #  <---- a single space before 'm' solves the problem

        self.a =self.tr("i'm sad")

the .TS generated for the second class will have no identifier:

<context>
    <name></name>     <!----- empty  -->
    <message>
        <location filename="../console.py" line="37"/>
        <source>i&apos;m sad</source>
        <translation type="unfinished"></translation>
    </message>
</context>
<context>
    <name>ThisWorks</name>
    <message>
        <location filename="../console.py" line="26"/>
        <source>i&apos;m fine</source>
        <translation type="unfinished"></translation>
    </message>
</context>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions