German translation by Markus, small fixes from initial testing

This commit is contained in:
Frisk 2020-04-27 18:06:48 +02:00
parent 8d54081316
commit 4dcea63f86
No known key found for this signature in database
GPG key ID: 213F7C15068AF8AC
3 changed files with 39 additions and 13 deletions

View file

@ -59,11 +59,14 @@ def embed_formatter(post, post_type):
embed["url"] = "{wikiurl}f/p/{threadId}".format(wikiurl=settings["fandom_discussions"]["wiki_url"], embed["url"] = "{wikiurl}f/p/{threadId}".format(wikiurl=settings["fandom_discussions"]["wiki_url"],
threadId=post["threadId"]) threadId=post["threadId"])
if settings["fandom_discussions"]["appearance"]["embed"]["show_content"]: if settings["fandom_discussions"]["appearance"]["embed"]["show_content"]:
npost = DiscussionsFromHellParser(post) if post.get("jsonModel") is not None:
embed["description"] = npost.parse() npost = DiscussionsFromHellParser(post)
if npost.image_only: embed["description"] = npost.parse()
embed["image"]["url"] = embed["description"].strip() if npost.image_only:
embed["description"] = "" embed["image"]["url"] = embed["description"].strip()
embed["description"] = ""
else: # Fallback when model is not available
embed["description"] = post.get("rawContent", "")
elif post_type == "POLL": elif post_type == "POLL":
embed.event_type = "discussion/poll" embed.event_type = "discussion/poll"
poll = post["poll"] poll = post["poll"]
@ -198,7 +201,7 @@ class DiscussionsFromHellParser:
for mark in marks: for mark in marks:
if mark["type"] == "mention": if mark["type"] == "mention":
prefix += "[" prefix += "["
suffix = "]({wiki}f/u/{userid}){suffix}".format(wiki=WIKI_SCRIPT_PATH, userid=mark["attrs"]["userId"], suffix=suffix) suffix = "]({wiki}f/u/{userid}){suffix}".format(wiki=settings["fandom_discussions"]["wiki_url"], userid=mark["attrs"]["userId"], suffix=suffix)
elif mark["type"] == "strong": elif mark["type"] == "strong":
prefix += "**" prefix += "**"
suffix = "**{suffix}".format(suffix=suffix) suffix = "**{suffix}".format(suffix=suffix)

Binary file not shown.

View file

@ -7,28 +7,42 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-04-06 18:55+0200\n" "POT-Creation-Date: 2020-04-26 22:05+0200\n"
"PO-Revision-Date: 2020-04-07 11:53+0200\n" "PO-Revision-Date: 2020-04-27 17:46+0200\n"
"Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
"Language: de\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.3\n" "X-Generator: Poedit 2.3\n"
"Last-Translator: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: de\n"
#: discussions.py:53 #: discussions.py:53
#, python-brace-format #, python-brace-format
msgid "Replied to \"{title}\"" msgid "Replied to \"{title}\""
msgstr "Antwortete auf „{title}“" msgstr "Antwortete auf „{title}“"
#: discussions.py:56 #: discussions.py:58
#, python-brace-format #, python-brace-format
msgid "Created \"{title}\"" msgid "Created \"{title}\""
msgstr "Erstellte „{title}“" msgstr "Erstellte „{title}“"
#: discussions.py:73 #: discussions.py:70
#, python-brace-format
msgid "Created a poll titled \"{title}\""
msgstr "Erstellte eine Umfrage „{title}“"
#: discussions.py:75
msgid "Option {}"
msgstr "Option {}"
#: discussions.py:76
#, python-brace-format
msgid "__[View image]({image_url})__"
msgstr "__[Bild öffnen]({image_url})__"
#: discussions.py:89
#, python-brace-format #, python-brace-format
msgid "" msgid ""
"[{author}](<{url}f/u/{creatorId}>) created [{title}](<{url}f/p/{threadId}>) " "[{author}](<{url}f/u/{creatorId}>) created [{title}](<{url}f/p/{threadId}>) "
@ -37,7 +51,7 @@ msgstr ""
"[{author}](<{url}f/u/{creatorId}>) erstellte [{title}](<{url}f/p/{threadId}" "[{author}](<{url}f/u/{creatorId}>) erstellte [{title}](<{url}f/p/{threadId}"
">) in {forumName}" ">) in {forumName}"
#: discussions.py:76 #: discussions.py:92
#, python-brace-format #, python-brace-format
msgid "" msgid ""
"[{author}](<{url}f/u/{creatorId}>) created a [reply](<{url}f/p/{threadId}/r/" "[{author}](<{url}f/u/{creatorId}>) created a [reply](<{url}f/p/{threadId}/r/"
@ -45,3 +59,12 @@ msgid ""
msgstr "" msgstr ""
"[{author}](<{url}f/u/{creatorId}>) erstellte eine [Antwork](<{url}f/p/" "[{author}](<{url}f/u/{creatorId}>) erstellte eine [Antwork](<{url}f/p/"
"{threadId}/r/{postId}>) zu [{title}](<{url}f/p/{threadId}>) in {forumName}" "{threadId}/r/{postId}>) zu [{title}](<{url}f/p/{threadId}>) in {forumName}"
#: discussions.py:97
#, python-brace-format
msgid ""
"[{author}](<{url}f/u/{creatorId}>) created a poll [{title}](<{url}f/p/"
"{threadId}>) in {forumName}"
msgstr ""
"[{author}](<{url}f/u/{creatorId}>) erstellte eine Umfrage [{title}](<{url}f/"
"p/{threadId}>) in {forumName}"