fix format strings for i18n
This commit is contained in:
parent
bf0c7bc5c9
commit
87676b7c68
1 changed files with 11 additions and 19 deletions
|
|
@ -475,7 +475,7 @@ class DefaultAccount(AccountDB, metaclass=TypeclassBase):
|
||||||
return
|
return
|
||||||
if not obj.access(self, "puppet"):
|
if not obj.access(self, "puppet"):
|
||||||
# no access
|
# no access
|
||||||
self.msg(_("You don't have permission to puppet '{key}'.".format(key=obj.key)))
|
self.msg(_("You don't have permission to puppet '{key}'.").format(key=obj.key))
|
||||||
return
|
return
|
||||||
if obj.account:
|
if obj.account:
|
||||||
# object already puppeted
|
# object already puppeted
|
||||||
|
|
@ -484,27 +484,21 @@ class DefaultAccount(AccountDB, metaclass=TypeclassBase):
|
||||||
# we may take over another of our sessions
|
# we may take over another of our sessions
|
||||||
# output messages to the affected sessions
|
# output messages to the affected sessions
|
||||||
if _MULTISESSION_MODE in (1, 3):
|
if _MULTISESSION_MODE in (1, 3):
|
||||||
txt1 = _(
|
txt1 = _("Sharing |c{name}|n with another of your sessions.").format(
|
||||||
"Sharing |c{name}|n with another of your sessions.".format(
|
|
||||||
name=obj.name
|
|
||||||
)
|
|
||||||
)
|
|
||||||
txt2 = "|c{name}|n|G is now shared from another of your sessions.|n".format(
|
|
||||||
name=obj.name
|
name=obj.name
|
||||||
)
|
)
|
||||||
|
txt2 = _(
|
||||||
|
"|c{name}|n|G is now shared from another of your sessions.|n"
|
||||||
|
).format(name=obj.name)
|
||||||
self.msg(txt1, session=session)
|
self.msg(txt1, session=session)
|
||||||
self.msg(txt2, session=obj.sessions.all())
|
self.msg(txt2, session=obj.sessions.all())
|
||||||
else:
|
else:
|
||||||
txt1 = _(
|
txt1 = _("Taking over |c{name}|n from another of your sessions.").format(
|
||||||
"Taking over |c{name}|n from another of your sessions.".format(
|
name=obj.name
|
||||||
name=obj.name
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
txt2 = _(
|
txt2 = _(
|
||||||
"|c{name}|n|R is now acted from another of your sessions.|n".format(
|
"|c{name}|n|R is now acted from another of your sessions.|n"
|
||||||
name=obj.name
|
).format(name=obj.name)
|
||||||
)
|
|
||||||
)
|
|
||||||
self.msg(txt1, session=session)
|
self.msg(txt1, session=session)
|
||||||
self.msg(txt2, session=obj.sessions.all())
|
self.msg(txt2, session=obj.sessions.all())
|
||||||
self.unpuppet_object(obj.sessions.get())
|
self.unpuppet_object(obj.sessions.get())
|
||||||
|
|
@ -530,10 +524,8 @@ class DefaultAccount(AccountDB, metaclass=TypeclassBase):
|
||||||
and len(self.get_all_puppets()) >= _MAX_NR_SIMULTANEOUS_PUPPETS
|
and len(self.get_all_puppets()) >= _MAX_NR_SIMULTANEOUS_PUPPETS
|
||||||
):
|
):
|
||||||
self.msg(
|
self.msg(
|
||||||
_(
|
_("You cannot control any more puppets (max {max_puppets})").format(
|
||||||
"You cannot control any more puppets (max {max_puppets})".format(
|
max_puppets=_MAX_NR_SIMULTANEOUS_PUPPETS
|
||||||
max_puppets=_MAX_NR_SIMULTANEOUS_PUPPETS
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue