1
# __init__.py for computerjanitor
2
# Copyright (C) 2008 Canonical, Ltd.
4
# This program is free software: you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation, version 3 of the License.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program. If not, see <http://www.gnu.org/licenses/>.
17
from __future__ import absolute_import
22
# Set up gettext. This needs to be before the import statements below
23
# so that if any modules call it right after importing, they find
27
"""Set up gettext for a module.
29
Return a method to be used for looking up translations. Usage:
31
import computerjanitor
32
_ = computerjanitor.setup_gettext()
39
domain = 'update-manager'
40
localedir = os.environ.get('LOCPATH', None)
41
t = gettext.translation(domain, localedir=localedir, fallback=True)
44
except AttributeError:
48
from .cruft import Cruft
49
from .file_cruft import FileCruft
50
from .package_cruft import PackageCruft
51
from .missing_package_cruft import MissingPackageCruft
52
from .exc import ComputerJanitorException as Exception, UnimplementedMethod
53
from .plugin import Plugin, PluginManager
55
# reference it here to make pyflakes happy