diff options
author | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-05-29 18:48:39 -0400 |
---|---|---|
committer | Michael DeHaan <mdehaan@mdehaan.rdu.redhat.com> | 2007-05-29 18:48:39 -0400 |
commit | f0d5545df35f9974fb8c4ae572cfea831e79a358 (patch) | |
tree | 7876991786aac9479faa894c4d0f7dcb2a9cdcea /cobbler/collection.py | |
parent | 201e727a1fc571f3a56763dc044a58504cc89af6 (diff) | |
download | cobbler-f0d5545df35f9974fb8c4ae572cfea831e79a358.tar.gz cobbler-f0d5545df35f9974fb8c4ae572cfea831e79a358.tar.xz cobbler-f0d5545df35f9974fb8c4ae572cfea831e79a358.zip |
Begining of i18n of cobbler. Tests pass, works with English. Need to test
translation function and run manual testing to ensure no functional errors in other
places (such as import).
cobbler_msg (strings file) has been removed.
Diffstat (limited to 'cobbler/collection.py')
-rw-r--r-- | cobbler/collection.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cobbler/collection.py b/cobbler/collection.py index e740c190..5e265fc2 100644 --- a/cobbler/collection.py +++ b/cobbler/collection.py @@ -13,18 +13,19 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. """ import exceptions -import cexceptions +from cexceptions import * import serializable import utils import glob import sub_process -import cobbler_msg import action_litesync import item_system import item_profile import item_distro +from rhpl.translate import _, N_, textdomain, utf8 + class Collection(serializable.Serializable): def __init__(self,config): @@ -86,7 +87,7 @@ class Collection(serializable.Serializable): won't be added to the collection). """ if ref is None or not ref.is_valid(): - raise cexceptions.CobblerException("bad_param") + raise CX(_("invalid parameter")) self.listing[ref.name] = ref # perform filesystem operations @@ -99,7 +100,7 @@ class Collection(serializable.Serializable): elif isinstance(ref, item_distro.Distro): lite_sync.add_single_distro(ref.name) else: - print "AIEEE ??? %s " % type(ref) + print _("Internal error. Object type not recognized: %s") % type(ref) # save the tree, so if neccessary, scripts can examine it. self.config.api.serialize() @@ -127,7 +128,7 @@ class Collection(serializable.Serializable): if len(values) > 0: return "\n\n".join(results) else: - return cobbler_msg.lookup("empty_list") % cobbler_msg.lookup(self.collection_type()) + return _("No objects found") def __iter__(self): """ |