show a link to wiki to restore malformed database. see #4428

This commit is contained in:
Yann Leboulanger 2008-10-22 17:31:45 +00:00
parent fd7f0734b6
commit 6c41d9ecd4
2 changed files with 9 additions and 7 deletions

View File

@ -1840,8 +1840,8 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
except exceptions.DatabaseMalformed: except exceptions.DatabaseMalformed:
pritext = _('Database Error') pritext = _('Database Error')
sectext = _('The database file (%s) cannot be read. Try to repair ' sectext = _('The database file (%s) cannot be read. Try to repair '
'it or remove it (all history will be lost).') % \ 'it (see http://trac.gajim.org/wiki/DatabaseBackup) or remove '
common.logger.LOG_DB_PATH 'it (all history will be lost).') % common.logger.LOG_DB_PATH
self.dispatch('ERROR', (pritext, sectext)) self.dispatch('ERROR', (pritext, sectext))
self.dispatch('MSGERROR', (frm, msg.getErrorCode(), error_msg, msgtxt, self.dispatch('MSGERROR', (frm, msg.getErrorCode(), error_msg, msgtxt,
tim, session)) tim, session))
@ -1886,8 +1886,8 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
except exceptions.DatabaseMalformed: except exceptions.DatabaseMalformed:
pritext = _('Database Error') pritext = _('Database Error')
sectext = _('The database file (%s) cannot be read. Try to repair ' sectext = _('The database file (%s) cannot be read. Try to repair '
'it or remove it (all history will be lost).') % \ 'it (see http://trac.gajim.org/wiki/DatabaseBackup) or remove '
common.logger.LOG_DB_PATH 'it (all history will be lost).') % common.logger.LOG_DB_PATH
self.dispatch('ERROR', (pritext, sectext)) self.dispatch('ERROR', (pritext, sectext))
def dispatch_invite_message(self, invite, frm): def dispatch_invite_message(self, invite, frm):
@ -2074,7 +2074,8 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
except exceptions.DatabaseMalformed: except exceptions.DatabaseMalformed:
pritext = _('Database Error') pritext = _('Database Error')
sectext = _('The database file (%s) cannot be read. Try to ' sectext = _('The database file (%s) cannot be read. Try to '
'repair it or remove it (all history will be lost).') % \ 'repair it (see http://trac.gajim.org/wiki/DatabaseBackup)'
' or remove it (all history will be lost).') % \
common.logger.LOG_DB_PATH common.logger.LOG_DB_PATH
self.dispatch('ERROR', (pritext, sectext)) self.dispatch('ERROR', (pritext, sectext))
if avatar_sha or avatar_sha == '': if avatar_sha or avatar_sha == '':
@ -2199,7 +2200,8 @@ class ConnectionHandlers(ConnectionVcard, ConnectionBytestream, ConnectionDisco,
except exceptions.DatabaseMalformed: except exceptions.DatabaseMalformed:
pritext = _('Database Error') pritext = _('Database Error')
sectext = _('The database file (%s) cannot be read. Try to ' sectext = _('The database file (%s) cannot be read. Try to '
'repair it or remove it (all history will be lost).') % \ 'repair it (see http://trac.gajim.org/wiki/DatabaseBackup) '
'or remove it (all history will be lost).') % \
common.logger.LOG_DB_PATH common.logger.LOG_DB_PATH
self.dispatch('ERROR', (pritext, sectext)) self.dispatch('ERROR', (pritext, sectext))
our_jid = gajim.get_jid_from_account(self.name) our_jid = gajim.get_jid_from_account(self.name)

View File

@ -168,7 +168,7 @@ try:
from common import gajim from common import gajim
except exceptions.DatabaseMalformed: except exceptions.DatabaseMalformed:
pritext = _('Database Error') pritext = _('Database Error')
sectext = _('The database file (%s) cannot be read. Try to repair it or remove it (all history will be lost).') % common.logger.LOG_DB_PATH sectext = _('The database file (%s) cannot be read. Try to repair it (see http://trac.gajim.org/wiki/DatabaseBackup) or remove it (all history will be lost).') % common.logger.LOG_DB_PATH
else: else:
from common import dbus_support from common import dbus_support
if dbus_support.supported: if dbus_support.supported: