Rename property to avoid conflict

TranslatedWithContext.context conflicted with AstNode.context
This commit is contained in:
James Westman 2023-04-28 20:41:25 -05:00
parent ec844b10ca
commit a2eaaa26fe
2 changed files with 2 additions and 2 deletions

View file

@ -51,7 +51,7 @@ class TranslatedWithContext(AstNode):
return self.tokens["string"] return self.tokens["string"]
@property @property
def context(self) -> str: def translate_context(self) -> str:
return self.tokens["context"] return self.tokens["context"]

View file

@ -151,7 +151,7 @@ class XmlOutput(OutputFormat):
else: else:
return { return {
"translatable": "true", "translatable": "true",
"context": translated.child.context "context": translated.child.translate_context
if isinstance(translated.child, TranslatedWithContext) if isinstance(translated.child, TranslatedWithContext)
else None, else None,
} }