diff --git a/locale/sv/LC_MESSAGES/django.mo b/locale/sv/LC_MESSAGES/django.mo index 8dd1ea2f92..444dc2b389 100644 Binary files a/locale/sv/LC_MESSAGES/django.mo and b/locale/sv/LC_MESSAGES/django.mo differ diff --git a/locale/sv/LC_MESSAGES/django.po b/locale/sv/LC_MESSAGES/django.po index e09da6843c..c3eb93fd34 100644 --- a/locale/sv/LC_MESSAGES/django.po +++ b/locale/sv/LC_MESSAGES/django.po @@ -7,9 +7,9 @@ msgid "" msgstr "" "Project-Id-Version: Evennia Beta\n" -"Report-Msgid-Bugs-To: www.evennia.com\n" -"POT-Creation-Date: 2012-06-13 23:11+0200\n" -"PO-Revision-Date: 2012-06-14 02:40+0100\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-06-14 08:52+0200\n" +"PO-Revision-Date: 2012-06-14 08:55+0100\n" "Last-Translator: Griatch \n" "Language-Team: Swedish <>\n" "Language: \n" @@ -214,6 +214,29 @@ msgstr "Lås: '%s' has ickematchande parenteser." msgid "Lock: '%s' has no valid lock functions." msgstr "Lås: '%s' innehåller inga acceptabla låsfunktioner." +#: src/objects/models.py:634 +#, python-format +msgid "Couldn't perform move ('%s'). Contact an admin." +msgstr "Kunde inte utföra föflyttningen ('%s'). Kontakta en admininstrator." + +#: src/objects/models.py:639 +msgid "The destination doesn't exist." +msgstr "Destinationen existerar inte." + +#: src/objects/models.py:752 +#, python-format +msgid "Could not find default home '(#%d)'." +msgstr "Kunde inte hitta standard-hem '(#'%d)'." + +#: src/objects/models.py:767 +msgid "Something went wrong! You are dumped into nowhere. Contact an admin." +msgstr "Nåtgot gick fel! Du har blivit flyttat till en icke-existerande plats. Kontakta en admininstrator." + +#: src/objects/models.py:820 +#, python-format +msgid "Your character %s has been destroyed." +msgstr "Din karaktär %s har blivit raderad." + #: src/scripts/scripthandler.py:43 #, python-format msgid "" diff --git a/src/objects/models.py b/src/objects/models.py index e3e7316c83..0f66b412e4 100644 --- a/src/objects/models.py +++ b/src/objects/models.py @@ -30,6 +30,8 @@ from src.scripts.scripthandler import ScriptHandler from src.utils import logger from src.utils.utils import make_iter, to_unicode, variable_from_module, inherits_from +from django.utils.translation import ugettext as _ + #__all__ = ("ObjAttribute", "Alias", "ObjectNick", "ObjectDB") @@ -282,7 +284,7 @@ class ObjectDB(TypedObject): except Exception: string = "Cannot set location: " string += "%s is not a valid location." - self.msg(string % location) + self.msg(_(string) % location) logger.log_trace(string) raise #@location.deleter @@ -319,7 +321,7 @@ class ObjectDB(TypedObject): except Exception: string = "Cannot set home: " string += "%s is not a valid home." - self.msg(string % home) + self.msg(_(string) % home) logger.log_trace(string) #raise #@home.deleter @@ -358,7 +360,7 @@ class ObjectDB(TypedObject): except Exception: string = "Cannot set destination: " string += "%s is not a valid destination." - self.msg(string % destination) + self.msg(_(string) % destination) logger.log_trace(string) raise #@destination.deleter @@ -629,12 +631,12 @@ class ObjectDB(TypedObject): logger.log_trace() self.msg(errstring) - errtxt = "Couldn't perform move ('%s'). Contact an admin." + errtxt = _("Couldn't perform move ('%s'). Contact an admin.") if not emit_to_obj: emit_to_obj = self if not destination: - emit_to_obj.msg("The destination doesn't exist.") + emit_to_obj.msg(_("The destination doesn't exist.")) return if destination.destination and use_destination: # traverse exits @@ -747,7 +749,7 @@ class ObjectDB(TypedObject): # we are deleting default home! default_home = None except Exception: - string = "Could not find default home '(#%d)'." + string = _("Could not find default home '(#%d)'.") logger.log_errmsg(string % default_home_id) default_home = None @@ -762,7 +764,7 @@ class ObjectDB(TypedObject): string = "Missing default home, '%s(#%d)' " string += "now has a null location." obj.location = None - obj.msg("Something went wrong! You are dumped into nowhere. Contact an admin.") + obj.msg(_("Something went wrong! You are dumped into nowhere. Contact an admin.")) logger.log_errmsg(string % (obj.name, obj.dbid)) return @@ -770,11 +772,11 @@ class ObjectDB(TypedObject): if home: string = "Your current location has ceased to exist," string += " moving you to %s(#%d)." - obj.msg(string % (home.name, home.dbid)) + obj.msg(_(string) % (home.name, home.dbid)) else: # Famous last words: The player should never see this. string = "This place should not exist ... contact an admin." - obj.msg(string) + obj.msg(_(string)) obj.move_to(home) def copy(self, new_key=None): @@ -815,7 +817,7 @@ class ObjectDB(TypedObject): # See if we need to kick the player off. for session in self.sessions: - session.msg("Your character %s has been destroyed." % self.name) + session.msg(_("Your character %s has been destroyed.") % self.name) # no need to disconnect, Player just jumps to OOC mode. # sever the connection (important!) if object.__getattribute__(self, 'player') and self.player: