Skip to content

Commit

Permalink
When _extract_python (lingua 3.9) has been patched to take `firstline…
Browse files Browse the repository at this point in the history
…` param into account, line numbers are off by one.
  • Loading branch information
Laurent DAVERIO committed May 1, 2015
1 parent f9c2dd4 commit d9bc582
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mako/ext/linguaplugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def process_python(self, code, code_lineno, translator_strings):
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,
Expand Down

0 comments on commit d9bc582

Please sign in to comment.