示例#1
0
def make_display_excerpts(profile):
    ensure_code_reachability()
    from i18n import _
    from smolt import to_ascii

    def inner_indent(text):
        return ('\n' + 5 * ' ').join(text.split('\n'))

    excerpts = {
        'label_intro':_('Smolt has collected four types of information:'),
        'label_question':_('Do you want to ..'),
        'label_question_view':_('(v)iew details on collected information?'),
        'label_question_send':_('(s)end this information to the Smolt server?'),
        'label_question_quit':_('(q)uit Smolt?'),
        'label_general':_('General'),
        'label_devices':_('Devices'),
        'label_fs_related':_('File system-related'),
        'label_distro_specific':_('Distribution-specific'),

        'general':inner_indent(to_ascii(profile.get_general_info_excerpt())),
        'devices':inner_indent(to_ascii(profile.get_devices_info_excerpt())),
        'file_system':inner_indent(to_ascii(profile.get_file_system_info_excerpt())),
        'distro':inner_indent(to_ascii(profile.get_distro_info_excerpt())),
    }
    return excerpts
示例#2
0
def make_display_excerpts(profile):
    ensure_code_reachability()
    from i18n import _
    from smolt import to_ascii

    def inner_indent(text):
        return ('\n' + 5 * ' ').join(text.split('\n'))

    excerpts = {
        'label_intro':
        _('Smolt has collected four types of information:'),
        'label_question':
        _('Do you want to ..'),
        'label_question_view':
        _('(v)iew details on collected information?'),
        'label_question_send':
        _('(s)end this information to the Smolt server?'),
        'label_question_quit':
        _('(q)uit Smolt?'),
        'label_general':
        _('General'),
        'label_devices':
        _('Devices'),
        'label_fs_related':
        _('File system-related'),
        'label_distro_specific':
        _('Distribution-specific'),
        'general':
        inner_indent(to_ascii(profile.get_general_info_excerpt())),
        'devices':
        inner_indent(to_ascii(profile.get_devices_info_excerpt())),
        'file_system':
        inner_indent(to_ascii(profile.get_file_system_info_excerpt())),
        'distro':
        inner_indent(to_ascii(profile.get_distro_info_excerpt())),
    }
    return excerpts
示例#3
0
        'label_question_view':
        _('(v)iew details on collected information?'),
        'label_question_send':
        _('(s)end this information to the Smolt server?'),
        'label_question_quit':
        _('(q)uit Smolt?'),
        'label_general':
        _('General'),
        'label_devices':
        _('Devices'),
        'label_fs_related':
        _('File system-related'),
        'label_distro_specific':
        _('Distribution-specific'),
        'general':
        inner_indent(to_ascii(profile.get_general_info_excerpt())),
        'devices':
        inner_indent(to_ascii(profile.get_devices_info_excerpt())),
        'file_system':
        inner_indent(to_ascii(profile.get_file_system_info_excerpt())),
        'distro':
        inner_indent(to_ascii(profile.get_distro_info_excerpt())),
    }

    submit = False
    while not submit:
        print """\
=====================================================
%(label_intro)s

  %(label_general)s
示例#4
0
    def inner_indent(text):
        return ('\n' + 5 * ' ').join(text.split('\n'))

    excerpts = {
        'label_intro':_('Smolt has collected four types of information:'),
        'label_question':_('Do you want to ..'),
        'label_question_view':_('(v)iew details on collected information?'),
        'label_question_send':_('(s)end this information to the Smolt server?'),
        'label_question_quit':_('(q)uit Smolt?'),
        'label_general':_('General'),
        'label_devices':_('Devices'),
        'label_fs_related':_('File system-related'),
        'label_distro_specific':_('Distribution-specific'),

        'general':inner_indent(to_ascii(profile.get_general_info_excerpt())),
        'devices':inner_indent(to_ascii(profile.get_devices_info_excerpt())),
        'file_system':inner_indent(to_ascii(profile.get_file_system_info_excerpt())),
        'distro':inner_indent(to_ascii(profile.get_distro_info_excerpt())),
    }

    submit = False
    while not submit:
        print """\
=====================================================
%(label_intro)s

  %(label_general)s
     %(general)s

  %(label_devices)s