aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent DAVERIO <laurent@daverio.net>2015-05-01 18:21:12 +0200
committerLaurent DAVERIO <laurent@daverio.net>2015-05-01 18:21:12 +0200
commitd9bc582772d76cfdb5dc730f47be2d6ae9b85606 (patch)
tree32fd2f737649c9e5a79363a52a0e89df3b9faa81
parentf9c2dd493a46e8093c97d17881d0305661d5dbfd (diff)
downloadexternal_python_mako-d9bc582772d76cfdb5dc730f47be2d6ae9b85606.tar.gz
external_python_mako-d9bc582772d76cfdb5dc730f47be2d6ae9b85606.tar.bz2
external_python_mako-d9bc582772d76cfdb5dc730f47be2d6ae9b85606.zip
When _extract_python (lingua 3.9) has been patched to take `firstline` param into account, line numbers are off by one.
-rw-r--r--mako/ext/linguaplugin.py2
1 files changed, 1 insertions, 1 deletions
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 @@ class LinguaMakoExtractor(Extractor, MessageExtractor):
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,