summaryrefslogtreecommitdiff
path: root/npybabel.py
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2011-08-16 12:09:40 +0200
committerniv-openerp <nicolas.vanhoren@openerp.com>2011-08-16 12:09:40 +0200
commit5b522f5d062a526b7c065ebe39b1879b20c3cf12 (patch)
treee5d592c78d414cd77661507a2a293caa55fb7b67 /npybabel.py
parentda7a365ebf273335e4a7d745c794ab03aaf8cea4 (diff)
[imp] setup infrastructure for qweb message extraction
bzr revid: nicolas.vanhoren@openerp.com-20110816100940-h7mxs3ajvoem9ujj
Diffstat (limited to 'npybabel.py')
-rwxr-xr-xnpybabel.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/npybabel.py b/npybabel.py
new file mode 100755
index 00000000000..d2a5553fc80
--- /dev/null
+++ b/npybabel.py
@@ -0,0 +1,26 @@
+#!/usr/bin/python
+# EASY-INSTALL-ENTRY-SCRIPT: 'Babel==0.9.6','console_scripts','pybabel'
+__requires__ = 'Babel==0.9.6'
+import sys
+from pkg_resources import load_entry_point
+
+if __name__ == '__main__':
+ sys.exit(
+ load_entry_point('Babel==0.9.6', 'console_scripts', 'pybabel')()
+ )
+
+def extract_qweb(fileobj, keywords, comment_tags, options):
+ """Extract messages from XXX files.
+ :param fileobj: the file-like object the messages should be extracted
+ from
+ :param keywords: a list of keywords (i.e. function names) that should
+ be recognized as translation functions
+ :param comment_tags: a list of translator tags to search for and
+ include in the results
+ :param options: a dictionary of additional options (optional)
+ :return: an iterator over ``(lineno, funcname, message, comments)``
+ tuples
+ :rtype: ``iterator``
+ """
+ content = fileobj.read()
+ return []