Some string changes, mostly consistency to make translation easier

This commit is contained in:
steffen123 2010-08-29 20:35:16 +02:00
parent 14ea4714b9
commit 3990b40e3d
5 changed files with 18 additions and 15 deletions

View File

@ -63,7 +63,7 @@ class Filters(threading.Thread):
,'seatsbetween':_('Between:'), 'seatsand':_('And:'), 'seatsshow':_('Show Number of _Players')
,'playerstitle':_('Hero:'), 'sitestitle':_('Sites:'), 'gamestitle':_('Games:')
,'limitstitle':_('Limits:'), 'seatstitle':_('Number of Players:')
,'groupstitle':_('Grouping:'), 'posnshow':_('Show Position Stats:')
,'groupstitle':_('Grouping:'), 'posnshow':_('Show Position Stats')
,'datestitle':_('Date:')
,'groupsall':_('All Players')
,'limitsFL':'FL', 'limitsNL':'NL', 'limitsPL':'PL', 'ring':_('Ring'), 'tour':_('Tourney')
@ -891,7 +891,7 @@ class Filters(threading.Thread):
hbox = gtk.HBox()
vbox1.pack_start(hbox, False, True, 0)
lbl_start = gtk.Label('From:')
lbl_start = gtk.Label(_('From:'))
btn_start = gtk.Button()
btn_start.set_image(gtk.image_new_from_stock(gtk.STOCK_INDEX, gtk.ICON_SIZE_BUTTON))
@ -905,7 +905,7 @@ class Filters(threading.Thread):
hbox = gtk.HBox()
vbox1.pack_start(hbox, False, True, 0)
lbl_end = gtk.Label(' To:')
lbl_end = gtk.Label(_('To:'))
btn_end = gtk.Button()
btn_end.set_image(gtk.image_new_from_stock(gtk.STOCK_INDEX, gtk.ICON_SIZE_BUTTON))
btn_end.connect('clicked', self.__calendar_dialog, self.end_date)

View File

@ -136,7 +136,7 @@ class GuiBulkImport():
#self.settings['global_lock'].release()
self.settings['global_lock'].release()
else:
print _("bulk-import aborted - global lock not available")
print _("bulk import aborted - global lock not available")
def get_vbox(self):
"""returns the vbox of this thread"""

View File

@ -300,7 +300,7 @@ class GuiDatabase:
self.dia.show()
except:
err = traceback.extract_tb(sys.exc_info()[2])[-1]
print _('loaddbs error: ')+str(dbms_num)+','+host+','+name+','+user+','+passwd+' failed: ' \
print _('loadDbs error: ')+str(dbms_num)+','+host+','+name+','+user+','+passwd+' failed: ' \
+ err[2] + "(" + str(err[1]) + "): " + str(sys.exc_info()[1])
def sortCols(self, col, n):
@ -368,7 +368,7 @@ class GuiDatabase:
try:
# is creating empty db for sqlite ... mod db.py further?
# add noDbTables flag to db.py?
log.debug(_("loaddbs: trying to connect to: %s/%s, %s, %s/%s") % (str(dbms_num),dbms,name,user,passwd))
log.debug(_("testDB: trying to connect to: %s/%s, %s, %s/%s") % (str(dbms_num),dbms,name,user,passwd))
db.connect(backend=dbms_num, host=host, database=name, user=user, password=passwd, create=False)
if db.connected:
log.debug(_(" connected ok"))
@ -384,14 +384,16 @@ class GuiDatabase:
status = "failed"
icon = gtk.STOCK_CANCEL
except Exceptions.FpdbMySQLNoDatabase:
err_msg = _("MySQL client reports: 2002 or 2003 error. Unable to connect - Please check that the MySQL service has been started")
err_msg = _("MySQL client reports: 2002 or 2003 error. Unable to connect - ") \
+ _("Please check that the MySQL service has been started")
status = "failed"
icon = gtk.STOCK_CANCEL
except Exceptions.FpdbPostgresqlAccessDenied:
err_msg = _("Postgres Server reports: Access denied. Are your permissions set correctly?")
err_msg = _("PostgreSQL Server reports: Access denied. Are your permissions set correctly?")
status = "failed"
except Exceptions.FpdbPostgresqlNoDatabase:
err_msg = _("Postgres client reports: Unable to connect - Please check that the Postgres service has been started")
err_msg = _("PostgreSQL client reports: Unable to connect - ") \
+ _("Please check that the PostgreSQL service has been started")
status = "failed"
icon = gtk.STOCK_CANCEL
except:

View File

@ -544,8 +544,9 @@ class fpdb:
#lock_released = False
dia_confirm = gtk.MessageDialog(parent=self.window, flags=gtk.DIALOG_DESTROY_WITH_PARENT, type=gtk.MESSAGE_WARNING,
buttons=(gtk.BUTTONS_YES_NO), message_format=_("Confirm deleting and recreating tables"))
diastring = _("Please confirm that you want to (re-)create the tables. If there already are tables in the database ") \
+self.db.database+" on "+self.db.host+_(" they will be deleted and you will have to re-import your histories.\nThis may take a while.")
diastring = _("Please confirm that you want to (re-)create the tables.") \
+ (_(" If there already are tables in the database %s on %s they will be deleted and you will have to re-import your histories.\n") % (self.db.database, self.db.host)) \
+ _("This may take a while.")
dia_confirm.format_secondary_text(diastring)#todo: make above string with bold for db, host and deleted
# disable windowclose, do not want the the underlying processing interrupted mid-process
dia_confirm.set_deletable(False)

View File

@ -224,7 +224,7 @@ class Importer:
#print " adding file ", file
self.addImportFile(os.path.join(dir, file), site, filter)
else:
log.warning(_("Attempted to add non-directory: '%s' as an import directory") % str(dir))
log.warning(_("Attempted to add non-directory '%s' as an import directory") % str(dir))
def runImport(self):
""""Run full import on self.filelist. This is called from GuiBulkImport.py"""
@ -310,7 +310,7 @@ class Importer:
toterrors += errors
for i in xrange( self.settings['threads'] ):
print _("sending finish msg qlen ="), q.qsize()
print _("sending finish message queue length ="), q.qsize()
db.send_finish_msg(q)
return (totstored, totdups, totpartial, toterrors)
@ -436,9 +436,9 @@ class Importer:
# Load filter, process file, pass returned filename to import_fpdb_file
if self.settings['threads'] > 0 and self.writeq is not None:
log.info(_("Converting ") + file + " (" + str(q.qsize()) + ")")
log.info((_("Converting %s") % file) + " (" + str(q.qsize()) + ")")
else:
log.info(_("Converting ") + file)
log.info(_("Converting %s") % file)
hhbase = self.config.get_import_parameters().get("hhArchiveBase")
hhbase = os.path.expanduser(hhbase)
hhdir = os.path.join(hhbase,site)