msg=self.tr('Translation imported and matched successfully.')
else:
msg=self.tr('Imported txt file not fully matched with current project, please make sure source txt file structured like results from \"export TXT/markdown\"')
iflen(match_rst['missing_pages'])>0:
msg+='\n'+self.tr('Missing pages: ')+'\n'
msg+='\n'.join(match_rst['missing_pages'])
iflen(match_rst['unexpected_pages'])>0:
msg+='\n'+self.tr('Unexpected pages: ')+'\n'
msg+='\n'.join(match_rst['unexpected_pages'])
iflen(match_rst['unmatched_pages'])>0:
msg+='\n'+self.tr('Unmatched pages: ')+'\n'
msg+='\n'.join(match_rst['unmatched_pages'])
msg=msg.strip()
create_info_dialog(msg)
exceptExceptionase:
create_error_dialog(e,self.tr('Failed to import translation from ')+selected_file)