Example #1
0
    def get_help_text(self, additional_see_also=None, plain=True):
        """Return a string with the help for this topic.

        :param additional_see_also: Additional help topics to be
            cross-referenced.
        :param plain: if False, raw help (reStructuredText) is
            returned instead of plain text.
        """
        result = topic_registry.get_detail(self.topic)
        result += _format_see_also(additional_see_also)
        if plain:
            result = help_as_plain_text(result)
        i18n.install()
        result = i18n.gettext_per_paragraph(result)
        return result
Example #2
0
    def get_help_text(self, additional_see_also=None, plain=True):
        """Return a string with the help for this topic.

        :param additional_see_also: Additional help topics to be
            cross-referenced.
        :param plain: if False, raw help (reStructuredText) is
            returned instead of plain text.
        """
        result = topic_registry.get_detail(self.topic)
        result += _format_see_also(additional_see_also)
        if plain:
            result = help_as_plain_text(result)
        i18n.install()
        result = i18n.gettext_per_paragraph(result)
        return result
Example #3
0
 def test_multiline(self):
     self.assertEqual(u"zz\xe5{{spam\nham}}\n\nzz\xe5{{eggs\n}}",
                      i18n.gettext_per_paragraph("spam\nham\n\neggs\n"))
Example #4
0
 def test_oneline(self):
     self.assertEqual(u"zz\xe5{{spam ham eggs}}",
                      i18n.gettext_per_paragraph("spam ham eggs"))
Example #5
0
 def test_multiline(self):
     self.assertEqual(u"zz\xe5{{spam\nham}}\n\nzz\xe5{{eggs\n}}",
                      i18n.gettext_per_paragraph("spam\nham\n\neggs\n"))
Example #6
0
 def test_oneline(self):
     self.assertEqual(u"zz\xe5{{spam ham eggs}}",
                      i18n.gettext_per_paragraph("spam ham eggs"))