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
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
'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
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