Lightning payments through LNbits, wallets, passes, credits, the entitlement resolver and priority lanes. - internal/entitle: pure resolver (one-off, own pass, group pass, group credits, own credits, free) with a table-driven suite and an invariant check over every input combination - internal/billing: wallets, append-only ledger with dedupe keys, stacking passes, purchases, gift codes, referral reward - LNbits client verified against v0.12.12 and v1.7.1 source - Settlement by one conditional UPDATE: idempotent under any mix of webhooks, polls and the check button. Webhooks are unsigned, so every payment is confirmed with LNbits before it is credited - Polling fallback, reconciliation of all unsettled invoices at startup, late payments still honored, no expiry while LNbits is unreachable - Charge, quota and job are written in one transaction; failed, cancelled and undeliverable downloads are refunded exactly once - Paid lane first with one slot of the fleet reserved for free users - Daily download quota and daily volume cap, per-user and per-group rate limits - Bot: /buy /account /limits /credits /redeem /referral /donate, QR invoice message that flips to paid, over-limit offer (passes or this file only), deep links from groups, skip the queue - Fake LNbits server for tests; end-to-end money flows including a payment made while the core was down Cashu redemption is behind an interface and not implemented. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
313 lines
10 KiB
TOML
313 lines
10 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
|
|
/info link - show formats and sizes without downloading
|
|
/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"
|
|
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"
|
|
|
|
[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…"
|
|
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."
|
|
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 the link of a single video for now."
|
|
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."
|