reduce translatable words by about 40
This commit is contained in:
parent
359ba7926a
commit
84961625e4
|
@ -637,14 +637,14 @@ class RawHands:
|
||||||
if save in ("none", "error", "all"):
|
if save in ("none", "error", "all"):
|
||||||
self.save=save
|
self.save=save
|
||||||
else:
|
else:
|
||||||
print _("Invalid config value for raw_hands.save, defaulting to \"error\"")
|
print (_("Invalid config value for %s, defaulting to %s") % (raw_hands.save, "\"error\""))
|
||||||
self.save="error"
|
self.save="error"
|
||||||
|
|
||||||
compression=node.getAttribute("compression")
|
compression=node.getAttribute("compression")
|
||||||
if save in ("none", "gzip", "bzip2"):
|
if save in ("none", "gzip", "bzip2"):
|
||||||
self.compression=compression
|
self.compression=compression
|
||||||
else:
|
else:
|
||||||
print _("Invalid config value for raw_hands.compression, defaulting to \"none\"")
|
print (_("Invalid config value for %s, defaulting to %s") % (raw_hands.compression, "\"none\""))
|
||||||
self.compression="none"
|
self.compression="none"
|
||||||
#end def __init__
|
#end def __init__
|
||||||
|
|
||||||
|
@ -663,14 +663,14 @@ class RawTourneys:
|
||||||
if save in ("none", "error", "all"):
|
if save in ("none", "error", "all"):
|
||||||
self.save=save
|
self.save=save
|
||||||
else:
|
else:
|
||||||
print _("Invalid config value for raw_tourneys.save, defaulting to \"error\"")
|
print (_("Invalid config value for %s, defaulting to %s") % (raw_tourneys.save, "\"error\""))
|
||||||
self.save="error"
|
self.save="error"
|
||||||
|
|
||||||
compression=node.getAttribute("compression")
|
compression=node.getAttribute("compression")
|
||||||
if save in ("none", "gzip", "bzip2"):
|
if save in ("none", "gzip", "bzip2"):
|
||||||
self.compression=compression
|
self.compression=compression
|
||||||
else:
|
else:
|
||||||
print _("Invalid config value for raw_tourneys.compression, defaulting to \"none\"")
|
print (_("Invalid config value for %s, defaulting to %s") % (raw_tourneys.compression, "\"none\""))
|
||||||
self.compression="none"
|
self.compression="none"
|
||||||
#end def __init__
|
#end def __init__
|
||||||
|
|
||||||
|
@ -726,7 +726,7 @@ class Config:
|
||||||
self.doc = doc
|
self.doc = doc
|
||||||
self.file_error = None
|
self.file_error = None
|
||||||
except:
|
except:
|
||||||
log.error(_("Error parsing %s. See error log file.") % (file))
|
log.error((_("Error parsing %s.") % (file)) + _("See error log file."))
|
||||||
traceback.print_exc(file=sys.stderr)
|
traceback.print_exc(file=sys.stderr)
|
||||||
self.file_error = sys.exc_info()[1]
|
self.file_error = sys.exc_info()[1]
|
||||||
# we could add a parameter to decide whether to return or read a line and exit?
|
# we could add a parameter to decide whether to return or read a line and exit?
|
||||||
|
@ -842,7 +842,7 @@ class Config:
|
||||||
try:
|
try:
|
||||||
example_doc = xml.dom.minidom.parse(example_file)
|
example_doc = xml.dom.minidom.parse(example_file)
|
||||||
except:
|
except:
|
||||||
log.error(_("Error parsing example configuration file %s. See error log file.") % (example_file))
|
log.error((_("Error parsing example configuration file %s.") % (example_file)) + _("See error log file."))
|
||||||
return nodes_added
|
return nodes_added
|
||||||
|
|
||||||
for cnode in doc.getElementsByTagName("FreePokerToolsConfig"):
|
for cnode in doc.getElementsByTagName("FreePokerToolsConfig"):
|
||||||
|
|
|
@ -467,7 +467,7 @@ class Database:
|
||||||
os.mkdir(self.config.dir_database)
|
os.mkdir(self.config.dir_database)
|
||||||
database = os.path.join(self.config.dir_database, database)
|
database = os.path.join(self.config.dir_database, database)
|
||||||
self.db_path = database
|
self.db_path = database
|
||||||
log.info(_("Connecting to SQLite: %(database)s") % {'database':self.db_path})
|
log.info(_("Connecting to SQLite: %s") % self.db_path)
|
||||||
if os.path.exists(database) or create:
|
if os.path.exists(database) or create:
|
||||||
self.connection = sqlite3.connect(self.db_path, detect_types=sqlite3.PARSE_DECLTYPES )
|
self.connection = sqlite3.connect(self.db_path, detect_types=sqlite3.PARSE_DECLTYPES )
|
||||||
self.__connected = True
|
self.__connected = True
|
||||||
|
@ -510,19 +510,18 @@ class Database:
|
||||||
self.cursor.execute("SELECT * FROM Settings")
|
self.cursor.execute("SELECT * FROM Settings")
|
||||||
settings = self.cursor.fetchone()
|
settings = self.cursor.fetchone()
|
||||||
if settings[0] != DB_VERSION:
|
if settings[0] != DB_VERSION:
|
||||||
log.error(_("outdated or too new database version (%s) - please recreate tables")
|
log.error((_("Outdated or too new database version (%s).") % (settings[0])) + " " + _("Please recreate tables."))
|
||||||
% (settings[0]))
|
|
||||||
self.wrongDbVersion = True
|
self.wrongDbVersion = True
|
||||||
except:# _mysql_exceptions.ProgrammingError:
|
except:# _mysql_exceptions.ProgrammingError:
|
||||||
if database != ":memory:":
|
if database != ":memory:":
|
||||||
if create:
|
if create:
|
||||||
print _("Failed to read settings table - recreating tables")
|
print (_("Failed to read settings table.") + " - " + _("Recreating tables."))
|
||||||
log.info(_("Failed to read settings table - recreating tables"))
|
log.info(_("Failed to read settings table.") + " - " + _("Recreating tables."))
|
||||||
self.recreate_tables()
|
self.recreate_tables()
|
||||||
self.check_version(database=database, create=False)
|
self.check_version(database=database, create=False)
|
||||||
else:
|
else:
|
||||||
print _("Failed to read settings table - please recreate tables")
|
print (_("Failed to read settings table.") + " - " + _("Please recreate tables."))
|
||||||
log.info(_("Failed to read settings table - please recreate tables"))
|
log.info(_("Failed to read settings table.") + " - " + _("Please recreate tables."))
|
||||||
self.wrongDbVersion = True
|
self.wrongDbVersion = True
|
||||||
else:
|
else:
|
||||||
self.wrongDbVersion = True
|
self.wrongDbVersion = True
|
||||||
|
|
Loading…
Reference in New Issue
Block a user