Remote workers, Postgres and S3, all chosen by configuration. - Pull-based worker protocol over HTTP: claim (long poll), heartbeat, complete, fail, upload, source, probe. Workers need no inbound ports - cmd/worker: standalone stateless worker with health endpoint and scheduled yt-dlp self-update - Per-worker bearer tokens, stored hashed, revocable; identity always taken from the token; actions only on jobs the worker holds a lease for - Tags: site_tags routes a site's jobs and lookups to workers that carry the required tags - Drain, /workers, /ytdlp update, and "core worker add|revoke|list" - Link lookups can run on remote workers (PROBE_MODE), so the core needs no yt-dlp and no residential address - Postgres backend with pgx, same schema and queries; per-user advisory lock and job row lock where SQLite's serial writes were relied on - The whole test suite runs on SQLite and on Postgres - S3 storage backend with presigned worker uploads, sharing a conformance suite with the local backend - Dockerfile with core, worker and faketelegram targets, docker-compose with optional Postgres and local Bot API server, systemd units - deploy/acceptance/kill-worker.sh: kills a worker mid-job and checks that the other one delivers the file - Fixes found on the way: /cancel could let the next playlist item start; a refund note could be missing when the sweep refunded first Docker was not available on the build machine: the compose files were validated with "docker compose config" only. The acceptance scenario was run with real processes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
392 lines
14 KiB
TOML
392 lines
14 KiB
TOML
# English catalog. This is the source language: every other catalog must
|
|
# have exactly these keys.
|
|
#
|
|
# Rules for translators:
|
|
# - Text in {{.Braces}} is a placeholder. Keep it as is.
|
|
# - Keep the HTML tags (<b>, <i>, <code>) and the line breaks.
|
|
# - Never use these words as a key name, go-i18n reserves them:
|
|
# id, description, hash, leftdelim, rightdelim, zero, one, two, few, many, other
|
|
# (they are only valid as plural forms inside a message).
|
|
|
|
[start]
|
|
private = """
|
|
<b>Hi {{.Name}}, welcome to The Noderunners Download Bot.</b>
|
|
|
|
Send me a link to a video or a song and I will fetch it for you.
|
|
|
|
/help shows what I can do."""
|
|
group = """
|
|
<b>The Noderunners Download Bot is here.</b>
|
|
|
|
Use /dl with a link, or reply /dl to a message that has a link."""
|
|
|
|
[help]
|
|
text = """
|
|
<b>How to use me</b>
|
|
|
|
In a private chat, just send a link. I show a card and you pick the format.
|
|
In a group, use /dl with a link, or reply /dl to a message that has a link.
|
|
|
|
<b>Commands</b>
|
|
/dl link - download a video
|
|
/audio link - download the audio as MP3
|
|
/thumb link - get the thumbnail
|
|
/subs link - get the subtitles
|
|
/info link - show formats and sizes without downloading
|
|
/fresh link - download again instead of using a saved copy
|
|
/history - your past downloads, with one tap to get them again
|
|
/queue - your running downloads
|
|
/cancel - cancel your downloads
|
|
|
|
<b>Account</b>
|
|
/account - your pass, balance and usage
|
|
/limits - the limits that apply to you
|
|
/buy - get a pass or credits
|
|
/credits - your balance and top up
|
|
/redeem code - use a gift code
|
|
/referral - invite friends and earn sats
|
|
/donate - send a tip
|
|
|
|
<b>Your limits</b>
|
|
Up to {{.MaxSize}} and {{.MaxDuration}} per download."""
|
|
|
|
[cmd]
|
|
unknown = "I do not know that command. Try /help."
|
|
|
|
# Descriptions in Telegram's command menu. Keep them short.
|
|
[menu]
|
|
dl = "Download a video from a link"
|
|
audio = "Download the audio as MP3"
|
|
thumb = "Get the thumbnail"
|
|
info = "Show formats and sizes"
|
|
queue = "Your downloads in progress"
|
|
cancel = "Cancel your downloads"
|
|
history = "Your past downloads"
|
|
account = "Your pass, balance and usage"
|
|
buy = "Get a pass or credits"
|
|
help = "How to use the bot"
|
|
|
|
[hint]
|
|
send_link = "Send me a link to a video or a song and I will fetch it. /help has the details."
|
|
|
|
[dl]
|
|
usage = "Add a link after the command, or reply to a message that has a link.\nExample: <code>/dl https://example.com/video</code>"
|
|
|
|
[info]
|
|
usage = "Add a link after the command.\nExample: <code>/info https://example.com/video</code>"
|
|
line = "{{.Label}}: {{.Size}}"
|
|
size_unknown = "size unknown"
|
|
|
|
[queue]
|
|
empty = "You have no downloads in progress."
|
|
|
|
[queue.header]
|
|
one = "<b>You have {{.Count}} download in progress</b>"
|
|
other = "<b>You have {{.Count}} downloads in progress</b>"
|
|
|
|
[cancel]
|
|
nothing = "There is nothing to cancel."
|
|
|
|
[cancel.done]
|
|
one = "Cancelled {{.Count}} download."
|
|
other = "Cancelled {{.Count}} downloads."
|
|
|
|
[card]
|
|
looking = "Looking up the link…"
|
|
pick = "Pick a format:"
|
|
cancelled = "Cancelled."
|
|
|
|
[btn]
|
|
best = "Best"
|
|
res = "{{.Height}}p"
|
|
mp3 = "MP3"
|
|
m4a = "M4A"
|
|
thumb = "Thumbnail"
|
|
subs = "Subtitles ({{.Lang}})"
|
|
with_size = "{{.Label}} · {{.Size}}"
|
|
cancel = "Cancel"
|
|
skip_queue = "Skip the queue"
|
|
open_private = "Open a private chat"
|
|
open_wallet = "Open in wallet"
|
|
check_payment = "Check payment"
|
|
this_file = "This file only"
|
|
buy_for_me = "Buy for me"
|
|
subs_auto = "{{.Lang}} (auto)"
|
|
resend = "{{.N}}. {{.Title}}"
|
|
|
|
[status]
|
|
queued = "In the queue. Position {{.Position}}, about {{.Wait}}."
|
|
downloading = "Downloading…"
|
|
downloading_bytes = "Downloading… {{.Done}}"
|
|
downloading_progress = "Downloading…\n{{.Bar}} {{.Percent}}\n{{.Done}} of {{.Total}}"
|
|
processing = "Processing the file…"
|
|
uploading = "Sending it to Telegram…"
|
|
preparing = "Getting it ready…"
|
|
done = "Done. Enjoy."
|
|
cancelled = "Cancelled."
|
|
failed = "That did not work. {{.Reason}}"
|
|
refunded = "{{.Amount}} went back to your balance."
|
|
|
|
[notice]
|
|
cancelled = "Cancelled."
|
|
not_yours = "These buttons belong to the person who asked."
|
|
too_late = "Too late to cancel that."
|
|
expired = "This card has expired. Send the link again."
|
|
already_chosen = "A download from this card is already running."
|
|
private_only = "This works in a private chat with me."
|
|
rate_limited = "That is a lot of links. Please wait a minute and try again."
|
|
paid = "Payment received."
|
|
not_paid_yet = "Not paid yet. It can take a few seconds after you pay."
|
|
invoice_closed = "This invoice is closed."
|
|
skipped = "Done. Your download moved to the front."
|
|
skip_too_late = "This download is not waiting in the queue anymore."
|
|
skip_private = "Open a private chat with me to pay for this."
|
|
|
|
[limit]
|
|
too_large = "This file is larger than your limit of {{.MaxSize}}. Try a lower quality."
|
|
too_long = "This is longer than your limit of {{.MaxDuration}}."
|
|
live = "Live streams cannot be downloaded."
|
|
queue_full = "The queue is full right now. Please try again in a few minutes."
|
|
blocked = "This content is not available through this bot."
|
|
daily_volume = "You reached your daily volume of {{.MaxVolume}}. It resets at midnight UTC."
|
|
|
|
[limit.daily_downloads]
|
|
one = "You used your {{.Count}} download for today. It resets at midnight UTC."
|
|
other = "You used your {{.Count}} downloads for today. It resets at midnight UTC."
|
|
|
|
[limit.active_jobs]
|
|
one = "You already have {{.Count}} download running. Wait for it to finish or use /cancel."
|
|
other = "You already have {{.Count}} downloads running. Wait for one to finish or use /cancel."
|
|
|
|
[unit.sats]
|
|
one = "{{.N}} sat"
|
|
other = "{{.N}} sats"
|
|
|
|
[unit.seconds]
|
|
one = "{{.Count}} second"
|
|
other = "{{.Count}} seconds"
|
|
|
|
[unit.minutes]
|
|
one = "{{.Count}} minute"
|
|
other = "{{.Count}} minutes"
|
|
|
|
[unit.hours]
|
|
one = "{{.Count}} hour"
|
|
other = "{{.Count}} hours"
|
|
|
|
# One message per failure class. The raw tool output goes to the owner logs
|
|
# only, never to the user.
|
|
[error]
|
|
unsupported_url = "I cannot download from that link."
|
|
not_found = "Nothing was found at that link. It may have been removed."
|
|
private = "This content is private or for members only."
|
|
login_required = "This content needs a login on the site, so I cannot fetch it."
|
|
geo_blocked = "This content is not available in the region I download from."
|
|
site_blocked = "The site refused the download right now. Please try again later."
|
|
rate_limited = "The site is limiting requests right now. Please try again in a few minutes."
|
|
live_stream = "Live streams cannot be downloaded."
|
|
drm = "This content is copy protected and cannot be downloaded."
|
|
too_large = "The file is larger than your limit. Try a lower quality."
|
|
too_long = "This is longer than your limit."
|
|
no_media = "No video or audio was found in the format you picked."
|
|
no_subtitles = "No subtitles were found in that language."
|
|
network = "A network problem interrupted the download. Please try again."
|
|
timeout = "The download took too long and was stopped."
|
|
processing_failed = "The file was downloaded but could not be processed."
|
|
cancelled = "The download was cancelled."
|
|
worker_lost = "The download was interrupted. Please try again."
|
|
internal = "Something went wrong on my side. Please try again."
|
|
unknown = "The download failed. Please try again later."
|
|
playlist = "That link is a playlist. Send it to me as a normal message to pick a format for the whole list."
|
|
playlist_nested = "This item is a list itself, so I skipped it."
|
|
send_failed = "I could not send the file to Telegram. Please try again."
|
|
|
|
# --- Money -------------------------------------------------------------------
|
|
|
|
[product]
|
|
pass_day = "Day pass"
|
|
pass_week = "Week pass"
|
|
pass_month = "Month pass"
|
|
credits = "Credits"
|
|
one_off = "Single download"
|
|
skip_queue = "Skip the queue"
|
|
donation = "Donation"
|
|
|
|
# What pays for a download.
|
|
[source]
|
|
one_off = "Single download"
|
|
own_pass = "Your pass"
|
|
group_pass = "Group pass"
|
|
group_credits = "Group credits"
|
|
own_credits = "Your credits"
|
|
free = "Free"
|
|
|
|
[buy]
|
|
intro = """
|
|
<b>Passes and credits</b>
|
|
|
|
A <b>pass</b> lifts your limits to {{.MaxSize}} and {{.MaxDuration}} per download and puts you in the priority queue for as long as it runs.
|
|
|
|
<b>Credits</b> pay per download, {{.PerDownload}} each, with the same limits and priority. They never expire.
|
|
|
|
You pay in sats over Lightning."""
|
|
unavailable = "Payments are not set up on this bot yet."
|
|
backend_down = "I cannot reach the payment service right now. Please try again in a moment."
|
|
backend_down_short = "The payment service is not reachable right now. Please try again in a moment."
|
|
bad_amount = "That amount is not possible."
|
|
|
|
[credits]
|
|
text = """
|
|
<b>Your balance: {{.Balance}}</b>
|
|
|
|
One download costs {{.PerDownload}}. Top up:"""
|
|
|
|
[donate]
|
|
intro = "Thank you for supporting the bot. Pick an amount:"
|
|
|
|
[account]
|
|
title = "<b>Your account</b>"
|
|
pass_active = "Pass: active until {{.Until}}"
|
|
pass_none = "Pass: none"
|
|
balance = "Balance: {{.Balance}}"
|
|
today = "<b>Today</b>"
|
|
usage_downloads = "Downloads: {{.Used}} of {{.Max}}"
|
|
usage_volume = "Volume: {{.Used}} of {{.Max}}"
|
|
unlimited = "unlimited"
|
|
|
|
[limits]
|
|
text = """
|
|
<b>Your limits</b> ({{.Tier}})
|
|
|
|
Size per download: {{.MaxSize}}
|
|
Length per download: {{.MaxDuration}}
|
|
Downloads at the same time: {{.ActiveJobs}}
|
|
Downloads per day: {{.DailyDownloads}}
|
|
Volume per day: {{.DailyVolume}}"""
|
|
|
|
[referral.text]
|
|
one = """
|
|
<b>Invite friends</b>
|
|
|
|
Share your link. When somebody you invited makes a first purchase, you get {{.Reward}}.
|
|
|
|
{{.Link}}
|
|
|
|
You invited {{.Count}} person so far."""
|
|
other = """
|
|
<b>Invite friends</b>
|
|
|
|
Share your link. When somebody you invited makes a first purchase, you get {{.Reward}}.
|
|
|
|
{{.Link}}
|
|
|
|
You invited {{.Count}} people so far."""
|
|
|
|
[redeem]
|
|
usage = "Send the code after the command.\nExample: <code>/redeem NR-ABCD-EFGH-JKMN</code>"
|
|
invalid = "That code is not valid."
|
|
used = "That code was already used or has expired."
|
|
credits = "Done. {{.Amount}} were added to your balance."
|
|
pass = "Done. Your pass is active until {{.Until}}."
|
|
cashu_off = "Cashu tokens are not accepted on this bot."
|
|
cashu_mint = "I do not accept tokens from that mint."
|
|
|
|
[invoice]
|
|
memo = "The Noderunners Download Bot: {{.Title}}"
|
|
caption = """
|
|
<b>{{.Title}}</b> · {{.Amount}}
|
|
|
|
<code>{{.Invoice}}</code>
|
|
|
|
Scan the code or tap the invoice to copy it. Valid for {{.Valid}}."""
|
|
paid = "<b>Paid.</b> {{.Title}} · {{.Amount}}"
|
|
balance = "Your balance is now {{.Balance}}."
|
|
pass_until = "Your pass is active until {{.Until}}."
|
|
thanks = "Thank you for the support."
|
|
expired = "This invoice for {{.Title}} has expired. Nothing was charged."
|
|
cancelled = "Invoice cancelled."
|
|
|
|
[pay]
|
|
title = "Pay with Lightning"
|
|
hint = "Your Lightning wallet should open now."
|
|
open = "Open in wallet"
|
|
gone = "This invoice is no longer open."
|
|
too_late_skip = "Your payment arrived, but the download had already left the queue. {{.Amount}} were added to your balance instead."
|
|
too_late_file = "Your payment arrived, but the download could not be started. {{.Amount}} were added to your balance instead."
|
|
not_started = "The download could not be started. {{.Reason}}"
|
|
skip_not_needed = "That download is not waiting in the queue anymore, so there is nothing to pay."
|
|
|
|
[over]
|
|
options = "You can lift the limit:"
|
|
started = "Your limits allow it now. The download has started."
|
|
|
|
# --- Playlists, subtitles, history ------------------------------------------
|
|
|
|
[playlist]
|
|
empty = "I could not find any items in that playlist."
|
|
item_failed = "<b>{{.Title}}</b>\nSkipped. {{.Reason}}"
|
|
|
|
[playlist.card]
|
|
one = """
|
|
<b>{{.Title}}</b>
|
|
Playlist with {{.Count}} item. I will fetch {{.Take}} of them, one after another.
|
|
|
|
Pick a format for all of them:"""
|
|
other = """
|
|
<b>{{.Title}}</b>
|
|
Playlist with {{.Count}} items. I will fetch {{.Take}} of them, one after another.
|
|
|
|
Pick a format for all of them:"""
|
|
|
|
[playlist.queued]
|
|
one = "<b>{{.Title}}</b>\n{{.Count}} item is lined up. It starts as soon as you have a free slot. /cancel stops it."
|
|
other = "<b>{{.Title}}</b>\n{{.Count}} items are lined up. They start one after another as you have free slots. /cancel stops them."
|
|
|
|
[subs]
|
|
pick = "Pick a subtitle language:"
|
|
none = "This video has no subtitles."
|
|
|
|
[history]
|
|
empty = "You have no past downloads yet."
|
|
header = "<b>Your past downloads</b>\nTap one to get it again."
|
|
line = "{{.N}}. {{.Title}} · {{.Label}}"
|
|
|
|
# --- Owner commands ---------------------------------------------------------
|
|
|
|
[owner]
|
|
never = "never"
|
|
state_active = "active"
|
|
state_offline = "offline"
|
|
state_draining = "draining"
|
|
state_revoked = "revoked"
|
|
worker_embedded = "<b>embedded</b> · {{.Running}} of {{.Capacity}} slots busy"
|
|
worker_line = "<b>{{.Name}}</b> · {{.State}} · {{.Running}} of {{.Capacity}} slots busy · seen {{.Seen}} ago\ntags: {{.Tags}} · yt-dlp {{.Version}}"
|
|
worker_unknown = "There is no worker named <code>{{.Name}}</code>."
|
|
drain_usage = "Name the worker.\nExample: <code>/drain eu-1</code>, and <code>/drain eu-1 off</code> to bring it back."
|
|
drain_on = "Worker <code>{{.Name}}</code> is draining. It finishes its jobs and gets no new ones."
|
|
drain_off = "Worker <code>{{.Name}}</code> takes jobs again."
|
|
ytdlp_usage = "Use <code>/ytdlp update</code> to update yt-dlp on every worker."
|
|
purge_usage = "Send a link, or a key as <code>extractor:video_id</code>.\nExample: <code>/purge https://example.com/video copyright notice</code>"
|
|
cache = """
|
|
<b>Cache</b>
|
|
Entries: {{.Entries}} ({{.Stored}} with a stored copy)
|
|
Stored: {{.Size}} of {{.Budget}}
|
|
Hits, all time: {{.Hits}}
|
|
Taken down: {{.Blocked}}
|
|
|
|
<b>Since the last start</b>
|
|
Hit rate: {{.Rate}} of {{.Since}} requests
|
|
Download volume saved: {{.Saved}}"""
|
|
|
|
[owner.workers_header]
|
|
one = "<b>Workers</b>\n{{.Slots}} download slots online, {{.Count}} remote worker registered."
|
|
other = "<b>Workers</b>\n{{.Slots}} download slots online, {{.Count}} remote workers registered."
|
|
|
|
[owner.ytdlp_update]
|
|
one = "Asked {{.Count}} worker to update yt-dlp. It does so when it next checks for work."
|
|
other = "Asked {{.Count}} workers to update yt-dlp. They do so when they next check for work."
|
|
|
|
[owner.purged]
|
|
one = "Taken down: <code>{{.Key}}</code>\n{{.Count}} cached file was removed. The key is blocked."
|
|
other = "Taken down: <code>{{.Key}}</code>\n{{.Count}} cached files were removed. The key is blocked."
|