diff --git a/genshi/filters/i18n.py b/genshi/filters/i18n.py
--- a/genshi/filters/i18n.py
+++ b/genshi/filters/i18n.py
@@ -270,6 +270,7 @@
             search_text = False
         skip = 0
         i18n_msg = I18N_NAMESPACE['msg']
+        i18n_comment = I18N_NAMESPACE['comment']
         xml_lang = XML_NAMESPACE['lang']
 
         for kind, data, pos in stream:
@@ -295,10 +296,10 @@
                             if text:
                                 yield pos[1], None, text
                     else:
-                        for lineno, funcname, text in self.extract(
+                        for lineno, funcname, text, comments in self.extract(
                                 _ensure(value), gettext_functions,
                                 search_text=False):
-                            yield lineno, funcname, text
+                            yield lineno, funcname, text, comments
 
                 if msgbuf:
                     msgbuf.append(kind, data, pos)
@@ -307,19 +308,21 @@
                     if params and type(params) is list: # event tuple
                         params = params[0][1]
                     msgbuf = MessageBuffer(params, pos[1])
+                if i18n_comment in attrs and msgbuf:
+                    msgbuf.comments.append(attrs.get(i18n_comment))
 
             elif not skip and search_text and kind is TEXT:
                 if not msgbuf:
                     text = data.strip()
                     if text and filter(None, [ch.isalpha() for ch in text]):
-                        yield pos[1], None, text
+                        yield pos[1], None, text, []
                 else:
                     msgbuf.append(kind, data, pos)
 
             elif not skip and msgbuf and kind is END:
                 msgbuf.append(kind, data, pos)
                 if not msgbuf.depth:
-                    yield msgbuf.lineno, None, msgbuf.format()
+                    yield msgbuf.lineno, None, msgbuf.format(), msgbuf.comments
                     msgbuf = None
 
             elif kind is EXPR or kind is EXEC:
@@ -327,15 +330,15 @@
                     msgbuf.append(kind, data, pos)
                 for funcname, strings in extract_from_code(data,
                                                            gettext_functions):
-                    yield pos[1], funcname, strings
+                    yield pos[1], funcname, strings, []
 
             elif kind is SUB:
                 subkind, substream = data
                 messages = self.extract(substream, gettext_functions,
                                         search_text=search_text and not skip,
                                         msgbuf=msgbuf)
-                for lineno, funcname, text in messages:
-                    yield lineno, funcname, text
+                for lineno, funcname, text, comments in messages:
+                    yield lineno, funcname, text, comments
 
 
 class MessageBuffer(object):
@@ -360,6 +363,7 @@
         self.depth = 1
         self.order = 1
         self.stack = [0]
+        self.comments = []
 
     def append(self, kind, data, pos):
         """Append a stream event to the buffer.
@@ -545,6 +549,6 @@
     tmpl = template_class(fileobj, filename=getattr(fileobj, 'name', None),
                           encoding=encoding)
     translator = Translator(None, ignore_tags, include_attrs, extract_text)
-    for lineno, func, message in translator.extract(tmpl.stream,
-                                                    gettext_functions=keywords):
-        yield lineno, func, message, []
+    for lineno, func, message, comments in translator.extract(
+                                    tmpl.stream, gettext_functions=keywords):
+        yield lineno, func, message, comments
