aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--po/xgettext_sh.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/po/xgettext_sh.py b/po/xgettext_sh.py
index 137de46f..ac18593e 100644
--- a/po/xgettext_sh.py
+++ b/po/xgettext_sh.py
@@ -42,7 +42,19 @@ def xgettext(arq):
else:
for match in pattern.finditer(l):
pos = match.start()
- text = split(l[pos:], '"')[1]
+ p1 = l.find('"',pos) + 1
+ p2 = p1+1
+ while 1:
+ p2 = l.find('"',p2)
+ if p2 == -1:
+ p2 = p1
+ break
+ if l[p2-1] == '\\':
+ p2 = p2 + 1
+ else:
+ break
+ text = l[p1:p2]
+ #text = split(l[pos:], '"')[1]
if s.has_key(text):
s[text].append((arq, line))
else: