Add German translation and fix encoding errors

While adding the German translation some encodings errors occurred due
to non-ASCII characters. Only these errors were fixed because a full
analysis of the strings will be performed when implementing support for
python3.
This commit is contained in:
Thomas 2021-05-11 20:42:50 +00:00
parent b1b8106275
commit 9e79850eee
4 changed files with 183 additions and 6 deletions

View File

@ -10,6 +10,9 @@
</extension>
<extension point="xbmc.service" library="service.py"/>
<extension point="xbmc.addon.metadata">
<summary lang="de_DE">Add-on für PeerTube</summary>
<description lang="de_DE">PeerTube ist eine kostenlose, dezentralisierte und föderierte Alternative zu anderen Videoplattformen (wie YouTube).</description>
<disclaimer lang="de_DE">Dieses Add-on wird nicht vom PeerTube-Team entwickelt.</disclaimer>
<summary lang="en_GB">Add-on for PeerTube</summary>
<description lang="en_GB">PeerTube is a free, decentralized and federated alternative to other video platforms (like YouTube).</description>
<disclaimer lang="en_GB">This add-on is not developed by PeerTube team.</disclaimer>

View File

@ -0,0 +1,166 @@
# Kodi Media Center language file
# Addon Name: Peertube
# Addon id: plugin.video.peertube
# Addon Provider: Cyrille B. + Thomas B.
msgid ""
msgstr ""
"Project-Id-Version: Kodi Addons\n"
"Report-Msgid-Bugs-To: https://framagit.org/StCyr/plugin.video.peertube\n"
"Last-Translator: QNET17\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: de_DE\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
# Only IDs from 30000 to 30999 can be used by plugins.
# (from https://kodi.wiki/view/Language_support#String_ID_range)
# -----------------------------------
# Settings (from 30000 to 30399)
# -----------------------------------
msgctxt "#30000"
msgid "Instance URL"
msgstr "URL der Instanz"
msgctxt "#30001"
msgid "Number of items to show per page"
msgstr "Anzahl der Elemente, die pro Seite angezeigt werden sollen"
msgctxt "#30002"
msgid "Sort videos by"
msgstr "Videos sortieren nach"
msgctxt "#30003"
msgid "Preferred video resolution"
msgstr "Bevorzugte Videoauflösung"
#msgctxt "#30004"
#msgid "Delete downloaded videos when Kodi exits"
#msgstr "Heruntergeladene Videos löschen, wenn Kodi beendet wird"
msgctxt "#30005"
msgid "List only videos with scope"
msgstr "Nur Videos des Typs anzeigen"
msgctxt "#30006"
msgid "General"
msgstr "Allgemein"
msgctxt "#30007"
msgid "Browsing/Searching"
msgstr "Blättern/Suchen"
msgctxt "#30008"
msgid "Video playback"
msgstr "Video-Wiedergabe"
msgctxt "#30009"
msgid "local"
msgstr "lokal"
msgctxt "#30010"
msgid "all-local (admins only)"
msgstr "alles-lokal (nur für Administratoren)"
msgctxt "#30011"
msgid "likes"
msgstr "Gefällt mir"
msgctxt "#30012"
msgid "views"
msgstr "Angesehen"
msgctxt "#30013"
msgid "Display a notification when the service starts"
msgstr "Eine Benachrichtigung anzeigen, wenn der Dienst startet"
# -----------------------------------
# Other strings (from 30400 to 30999)
# -----------------------------------
msgctxt "#30400"
msgid "PeerTube service started"
msgstr "PeerTube-Dienst gestartet"
msgctxt "#30401"
msgid "Torrents can now be downloaded."
msgstr "Torrents können jetzt heruntergeladen werden."
msgctxt "#30402"
msgid "Request error"
msgstr "Anforderungsfehler"
msgctxt "#30403"
msgid "No details returned by the server. Check the log for more information."
msgstr "Keine Details vom Server zurückgegeben. Prüfen Sie das Protokoll auf weitere Informationen."
msgctxt "#30404"
msgid "{}\n\n----------\nNumber of local videos: {}\nNumber of users: {}"
msgstr "{}\n\n----------\nAnzahl der lokalen Videos: {}\nAnzahl der Benutzer: {}"
msgctxt "#30405"
msgid "Next page"
msgstr "Nächste Seite"
msgctxt "#30406"
msgid "Browse videos on the selected instance"
msgstr "Videos auf der ausgewählten Instanz durchsuchen"
msgctxt "#30407"
msgid "Search videos on the selected instance"
msgstr "Videos auf der ausgewählten Instanz suchen"
msgctxt "#30408"
msgid "Select another instance"
msgstr "Andere Instanz wählen"
msgctxt "#30409"
msgid "Search videos on {}"
msgstr "Videos suchen unter {}"
msgctxt "#30410"
msgid "No videos found"
msgstr "Keine Videos gefunden"
msgctxt "#30411"
msgid "No videos found matching the keywords '{}'"
msgstr "Keine Videos zu den Stichworten gefunden '{}'"
msgctxt "#30412"
msgid "Error: libtorrent could not be imported"
msgstr "Fehler: libtorrent konnte nicht importiert werden"
msgctxt "#30413"
msgid "PeerTube cannot play videos without libtorrent\nPlease follow the instructions at {}"
msgstr "PeerTube kann keine Videos ohne libtorrent abspielen\nBitte folgen Sie den Anweisungen unter {}"
msgctxt "#30414"
msgid "Download started"
msgstr "Download gestartet"
msgctxt "#30415"
msgid "The video will be played soon."
msgstr "Das Video wird in kürze abgespielt."
msgctxt "#30416"
msgid "Download timeout"
msgstr "Zeitüberschreitung beim Herunterladen"
msgctxt "#30417"
msgid "Timeout while downloading {}"
msgstr "Timeout beim Herunterladen {}"
msgctxt "#30418"
msgid "Instance changed"
msgstr "Instanz gewechselt"
msgctxt "#30419"
msgid "{} is now the selected instance."
msgstr "{} ist nun die ausgewählte Instanz."
msgctxt "#30420"
msgid "You can still browse and search videos but you will not be able to play them (except live videos).\nPlease follow the instructions at {}"
msgstr "Sie können weiterhin Videos durchsuchen und suchen, aber Sie können sie nicht abspielen (außer Live-Videos).\nBefolgen Sie bitte die Anweisungen unter {}"

View File

@ -199,9 +199,9 @@ class PeerTubeAddon():
total_pages = (total / self.items_per_page) + 1
next_page_item = kodi.generate_item_info(
name="{} ({}/{})".format(kodi.get_string(30405),
next_page,
total_pages),
name=u"{} ({}/{})".format(kodi.get_string(30405),
next_page,
total_pages),
url=url
)

View File

@ -216,11 +216,19 @@ class KodiUtils:
"""Open a box for the user to input alphanumeric data
:param str title: Title of the box
:return: Entered data or an empty string
:return: Entered data as a unicode string
:rtype: str
"""
return xbmcgui.Dialog().input(heading=title,
type=xbmcgui.INPUT_ALPHANUM)
entered_string = xbmcgui.Dialog().input(heading=title,
type=xbmcgui.INPUT_ALPHANUM)
# Check the type of the string against the type "bytes" to confirm if
# it is a unicode or a byte string ("bytes" is known in both python 2
# and 3).
if isinstance(entered_string, bytes):
return entered_string.decode("utf-8")
else:
return entered_string
def play(self, url):
"""Play the media behind the URL