This commit is contained in:
Frisk 2020-11-18 11:07:07 +01:00
parent 1c86886a2b
commit e45f53bd5d
No known key found for this signature in database
GPG key ID: 213F7C15068AF8AC
2 changed files with 50 additions and 25 deletions

View file

@ -9,7 +9,7 @@ msgstr ""
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-11 19:35+0200\n"
"PO-Revision-Date: 2020-08-21 04:13+0000\n"
"Last-Translator: Dianliang233 <dianliang233@gmail.com>\n"
"Last-Translator: Dianliang233 <>\n"
"Language-Team: Chinese (Simplified) <https://weblate.frisk.space/projects/"
"rcgcdw/rc_formatters/zh-hans/>\n"
"Language: zh-hans\n"

View file

@ -195,43 +195,68 @@ def compact_formatter(action, change, parsed_comment, categories, recent_changes
content = ""+_("[{author}]({author_url}) unblocked [{blocked_user}]({user_url}){comment}").format(author=author, author_url=author_url, blocked_user=user, user_url=link, comment=parsed_comment)
elif action == "curseprofile/comment-created":
link = link_formatter(create_article_path("Special:CommentPermalink/{commentid}".format(commentid=change["logparams"]["4:comment_id"])))
content = "✉️ "+_("[{author}]({author_url}) left a [comment]({comment}) on {target} profile").format(author=author, author_url=author_url, comment=link, target=change["title"].split(':')[1]+("'s" if change["title"].split(':')[1] != change["user"] else _("their own profile")))
target_user = change["title"].split(':')[1]
if target_user != change["user"]:
content = "✉️ "+ _("[{author}]({author_url}) left a [comment]({comment}) on {target}'s profile".format(author=author, author_url=author_url, comment=link, target=target_user))
else:
content = "✉️ "+ _("[{author}]({author_url}) left a [comment]({comment}) on their own profile".format(author=author, comment=link, author_url=author_url))
elif action == "curseprofile/comment-replied":
link = link_formatter(create_article_path("Special:CommentPermalink/{commentid}".format(commentid=change["logparams"]["4:comment_id"])))
content = "📩 "+_("[{author}]({author_url}) replied to a [comment]({comment}) on {target} profile").format(author=author,
author_url=author_url,
comment=link,
target=change["title"].split(':')[1] if change["title"].split(':')[1] !=change["user"] else _("their own"))
target_user = change["title"].split(':')[1]
if target_user != change["user"]:
content = "📩 "+ _(
"[{author}]({author_url}) replied to a [comment]({comment}) on {target}'s profile".format(author=author,
author_url=author_url,
comment=link,
target=target_user))
else:
content = "📩 "+ _(
"[{author}]({author_url}) replied to a [comment]({comment}) on their own profile".format(author=author,
comment=link,
author_url=author_url))
elif action == "curseprofile/comment-edited":
link = link_formatter(create_article_path("Special:CommentPermalink/{commentid}".format(commentid=change["logparams"]["4:comment_id"])))
content = "📧 "+_("[{author}]({author_url}) edited a [comment]({comment}) on {target} profile").format(author=author,
author_url=author_url,
comment=link,
target=change["title"].split(':')[1] if change["title"].split(':')[1] !=change["user"] else _("their own"))
target_user = change["title"].split(':')[1]
if target_user != change["user"]:
content = "📧 "+ _(
"[{author}]({author_url}) edited a [comment]({comment}) on {target}'s profile".format(author=author,
author_url=author_url,
comment=link,
target=target_user))
else:
content = "📧 "+ _(
"[{author}]({author_url}) edited a [comment]({comment}) on their own profile".format(author=author,
comment=link,
author_url=author_url))
elif action == "curseprofile/comment-purged":
link = link_formatter(create_article_path("Special:CommentPermalink/{commentid}".format(commentid=change["logparams"]["4:comment_id"])))
content = "👁️ "+_("[{author}]({author_url}) purged a comment on {target} profile").format(author=author,
author_url=author_url,
target=
change["title"].split(':')[
1] if
change["title"].split(':')[
1] != change[
"user"] else _(
"their own"))
target_user = change["title"].split(':')[1]
if target_user != change["user"]:
content = "👁️ " + _("[{author}]({author_url}) purged a comment on {target}'s profile".format(author=author, author_url=author_url,target=target_user))
else:
content = "👁️ " + _("[{author}]({author_url}) purged a comment on their own profile".format(author=author, author_url=author_url))
elif action == "curseprofile/comment-deleted":
content = "🗑️ "+_("[{author}]({author_url}) deleted a comment on {target} profile").format(author=author,
author_url=author_url,
target=change["title"].split(':')[1] if change["title"].split(':')[1] !=change["user"] else _("their own"))
target_user = change["title"].split(':')[1]
if target_user != change["user"]:
content = "🗑️ "+ _("[{author}]({author_url}) deleted a comment on {target}'s profile".format(author=author,author_url=author_url, target=target_user))
else:
content = "🗑️ "+ _("[{author}]({author_url}) deleted a comment on their own profile".format(author=author, author_url=author_url))
elif action == "curseprofile/profile-edited":
link = link_formatter(create_article_path("UserProfile:{user}".format(user=change["title"].split(":")[1])))
target = _("[{target}]({target_url})'s").format(target=change["title"].split(':')[1], target_url=link) if change["title"].split(':')[1] != author else _("[their own]({target_url})").format(target_url=link)
content = "📌 "+_("[{author}]({author_url}) edited the {field} on {target} profile. *({desc})*").format(author=author,
target_user = change["title"].split(':')[1]
if target_user != change["user"]:
content = "📌 "+_("[{author}]({author_url}) edited the {field} on {target}'s profile. *({desc})*").format(author=author,
author_url=author_url,
target=target,
target=target_user,
field=profile_field_name(change["logparams"]['4:section'], False),
desc=BeautifulSoup(change["parsedcomment"], "lxml").get_text())
else:
content = "📌 " + _("[{author}]({author_url}) edited the {field} on their own profile. *({desc})*").format(
author=author,
author_url=author_url,
field=profile_field_name(change["logparams"]['4:section'], False),
desc=BeautifulSoup(change["parsedcomment"], "lxml").get_text())
elif action in ("rights/rights", "rights/autopromote"):
link = link_formatter(create_article_path("User:{user}".format(user=change["title"].split(":")[1])))
old_groups = []