diff options
Diffstat (limited to '')
-rw-r--r-- | i18n/es.po (renamed from i18n/es_ES.po) | 0 | ||||
-rw-r--r-- | i18n/messages.pot | 11 | ||||
-rw-r--r-- | plugins/new_version.py | 2 | ||||
-rw-r--r-- | portato/db/__init__.py | 19 | ||||
-rw-r--r-- | portato/gui/windows/preference.py | 2 |
5 files changed, 20 insertions, 14 deletions
diff --git a/i18n/es_ES.po b/i18n/es.po index 115d3ce..115d3ce 100644 --- a/i18n/es_ES.po +++ b/i18n/es.po diff --git a/i18n/messages.pot b/i18n/messages.pot index 62e9bef..541496e 100644 --- a/i18n/messages.pot +++ b/i18n/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-14 22:21+0200\n" +"POT-Creation-Date: 2010-04-15 03:44+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -966,12 +966,17 @@ msgid "" "Additionally, this is the only database allowing searching in descriptions." msgstr "" -#: portato/db/__init__.py:51 portato/db/__init__.py:66 +#: portato/db/__init__.py:45 +#, python-format +msgid "Using database type '%s'" +msgstr "" + +#: portato/db/__init__.py:52 portato/db/__init__.py:67 #, python-format msgid "Cannot load %s." msgstr "" -#: portato/db/__init__.py:72 +#: portato/db/__init__.py:73 #, python-format msgid "Unknown database type: %s" msgstr "" diff --git a/plugins/new_version.py b/plugins/new_version.py index 876beea..fa1fa0d 100644 --- a/plugins/new_version.py +++ b/plugins/new_version.py @@ -24,7 +24,7 @@ class NewVersionFinder(WidgetPlugin): Checks for a new version of portato every 30 minutes and on startup. """ __author__ = "René 'Necoro' Neumann" - __dependency__ = ["dev-util/git"] + __dependency__ = ["dev-vcs/git", "dev-python/notify-python"] def init (self): self.add_call("main", self.run) diff --git a/portato/db/__init__.py b/portato/db/__init__.py index 4e18bdd..74479e6 100644 --- a/portato/db/__init__.py +++ b/portato/db/__init__.py @@ -13,13 +13,13 @@ from . import database as db from .exceptions import UnknownDatabaseTypeError, DatabaseInstantiationError from ..session import Session, SectionDict -from ..helper import debug, warning, error +from ..helper import debug, warning, error, info -types = { - "sql": (_("SQLite"), _("Uses an SQLite-database to store package information.\nMay take longer to generate at the first time, but has advantages if portato is re-started with an unchanged portage tree. Additionally it allows to use fast SQL expressions for fetching the data.")), - "dict": (_("Hashmap"), _("Uses an in-memory hashmap to store package information.\nHas been used since at least version 0.3.3, but all information has to be regenerated on each startup.")), - "eixsql" : (_("eix + SQLite"), _("Similar to SQLite, but now uses the eix database to get the package information.\nThis should be much faster on startup, but requires that your eix database is always up-to-date.\nAdditionally, this is the only database allowing searching in descriptions.")) - } +types = ( + ("eixsql", _("eix + SQLite"), _("Similar to SQLite, but now uses the eix database to get the package information.\nThis should be much faster on startup, but requires that your eix database is always up-to-date.\nAdditionally, this is the only database allowing searching in descriptions.")), + ("sql", _("SQLite"), _("Uses an SQLite-database to store package information.\nMay take longer to generate at the first time, but has advantages if portato is re-started with an unchanged portage tree. Additionally it allows to use fast SQL expressions for fetching the data.")), + ("dict", _("Hashmap"), _("Uses an in-memory hashmap to store package information.\nHas been used since at least version 0.3.3, but all information has to be regenerated on each startup.")) + ) class Database(db.Database): DEFAULT = "dict" @@ -40,9 +40,10 @@ class Database(db.Database): type = cls.DEFAULT cls.DB_TYPE = type + msg = _("Using database type '%s'") if type == "sql": - debug("Using SQLDatabase") + info(msg, "SQLDatabase") try: from .sql import SQLDatabase except ImportError: @@ -52,12 +53,12 @@ class Database(db.Database): return SQLDatabase elif type == "dict": - debug("Using HashDatabase") + info(msg, "HashDatabase") from .hash import HashDatabase return HashDatabase elif type == "eixsql": - debug("Using EixSQLDatabase") + info(msg,"EixSQLDatabase") try: from .eix_sql import EixSQLDatabase except ImportError: diff --git a/portato/gui/windows/preference.py b/portato/gui/windows/preference.py index 4bf5b97..772c0c7 100644 --- a/portato/gui/windows/preference.py +++ b/portato/gui/windows/preference.py @@ -170,7 +170,7 @@ class PreferenceWindow (AbstractDialog): ctr = 0 active = 0 - for k, (name, desc) in db.types.items(): + for k, name, desc in db.types: if k == dbtype: active = ctr |