Some string changes, mostly consistency to make translation easier
This commit is contained in:
		
							parent
							
								
									14ea4714b9
								
							
						
					
					
						commit
						3990b40e3d
					
				| 
						 | 
					@ -63,7 +63,7 @@ class Filters(threading.Thread):
 | 
				
			||||||
                          ,'seatsbetween':_('Between:'), 'seatsand':_('And:'), 'seatsshow':_('Show Number of _Players')
 | 
					                          ,'seatsbetween':_('Between:'), 'seatsand':_('And:'), 'seatsshow':_('Show Number of _Players')
 | 
				
			||||||
                          ,'playerstitle':_('Hero:'), 'sitestitle':_('Sites:'), 'gamestitle':_('Games:')
 | 
					                          ,'playerstitle':_('Hero:'), 'sitestitle':_('Sites:'), 'gamestitle':_('Games:')
 | 
				
			||||||
                          ,'limitstitle':_('Limits:'), 'seatstitle':_('Number of Players:')
 | 
					                          ,'limitstitle':_('Limits:'), 'seatstitle':_('Number of Players:')
 | 
				
			||||||
                          ,'groupstitle':_('Grouping:'), 'posnshow':_('Show Position Stats:')
 | 
					                          ,'groupstitle':_('Grouping:'), 'posnshow':_('Show Position Stats')
 | 
				
			||||||
                          ,'datestitle':_('Date:')
 | 
					                          ,'datestitle':_('Date:')
 | 
				
			||||||
                          ,'groupsall':_('All Players')
 | 
					                          ,'groupsall':_('All Players')
 | 
				
			||||||
                          ,'limitsFL':'FL', 'limitsNL':'NL', 'limitsPL':'PL', 'ring':_('Ring'), 'tour':_('Tourney')
 | 
					                          ,'limitsFL':'FL', 'limitsNL':'NL', 'limitsPL':'PL', 'ring':_('Ring'), 'tour':_('Tourney')
 | 
				
			||||||
| 
						 | 
					@ -891,7 +891,7 @@ class Filters(threading.Thread):
 | 
				
			||||||
        hbox = gtk.HBox()
 | 
					        hbox = gtk.HBox()
 | 
				
			||||||
        vbox1.pack_start(hbox, False, True, 0)
 | 
					        vbox1.pack_start(hbox, False, True, 0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        lbl_start = gtk.Label('From:')
 | 
					        lbl_start = gtk.Label(_('From:'))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        btn_start = gtk.Button()
 | 
					        btn_start = gtk.Button()
 | 
				
			||||||
        btn_start.set_image(gtk.image_new_from_stock(gtk.STOCK_INDEX, gtk.ICON_SIZE_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()
 | 
					        hbox = gtk.HBox()
 | 
				
			||||||
        vbox1.pack_start(hbox, False, True, 0)
 | 
					        vbox1.pack_start(hbox, False, True, 0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        lbl_end = gtk.Label('  To:')
 | 
					        lbl_end = gtk.Label(_('To:'))
 | 
				
			||||||
        btn_end = gtk.Button()
 | 
					        btn_end = gtk.Button()
 | 
				
			||||||
        btn_end.set_image(gtk.image_new_from_stock(gtk.STOCK_INDEX, gtk.ICON_SIZE_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)
 | 
					        btn_end.connect('clicked', self.__calendar_dialog, self.end_date)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -136,7 +136,7 @@ class GuiBulkImport():
 | 
				
			||||||
            #self.settings['global_lock'].release()
 | 
					            #self.settings['global_lock'].release()
 | 
				
			||||||
                self.settings['global_lock'].release()
 | 
					                self.settings['global_lock'].release()
 | 
				
			||||||
        else:
 | 
					        else:
 | 
				
			||||||
            print _("bulk-import aborted - global lock not available")
 | 
					            print _("bulk import aborted - global lock not available")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def get_vbox(self):
 | 
					    def get_vbox(self):
 | 
				
			||||||
        """returns the vbox of this thread"""
 | 
					        """returns the vbox of this thread"""
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -300,7 +300,7 @@ class GuiDatabase:
 | 
				
			||||||
            self.dia.show()
 | 
					            self.dia.show()
 | 
				
			||||||
        except:
 | 
					        except:
 | 
				
			||||||
            err = traceback.extract_tb(sys.exc_info()[2])[-1]
 | 
					            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])
 | 
					                      + err[2] + "(" + str(err[1]) + "): " + str(sys.exc_info()[1])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def sortCols(self, col, n):
 | 
					    def sortCols(self, col, n):
 | 
				
			||||||
| 
						 | 
					@ -368,7 +368,7 @@ class GuiDatabase:
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            # is creating empty db for sqlite ... mod db.py further?
 | 
					            # is creating empty db for sqlite ... mod db.py further?
 | 
				
			||||||
            # add noDbTables flag to db.py?
 | 
					            # 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)
 | 
					            db.connect(backend=dbms_num, host=host, database=name, user=user, password=passwd, create=False)
 | 
				
			||||||
            if db.connected:
 | 
					            if db.connected:
 | 
				
			||||||
                log.debug(_("         connected ok"))
 | 
					                log.debug(_("         connected ok"))
 | 
				
			||||||
| 
						 | 
					@ -384,14 +384,16 @@ class GuiDatabase:
 | 
				
			||||||
            status = "failed"
 | 
					            status = "failed"
 | 
				
			||||||
            icon = gtk.STOCK_CANCEL
 | 
					            icon = gtk.STOCK_CANCEL
 | 
				
			||||||
        except Exceptions.FpdbMySQLNoDatabase:
 | 
					        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"
 | 
					            status = "failed"
 | 
				
			||||||
            icon = gtk.STOCK_CANCEL
 | 
					            icon = gtk.STOCK_CANCEL
 | 
				
			||||||
        except Exceptions.FpdbPostgresqlAccessDenied:
 | 
					        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"
 | 
					            status = "failed"
 | 
				
			||||||
        except Exceptions.FpdbPostgresqlNoDatabase:
 | 
					        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"
 | 
					            status = "failed"
 | 
				
			||||||
            icon = gtk.STOCK_CANCEL
 | 
					            icon = gtk.STOCK_CANCEL
 | 
				
			||||||
        except:
 | 
					        except:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -544,8 +544,9 @@ class fpdb:
 | 
				
			||||||
            #lock_released = False
 | 
					            #lock_released = False
 | 
				
			||||||
            dia_confirm = gtk.MessageDialog(parent=self.window, flags=gtk.DIALOG_DESTROY_WITH_PARENT, type=gtk.MESSAGE_WARNING,
 | 
					            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"))
 | 
					                    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 ") \
 | 
					            diastring = _("Please confirm that you want to (re-)create the tables.") \
 | 
				
			||||||
                        +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.")
 | 
					                        + (_(" 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
 | 
					            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
 | 
					            # disable windowclose, do not want the the underlying processing interrupted mid-process
 | 
				
			||||||
            dia_confirm.set_deletable(False)
 | 
					            dia_confirm.set_deletable(False)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -224,7 +224,7 @@ class Importer:
 | 
				
			||||||
                #print "                    adding file ", file
 | 
					                #print "                    adding file ", file
 | 
				
			||||||
                self.addImportFile(os.path.join(dir, file), site, filter)
 | 
					                self.addImportFile(os.path.join(dir, file), site, filter)
 | 
				
			||||||
        else:
 | 
					        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):
 | 
					    def runImport(self):
 | 
				
			||||||
        """"Run full import on self.filelist. This is called from GuiBulkImport.py"""
 | 
					        """"Run full import on self.filelist. This is called from GuiBulkImport.py"""
 | 
				
			||||||
| 
						 | 
					@ -310,7 +310,7 @@ class Importer:
 | 
				
			||||||
            toterrors += errors
 | 
					            toterrors += errors
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        for i in xrange( self.settings['threads'] ):
 | 
					        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)
 | 
					            db.send_finish_msg(q)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        return (totstored, totdups, totpartial, toterrors)
 | 
					        return (totstored, totdups, totpartial, toterrors)
 | 
				
			||||||
| 
						 | 
					@ -436,9 +436,9 @@ class Importer:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # Load filter, process file, pass returned filename to import_fpdb_file
 | 
					        # Load filter, process file, pass returned filename to import_fpdb_file
 | 
				
			||||||
        if self.settings['threads'] > 0 and self.writeq is not None:
 | 
					        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:
 | 
					        else:
 | 
				
			||||||
            log.info(_("Converting ") + file)
 | 
					            log.info(_("Converting %s") % file)
 | 
				
			||||||
        hhbase    = self.config.get_import_parameters().get("hhArchiveBase")
 | 
					        hhbase    = self.config.get_import_parameters().get("hhArchiveBase")
 | 
				
			||||||
        hhbase    = os.path.expanduser(hhbase)
 | 
					        hhbase    = os.path.expanduser(hhbase)
 | 
				
			||||||
        hhdir     = os.path.join(hhbase,site)
 | 
					        hhdir     = os.path.join(hhbase,site)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user