fix oldid

This commit is contained in:
Markus-Rost 2020-11-30 19:14:27 +01:00
parent 0d326a6126
commit 4061e1ce59

View file

@ -477,9 +477,9 @@ def compact_formatter(action, change, parsed_comment, categories, recent_changes
elif action == "pagetranslation/mark":
link = create_article_path(change["title"])
if "?" in link:
link = link + "&oldid=" + change["logparams"]["revision"]
link = link + "&oldid={}".format(change["logparams"]["revision"])
else:
link = link + "?oldid=" + change["logparams"]["revision"]
link = link + "?oldid={}".format(change["logparams"]["revision"])
link = link_formatter(link)
content = "🌐 " + _("[{author}]({author_url}) marked [{article}]({article_url}) for translation{comment}").format(
author=author, author_url=author_url,
@ -594,9 +594,9 @@ def compact_formatter(action, change, parsed_comment, categories, recent_changes
elif action == "translationreview/message":
link = create_article_path(change["title"])
if "?" in link:
link = link + "&oldid=" + change["logparams"]["revision"]
link = link + "&oldid={}".format(change["logparams"]["revision"])
else:
link = link + "?oldid=" + change["logparams"]["revision"]
link = link + "?oldid={}".format(change["logparams"]["revision"])
link = link_formatter(link)
content = "🌐 " + _("[{author}]({author_url}) reviewed translation [{article}]({article_url}){comment}").format(
author=author, author_url=author_url,
@ -1127,9 +1127,9 @@ def embed_formatter(action, change, parsed_comment, categories, recent_changes):
elif action == "pagetranslation/mark":
link = create_article_path(change["title"])
if "?" in link:
link = link + "&oldid=" + change["logparams"]["revision"]
link = link + "&oldid={}".format(change["logparams"]["revision"])
else:
link = link + "?oldid=" + change["logparams"]["revision"]
link = link + "?oldid={}".format(change["logparams"]["revision"])
embed["title"] = _("Marked \"{article}\" for translation").format(article=change["title"])
elif action == "pagetranslation/unmark":
link = create_article_path(change["title"])
@ -1177,9 +1177,9 @@ def embed_formatter(action, change, parsed_comment, categories, recent_changes):
elif action == "translationreview/message":
link = create_article_path(change["title"])
if "?" in link:
link = link + "&oldid=" + change["logparams"]["revision"]
link = link + "&oldid={}".format(change["logparams"]["revision"])
else:
link = link + "?oldid=" + change["logparams"]["revision"]
link = link + "?oldid={}".format(change["logparams"]["revision"])
embed["title"] = _("Reviewed translation \"{article}\"").format(article=change["title"])
elif action == "translationreview/group":
link = create_article_path(change["title"])