Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/lobby/LobbyPage/KickStrings.js
- This file was added.
Property | Old Value | New Value |
---|---|---|
svn:eol-style | null | native \ No newline at end of property |
class KickStrings | |||||
{ | |||||
get(banned, message) | |||||
{ | |||||
let level = banned ? "Banned" : "Kicked"; | |||||
let kickString = | |||||
message.nick == g_Username ? | |||||
this.Strings.Local[level] : | |||||
sprintf(this.Strings.Remote[level], message); | |||||
if (message.reason) | |||||
kickString += " " + sprintf(this.Reason, message); | |||||
return kickString; | |||||
} | |||||
} | |||||
KickStrings.prototype.Strings = { | |||||
"Local": { | |||||
"Kicked": translate("You have been kicked from the lobby!"), | |||||
"Banned": translate("You have been banned from the lobby!") | |||||
}, | |||||
"Remote": { | |||||
"Kicked": translate("%(nick)s has been kicked from the lobby."), | |||||
"Banned": translate("%(nick)s has been banned from the lobby.") | |||||
} | |||||
}; | |||||
KickStrings.prototype.Reason = | |||||
translateWithContext("lobby kick", "Reason: %(reason)s"); |
Wildfire Games · Phabricator