i18n/hggettext
changeset 9539 c904e76e3834
parent 8626 1fc1c77d4863
child 10263 25e572394f5c
--- a/i18n/hggettext	Sat Oct 03 18:58:25 2009 +0200
+++ b/i18n/hggettext	Sun Oct 04 09:59:13 2009 +0200
@@ -112,6 +112,11 @@
             print poentry(path, lineno, func.__doc__)
 
 
+def rawtext(path):
+    src = open(path).read()
+    print poentry(path, 1, src)
+
+
 if __name__ == "__main__":
     # It is very important that we import the Mercurial modules from
     # the source tree where hggettext is executed. Otherwise we might
@@ -120,4 +125,7 @@
     sys.path.insert(0, os.getcwd())
     from mercurial import demandimport; demandimport.enable()
     for path in sys.argv[1:]:
-        docstrings(path)
+        if path.endswith('.txt'):
+            rawtext(path)
+        else:
+            docstrings(path)