Пример #1
0
	def transString(self, content, pid=0):
		who = None
		if pid:
			who = getRole(pid)

		if who:
			if "$targetName" in content and hasattr(who,"pkTargetId"):
				target = getRole(who.pkTargetId)
				if target:
					content = content.replace("$targetName", target.name)

		return customActivity.transString(self, content, pid)
Пример #2
0
    def transString(self, content, pid=0):
        '''转化字符串
		'''

        who = None
        if pid:
            who = getRole(pid)
        if who:
            if "$teamRoleName" in content:
                content = content.replace("$teamRoleName",
                                          ",".join(who.teamRoleName))
        return customActivity.transString(self, content, pid)