1.1 --- a/XSLForms/Prepare.py Mon Jun 22 21:45:16 2009 +0200
1.2 +++ b/XSLForms/Prepare.py Mon Jun 22 23:33:43 2009 +0200
1.3 @@ -1,9 +1,9 @@
1.4 #!/usr/bin/env python
1.5
1.6 """
1.7 -Preparation of templating stylesheets.
1.8 +Preparation of templating stylesheets and related resources.
1.9
1.10 -Copyright (C) 2005, 2006, 2007, 2008 Paul Boddie <paul@boddie.org.uk>
1.11 +Copyright (C) 2005, 2006, 2007, 2008, 2009 Paul Boddie <paul@boddie.org.uk>
1.12
1.13 This program is free software; you can redistribute it and/or modify it under
1.14 the terms of the GNU Lesser General Public License as published by the Free
1.15 @@ -138,42 +138,15 @@
1.16
1.17 _make_document(template_name, output_name, stylesheet_names, encoding)
1.18
1.19 -# Qt Designer functions.
1.20 +# Translation-related functions.
1.21
1.22 -def make_qt_fragment(template_name, output_name, widget_name, stylesheet_names=["QtDesignerExtract.xsl"], encoding=None):
1.23 - _make_document(template_name, output_name, stylesheet_names, encoding, parameters={"widget-name" : widget_name})
1.24 -
1.25 -def ensure_qt_fragment(template_name, output_name, widget_name):
1.26 - _ensure_document(template_name, output_name, make_qt_fragment, widget_name)
1.27 +def find_translation_keys(template_name, output_name, stylesheet_names=["FindTranslationKeys.xsl"], encoding=None):
1.28
1.29 -# Qt Designer Web functions.
1.30 -
1.31 -def make_qt_template(template_name, output_name, stylesheet_names=["QtDesigner.xsl"], encoding=None):
1.32 - _make_document(template_name, output_name, stylesheet_names, encoding)
1.33 + """
1.34 + Find translation keys in the document identified by 'template_name',
1.35 + producing a translations document with the given 'output_name'.
1.36 + """
1.37
1.38 -def ensure_qt_template(template_name, output_name):
1.39 - _ensure_document(template_name, output_name, make_qt_template)
1.40 -
1.41 -def make_qt_stylesheet(template_name, output_name, stylesheet_names=["QtDesigner.xsl", "PrepareMacro.xsl", "Prepare.xsl"], encoding=None):
1.42 _make_document(template_name, output_name, stylesheet_names, encoding)
1.43
1.44 -def ensure_qt_stylesheet(template_name, output_name):
1.45 - _ensure_document(template_name, output_name, make_qt_stylesheet)
1.46 -
1.47 -# Qt Designer Web functions for fragments.
1.48 -
1.49 -def make_qt_template_fragment(template_name, output_name, widget_name, stylesheet_names=["QtDesignerExtract.xsl", "QtDesigner.xsl"], encoding=None):
1.50 - _make_document(template_name, output_name, stylesheet_names, encoding, parameters={"widget-name" : widget_name})
1.51 -
1.52 -def ensure_qt_template_fragment(template_name, output_name, widget_name):
1.53 - _ensure_document(template_name, output_name, make_qt_template_fragment, widget_name)
1.54 -
1.55 -def make_qt_stylesheet_fragment(template_name, output_name, widget_name,
1.56 - stylesheet_names=["QtDesignerExtract.xsl", "QtDesigner.xsl", "PrepareMacro.xsl", "Prepare.xsl"], encoding=None):
1.57 -
1.58 - _make_document(template_name, output_name, stylesheet_names, encoding, parameters={"widget-name" : widget_name})
1.59 -
1.60 -def ensure_qt_stylesheet_fragment(template_name, output_name, widget_name):
1.61 - _ensure_document(template_name, output_name, make_qt_stylesheet_fragment, widget_name)
1.62 -
1.63 # vim: tabstop=4 expandtab shiftwidth=4