misc: fix unnamed arguments in format strings

This commit is contained in:
souliane 2014-02-17 14:58:26 +01:00
commit 24beb81688
5 changed files with 14 additions and 14 deletions

View file

@ -193,7 +193,7 @@ class RoomGame(object):
break
if not auth and (verbose or _DEBUG):
debug(_("%s not allowed to join the game %s in %s") % (user_jid_s or nick, self.name, room_jid_s))
debug(_("%(user)s not allowed to join the game %(game)s in %(room)s") % {'user': user_jid_s or nick, 'game': self.name, 'room': room_jid_s})
return auth
def _updatePlayers(self, room_jid_s, nicks, sync, profile):
@ -327,7 +327,7 @@ class RoomGame(object):
elif self.invite_mode == self.FROM_PLAYERS:
auth = self.isPlayer(room_jid_s, nick)
if not auth and (verbose or _DEBUG):
debug(_("%s not allowed to invite for the game %s in %s") % (nick, self.name, room_jid_s))
debug(_("%(user)s not allowed to invite for the game %(game)s in %(room)s") % {'user': nick, 'game': self.name, 'room': room_jid_s})
return auth
def isReferee(self, room_jid_s, nick):
@ -372,7 +372,7 @@ class RoomGame(object):
(nicks, missing) = self.host.plugins["XEP-0045"].getRoomNicksOfUsers(room, other_players, secure=False)
result = (len(nicks) == len(other_players), nicks, missing)
if not result[0] and (verbose or _DEBUG):
debug(_("Still waiting for %s before starting the game %s in %s") % (result[2], self.name, room.occupantJID.userhost()))
debug(_("Still waiting for %(users)s before starting the game %(game)s in %(room)s") % {'users': result[2], 'game': self.name, 'room': room.occupantJID.userhost()})
return result
def getUniqueName(self, muc_service="", profile_key='@DEFAULT@'):
@ -499,10 +499,10 @@ class RoomGame(object):
if self._gameExists(room_jid_s):
is_referee = self.isReferee(room_jid_s, user_nick)
if self._gameExists(room_jid_s, started=True):
warning(_("%s game already created in room %s") % (self.name, room_jid_s))
warning(_("%(game)s game already created in room %(room)s") % {'game': self.name, 'room': room_jid_s})
return False, is_referee
elif not is_referee:
warning(_("%s game in room %s can only be created by %s") % (self.name, room_jid_s, user_nick))
warning(_("%(game)s game in room %(room)s can only be created by %(user)s") % {'game': self.name, 'room': room_jid_s, 'user': user_nick})
return False, False
else:
self._initGame(room_jid_s, user_nick)
@ -515,7 +515,7 @@ class RoomGame(object):
@param room_jid: JID userhost of the room
@param nicks: list of players nicks in the room (referee included, in first position)
@param profile_key: %(doc_profile_key)s"""
debug(_("Creating %s game in room %s") % (self.name, room_jid_s))
debug(_("Creating %(game)s game in room %(room)s") % {'game': self.name, 'room': room_jid_s})
profile = self.host.memory.getProfileName(profile_key)
if not profile:
error(_("profile %s is unknown") % profile_key)