reduce translatable words by about 40

This commit is contained in:
Steffen Schaumburg 2011-04-05 02:08:28 +02:00
parent 359ba7926a
commit 84961625e4
2 changed files with 14 additions and 15 deletions

View File

@ -637,14 +637,14 @@ class RawHands:
if save in ("none", "error", "all"):
self.save=save
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"
compression=node.getAttribute("compression")
if save in ("none", "gzip", "bzip2"):
self.compression=compression
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"
#end def __init__
@ -663,14 +663,14 @@ class RawTourneys:
if save in ("none", "error", "all"):
self.save=save
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"
compression=node.getAttribute("compression")
if save in ("none", "gzip", "bzip2"):
self.compression=compression
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"
#end def __init__
@ -688,8 +688,8 @@ class Config:
if file is not None: # config file path passed in
file = os.path.expanduser(file)
if not os.path.exists(file):
print _("Configuration file %s not found. Using defaults.") % (file)
sys.stderr.write(_("Configuration file %s not found. Using defaults.") % (file))
print _("Configuration file %s not found. Using defaults.") % (file)
sys.stderr.write(_("Configuration file %s not found. Using defaults.") % (file))
file = None
self.example_copy,example_file = True,None
@ -726,7 +726,7 @@ class Config:
self.doc = doc
self.file_error = None
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)
self.file_error = sys.exc_info()[1]
# we could add a parameter to decide whether to return or read a line and exit?
@ -842,7 +842,7 @@ class Config:
try:
example_doc = xml.dom.minidom.parse(example_file)
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
for cnode in doc.getElementsByTagName("FreePokerToolsConfig"):

View File

@ -467,7 +467,7 @@ class Database:
os.mkdir(self.config.dir_database)
database = os.path.join(self.config.dir_database, 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:
self.connection = sqlite3.connect(self.db_path, detect_types=sqlite3.PARSE_DECLTYPES )
self.__connected = True
@ -510,19 +510,18 @@ class Database:
self.cursor.execute("SELECT * FROM Settings")
settings = self.cursor.fetchone()
if settings[0] != DB_VERSION:
log.error(_("outdated or too new database version (%s) - please recreate tables")
% (settings[0]))
log.error((_("Outdated or too new database version (%s).") % (settings[0])) + " " + _("Please recreate tables."))
self.wrongDbVersion = True
except:# _mysql_exceptions.ProgrammingError:
if database != ":memory:":
if create:
print _("Failed to read settings table - recreating tables")
log.info(_("Failed to read settings table - recreating tables"))
print (_("Failed to read settings table.") + " - " + _("Recreating tables."))
log.info(_("Failed to read settings table.") + " - " + _("Recreating tables."))
self.recreate_tables()
self.check_version(database=database, create=False)
else:
print _("Failed to read settings table - please recreate tables")
log.info(_("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."))
self.wrongDbVersion = True
else:
self.wrongDbVersion = True