# HG changeset patch # User cmlenz # Date 1215546368 0 # Node ID ddb58d74c8ee69a7911f8618df5838b61d0c25ba # Parent 886934df7fea107e3f37eabfe924b23d531e1dc0 Added tests for the parameter support added to advanced internationalization in [901]. See #129. diff --git a/genshi/filters/i18n.py b/genshi/filters/i18n.py --- a/genshi/filters/i18n.py +++ b/genshi/filters/i18n.py @@ -347,6 +347,8 @@ def __init__(self, params=u'', lineno=-1): """Initialize the message buffer. + :param params: comma-separated list of parameter names + :type params: `basestring` :param lineno: the line number on which the first stream event belonging to the message was found """ @@ -463,6 +465,7 @@ return parts + def extract_from_code(code, gettext_functions): """Extract strings from Python bytecode. @@ -506,6 +509,7 @@ yield funcname, strings return _walk(code.ast) + def extract(fileobj, keywords, comment_tags, options): """Babel extraction method for Genshi templates. diff --git a/genshi/filters/tests/i18n.py b/genshi/filters/tests/i18n.py --- a/genshi/filters/tests/i18n.py +++ b/genshi/filters/tests/i18n.py @@ -11,6 +11,7 @@ # individuals. For the exact contribution history, see the revision # history and logs, available at http://genshi.edgewall.org/log/. +from datetime import datetime import doctest from StringIO import StringIO import unittest @@ -262,6 +263,73 @@
Eintr\xc3\xa4ge pro Seite, beginnend auf Seite .