rss.lua german translation
This commit is contained in:
parent
09899ac662
commit
7c8b46680d
@ -31,7 +31,7 @@ local function get_rss(url, prot)
|
|||||||
end
|
end
|
||||||
local parsed = feedparser.parse(res)
|
local parsed = feedparser.parse(res)
|
||||||
if parsed == nil then
|
if parsed == nil then
|
||||||
return nil, "Error decoding the RSS.\nAre you sure that " .. url .. " it's a RSS?"
|
return nil, 'Fehler beim hinzufügen des RSS-Feeds.\nSicher, dass "' .. url .. '" einen RSS-Feed hat?'
|
||||||
end
|
end
|
||||||
return parsed, nil
|
return parsed, nil
|
||||||
end
|
end
|
||||||
@ -51,7 +51,7 @@ end
|
|||||||
local function print_subs(id)
|
local function print_subs(id)
|
||||||
local uhash = get_base_redis(id)
|
local uhash = get_base_redis(id)
|
||||||
local subs = redis:smembers(uhash)
|
local subs = redis:smembers(uhash)
|
||||||
local text = id .. ' are subscribed to:\n---------\n'
|
local text = id .. ' hat folgende Feeds:\n---------\n'
|
||||||
for k,v in pairs(subs) do
|
for k,v in pairs(subs) do
|
||||||
text = text .. k .. ") " .. v .. '\n'
|
text = text .. k .. ") " .. v .. '\n'
|
||||||
end
|
end
|
||||||
@ -67,7 +67,7 @@ local function subscribe(id, url)
|
|||||||
local uhash = get_base_redis(id)
|
local uhash = get_base_redis(id)
|
||||||
|
|
||||||
if redis:sismember(uhash, baseurl) then
|
if redis:sismember(uhash, baseurl) then
|
||||||
return "You are already subscribed to " .. url
|
return 'Der Feed von "' .. url .. '" ist bereits abonniert'
|
||||||
end
|
end
|
||||||
|
|
||||||
local parsed, err = get_rss(url, protocol)
|
local parsed, err = get_rss(url, protocol)
|
||||||
@ -87,7 +87,7 @@ local function subscribe(id, url)
|
|||||||
redis:sadd(lhash, id)
|
redis:sadd(lhash, id)
|
||||||
redis:sadd(uhash, baseurl)
|
redis:sadd(uhash, baseurl)
|
||||||
|
|
||||||
return "You had been subscribed to " .. name
|
return 'Der Feed von "' .. name .. '" wurde erfolgreich abonniert'
|
||||||
end
|
end
|
||||||
|
|
||||||
local function unsubscribe(id, n)
|
local function unsubscribe(id, n)
|
||||||
@ -115,7 +115,7 @@ local function unsubscribe(id, n)
|
|||||||
redis:del(lasthash)
|
redis:del(lasthash)
|
||||||
end
|
end
|
||||||
|
|
||||||
return "You had been unsubscribed from " .. sub
|
return 'Der Feed von "' .. sub .. '" wurde deabonniert'
|
||||||
end
|
end
|
||||||
|
|
||||||
local function cron()
|
local function cron()
|
||||||
@ -160,15 +160,15 @@ local function run(msg, matches)
|
|||||||
end
|
end
|
||||||
if matches[1] == "sync" then
|
if matches[1] == "sync" then
|
||||||
if not is_sudo(msg) then
|
if not is_sudo(msg) then
|
||||||
return "Only sudo users can sync the RSS."
|
return 'Du kannst das nicht'
|
||||||
end
|
end
|
||||||
cron()
|
cron()
|
||||||
end
|
end
|
||||||
if matches[1] == "subscribe" or matches[1] == "sub" then
|
if matches[1] == "add" or matches[1] == "sub" then
|
||||||
return subscribe(id, matches[2])
|
return subscribe(id, matches[2])
|
||||||
end
|
end
|
||||||
|
|
||||||
if matches[1] == "unsubscribe" or matches[1] == "uns" then
|
if matches[1] == "remove" or matches[1] == "uns" then
|
||||||
return unsubscribe(id, matches[2])
|
return unsubscribe(id, matches[2])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -178,15 +178,15 @@ return {
|
|||||||
description = "Manage User/Chat RSS subscriptions. If you are in a chat group, the RSS subscriptions will be of that chat. If you are in an one-to-one talk with the bot, the RSS subscriptions will be yours.",
|
description = "Manage User/Chat RSS subscriptions. If you are in a chat group, the RSS subscriptions will be of that chat. If you are in an one-to-one talk with the bot, the RSS subscriptions will be yours.",
|
||||||
usage = {
|
usage = {
|
||||||
"/rss: Get your rss (or chat rss) subscriptions",
|
"/rss: Get your rss (or chat rss) subscriptions",
|
||||||
"/rss subscribe (url): Subscribe to that url",
|
"/rss add (url): Subscribe to that url",
|
||||||
"/rss unsubscribe (id): Unsubscribe of that id",
|
"/rss remove (id): Unsubscribe of that id",
|
||||||
"/rss sync: Download now the updates and send it. Only sudo users can use this option."
|
"/rss sync: Download now the updates and send it. Only sudo users can use this option."
|
||||||
},
|
},
|
||||||
patterns = {
|
patterns = {
|
||||||
"^/rss$",
|
"^/rss$",
|
||||||
"^/rss (subscribe) (https?://[%w-_%.%?%.:/%+=&]+)$",
|
"^/rss (add) (https?://[%w-_%.%?%.:/%+=&]+)$",
|
||||||
"^/rss (sub) (https?://[%w-_%.%?%.:/%+=&]+)$",
|
"^/rss (sub) (https?://[%w-_%.%?%.:/%+=&]+)$",
|
||||||
"^/rss (unsubscribe) (%d+)$",
|
"^/rss (remove) (%d+)$",
|
||||||
"^/rss (uns) (%d+)$",
|
"^/rss (uns) (%d+)$",
|
||||||
"^/rss (sync)$"
|
"^/rss (sync)$"
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user