When _extract_python (lingua 3.9) has been patched to take `firstline` param into account, line numbers are off by one.
diff --git a/mako/ext/linguaplugin.py b/mako/ext/linguaplugin.py index 0e2065e..4c72589 100644 --- a/mako/ext/linguaplugin.py +++ b/mako/ext/linguaplugin.py
@@ -33,7 +33,7 @@ source += compat.b(' pass') code = io.BytesIO(source) for msg in self.python_extractor( - self.filename, self.options, code, code_lineno): + self.filename, self.options, code, code_lineno - 1): if translator_strings: msg = Message(msg.msgctxt, msg.msgid, msg.msgid_plural, msg.flags,