mirror of
https://gitlab.com/chicken-riders/RcGcDw.git
synced 2025-02-23 00:24:09 +00:00
Some small fixes and tweaks to make translation better
This commit is contained in:
parent
99669a1702
commit
843fc0c7bc
|
@ -190,9 +190,9 @@ def embed_discussion_forum(ctx: Context, post: dict):
|
|||
tag_displayname.append("[{title}]({url})".format(title=tag["articleTitle"], url=create_article_path(
|
||||
quote_plus(tag["articleTitle"].replace(" ", "_"), "/:?=&"))))
|
||||
if len(", ".join(tag_displayname)) > 1000:
|
||||
embed.add_field(_("Tags"), _("{} tags").format(len(post["_embedded"]["thread"][0]["tags"])))
|
||||
embed.add_field(formatters_i18n.pgettext("Fandom discussions Tags/Forums", "Tags"), formatters_i18n.pgettext("Fandom discussions amount of Tags/Forums", "{} tags").format(len(post["_embedded"]["thread"][0]["tags"])))
|
||||
else:
|
||||
embed.add_field(_("Tags"), ", ".join(tag_displayname))
|
||||
embed.add_field(formatters_i18n.pgettext("Fandom discussions Tags/Forums", "Tags"), ", ".join(tag_displayname))
|
||||
else:
|
||||
embed.event_type = "discussion/forum/reply"
|
||||
embed["title"] = _("Replied to \"{title}\"").format(title=post["_embedded"]["thread"][0]["title"])
|
||||
|
|
|
@ -863,7 +863,7 @@ def compact_rights_rights(ctx, change):
|
|||
else:
|
||||
content = _("{author} autopromoted [{target}]({target_url}) {added}{comma} {removed}{comment}").format(
|
||||
author=_("System"), author_url=author_url, target=sanitize_to_markdown(change["title"].split(":")[1]), target_url=link,
|
||||
added=added, comma="," if added and removed else "",removed=removed, comment=parsed_comment)
|
||||
added=added, comma=_(",") if added and removed else "",removed=removed, comment=parsed_comment)
|
||||
return DiscordMessage(ctx.message_type, ctx.event, ctx.webhook_url, content=content)
|
||||
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ def embed_helper(ctx: Context, message: DiscordMessage, change: dict, set_user=T
|
|||
tag_displayname.append(ctx.client.tags[tag])
|
||||
else:
|
||||
tag_displayname.append(tag)
|
||||
message.add_field(_("Tags"), ", ".join(tag_displayname))
|
||||
message.add_field(formatters_i18n.pgettext("recent changes Tags", "Tags"), ", ".join(tag_displayname))
|
||||
if ctx.categories is not None and not (len(ctx.categories["new"]) == 0 and len(ctx.categories["removed"]) == 0):
|
||||
new_cat = (_("**Added**: ") + ", ".join(list(ctx.categories["new"])[0:16]) + (
|
||||
"\n" if len(ctx.categories["new"]) <= 15 else _(" and {} more\n").format(
|
||||
|
|
Loading…
Reference in a new issue