@blocklet/payment-react
Version:
Reusable react components for payment kit v2
433 lines (432 loc) • 16.8 kB
JavaScript
import flat from "flat";
import { RefundType } from "../libs/constant.js";
export default flat({
common: {
id: "ID",
url: "URL",
none: "None",
createdAt: "Created At",
updatedAt: "Updated At",
resumesAt: "Resume At",
actions: "Actions",
options: "Options",
advanced: "Advanced options",
login: "Login to access this page",
settings: "Settings",
preview: "Preview",
required: "Required",
setup: "Setup",
amount: "Amount",
total: "Total",
subtotal: "Subtotal",
status: "Status",
livemode: "Test mode",
afterTime: "After {time}",
timeAgo: "{time} ago",
save: "Save",
saved: "Changes saved",
remove: "Remove",
removed: "Resource removed",
confirm: "Confirm",
clear: "Clear",
selectTimeRange: "Select time range",
startDate: "Start date",
endDate: "End date",
upload: "Upload",
change: "Change",
cancel: "Cancel",
close: "Close",
back: "Back",
every: "every",
per: "per {interval}",
slash: "/ {interval}",
unit: "units",
edit: "Edit",
quantity: "Quantity",
yes: "Yes",
no: "No",
email: "Email",
did: "DID",
txHash: "Transaction",
txGas: "Transaction Gas",
delegateTxHash: "Delegate Transaction",
stakeTxHash: "Stake Transaction",
slashTxHash: "Slash Transaction",
transferTxHash: "Transfer Transaction",
customer: "Customer",
currency: "Currency",
custom: "Custom",
description: "Description",
statementDescriptor: "Statement descriptor",
loadMore: "View more {resource}",
loadingMore: "Loading more {resource}...",
noMore: "No more {resource}",
copied: "Copied",
previous: "Back",
continue: "Continue",
qty: "Qty {count}",
each: "{unit} each",
trial: "Free for {count} {interval}{count > 1 ? 's' : ''}",
billed: "billed {rule}",
metered: "based on usage",
minute: "minute",
hour: "hour",
day: "day",
week: "week",
month: "month",
year: "year",
hourly: "hourly",
daily: "daily",
weekly: "weekly",
monthly: "monthly",
yearly: "yearly",
month3: "every 3 months",
month6: "every 6 months",
recurring: "every {count} {interval}",
hours: "hours",
days: "days",
weeks: "weeks",
months: "months",
years: "years",
type: "type",
donation: "Donation",
recoverFrom: "Recovered From",
quantityLimitPerCheckout: "Exceed purchase limit",
quantityNotEnough: "Exceed inventory",
amountPrecisionLimit: "Amount decimal places must be less than or equal to {precision}",
saveAsDefaultPriceSuccess: "Set default price successfully",
stakeAmount: "Stake Amount",
slashStakeAmount: "Slash Stake Amount",
know: "I know",
relatedSubscription: "Subscription",
connect: {
defaultScan: "Use following methods to complete this action",
scan: "Use following methods to complete this {action}",
confirm: "Confirm",
cancel: "Cancel"
},
paymentMethod: "Payment Method"
},
payment: {
checkout: {
contact: "Contact information",
method: "Payment method",
processing: "Processing",
payment: "Pay",
try: "Try for free",
include: "This includes:",
subscription: "Subscribe",
donate: "Donate",
select: "Select",
selected: "Selected",
noPricing: "No items to purchase",
setup: "Subscribe",
continue: "Confirm {action}",
connect: "Connect and {action}",
login: "Login to load and save contact information",
next: {
subscription: "View subscription",
invoice: "View invoice",
view: "View"
},
paymentRequired: "Payment Required",
staking: {
title: "Staking Required",
tooltip: "Staking is used to ensure that future invoices can be paid normally. Revoking the staking from DID Wallet means canceling the subscription."
},
stakingConfirm: "In this payment, the staked amount is separate from the product cost.",
donation: {
between: "Please enter an amount between {min} and {max}.",
custom: "Custom Amount",
select: "Select Amount",
summary: "{total} supporters {totalAmount} {symbol}",
empty: "No supporters yet",
gaveTips: "{count} people gave tips",
tipAmount: "Tip Amount",
tabHint: "to switch amount",
benefits: {
one: "{name} will receive all tips",
multiple: "Tips will be distributed to {count} beneficiaries",
view: "Click to view details"
},
inactive: "Donation feature is not enabled",
enable: "Enable Donation",
enableSuccess: "Enable Success",
configPrompt: "Donation feature is enabled, you can configure donation options in Payment Kit",
configNow: "Configure Now",
later: "Configure Later",
configTip: "Configure donation settings in Payment Kit"
},
cardPay: "{action} with bank card",
empty: "No thing to pay",
per: "per",
pay: "Pay {payee}",
try1: "Try {name}",
try2: "Try {name} and {count} more",
sub1: "Subscribe to {name}",
sub2: "Subscribe to {name} and {count} more",
then: "Then {subscription} {recurring}",
meteredThen: "Then {recurring} based on usage",
metered: "{recurring} based on usage",
free: "{count} {interval}{count > 1 ? 's' : ''} free",
least: "continue with at least",
completed: {
payment: "Thanks for your purchase",
subscription: "Thanks for your subscribing",
setup: "Thanks for your subscribing",
donate: "Thanks for your tip",
tip: "A payment to {payee} has been completed. You can view the details of this payment in your account."
},
confirm: {
withStake: "By confirming, you allow {payee} to charge your account for future payments and, if necessary, slash your stake. You can cancel your subscription or withdraw your stake at any time.",
withoutStake: "By confirming, you allow {payee} to charge your account for future payments. You can cancel your subscription at any time."
},
required: "Required",
invalid: "Invalid",
billing: {
auto: "Country",
required: "Billing address",
country: "Country",
state: "State or province",
city: "City or town",
line1: "Address",
line2: "Line2",
postal_code: "Postal code"
},
customer: {
name: "Name",
email: "Email",
phone: "Phone",
phonePlaceholder: "Phone number",
phoneTip: "In case we need to contact you about your order"
},
upsell: {
save: "Save with {recurring} billing",
revert: "Switch to {recurring} billing",
off: "{saving}% off"
},
cross_sell: {
add: "Add to order",
remove: "Remove from order"
},
credit: {
oneTimeInfo: "You will receive {amount} {symbol} credits after payment",
recurringInfo: "You will receive {amount} {symbol} credits {period}",
expiresIn: "credits have a validity period of {duration} {unit}"
},
expired: {
title: "Expired Link",
description: "This link has expired. This means that your payment has already been processed or your session has expired."
},
complete: {
title: "Checkout Completed",
description: "This checkout session has completed. This means that your payment has already been successfully processed."
},
emptyItems: {
title: "Nothing to show here",
description: "Seems this checkoutSession is not configured properly"
},
orderSummary: "Order Summary",
paymentDetails: "Payment Details",
productListTotal: "Includes {total} items",
connectModal: {
title: "{action}",
scan: "Use following methods to complete this payment",
confirm: "Confirm",
cancel: "Cancel"
},
fastPay: {
title: "Confirm Payment",
confirmMessage: "You will pay {amount} {symbol} from {sourceType}.",
autoPaymentReason: "Your payment will be processed automatically as your account has sufficient balance. Please confirm the following details before proceeding.",
payer: "Account",
amount: "Amount",
failed: "Account changed, please pay manually.",
balanceLink: "View Balance",
credit: {
title: "Confirm Credit Payment",
availableAmount: "Available Credit: {amount}",
confirmMessage: "You will use {amount} credits to subscribe to this service.",
meteringSubscriptionMessage: "This subscription service will deduct credits in real-time based on actual usage. You currently have {available} credits available. Confirm to continue?",
insufficientTitle: "Insufficient Credit",
insufficientMessage: "This subscription service will deduct credits in real-time based on actual usage. You currently have insufficient credits. Please top up your credits first."
}
}
},
customer: {
payments: "Payment History",
invoices: "Invoice History",
details: "Details",
summary: "Summary",
products: "Products",
update: "Update Information",
empty: "Seems you do not have any subscriptions or payments here",
cancel: {
button: "Unsubscribe",
title: "Cancel your subscription",
comment: "Any additional feedback?",
description: "Your subscription will be canceled, but it is still available until the end of your current billing period on {date}.",
trialDescription: "Free trial subscriptions will be canceled immediately and no longer available, confirm to continue.",
feedback: {
tip: "We would love your feedback, it will help us improve our service",
too_expensive: "The service is too expensive",
missing_features: "Features are missing for this service",
switched_service: "I have switched to alternative service",
unused: "I no longer use this service",
customer_service: "The customer service is poor",
too_complex: "The service is too complex to use",
low_quality: "The service does not work well",
other: "Other reasons"
}
},
pastDue: {
button: "Pay",
invoices: "Past Due Invoices",
warning: "Past due invoices need to be paid immediately, otherwise you can not make new purchases anymore.",
alert: {
title: "You have unpaid invoices",
customMessage: "Please pay immediately, otherwise new purchases or subscriptions will be prohibited.",
confirm: "Pay Now"
},
view: "View Due Invoices"
},
recover: {
button: "Resume Subscription",
title: "Resume Your Subscription",
description: "Your subscription will not be canceled and will be automatically renewed on {date}, please confirm to continue.",
success: "Subscription resumed successfully",
reStakeTitle: "Re-stake to resume subscription",
stakeRequiredDescription: "Your previous stake has been revoked. You need to re-stake to resume your subscription.",
stakeWarning: "Please ensure you have sufficient balance for staking before proceeding."
},
changePlan: {
button: "Change Plan",
current: "Current",
pay: "Payment Required",
scan: "Complete the payment to upgrade your subscription",
success: "Your subscription is successfully upgraded",
error: "Failed to upgrade your subscription",
config: "Switch to another plan or billing cycle",
confirm: "Confirm changes to your subscription",
summary: "What you will pay for starting {date}",
total: "Total (metered items excluded)",
appliedCredit: "Credit applied",
newCredit: "Credit issued",
remaining: "Amount due today",
tableNotFound: "Plan updates are not available"
},
changePayment: {
limit: "Your changes to payment method will not affect existing open or past-due invoices, all future payments will use the new payment method unless you change it again.",
review: "Review subscription items",
select: "Select payment method",
submit: "Confirm change",
confirm: "By confirming this change, you allow {payee} to charge {symbol} from your account for future payments in accordance with their terms. You can always change your payment method.",
completed: "Your payment method has been successfully updated, all future payments will use the new payment method unless you change it again.",
title: "Payment Method Change"
},
invoice: {
summary: "Summary",
details: "Details",
download: "Download PDF",
unitPrice: "Unit Price",
amountPaid: "Amount Paid",
rawQuantity: "Raw Quantity: {quantity}",
amountDue: "Amount Due",
amountApplied: "Applied Credit",
pay: "Pay this invoice",
paySuccess: "You have successfully paid the invoice",
payError: "Failed to paid the invoice",
renew: "Renew the subscription",
renewSuccess: "You have successfully renewed the subscription",
renewError: "Failed to renew the subscription",
empty: "There are no invoices",
next: "No invoices yet, next invoice will be generated on {date}",
invoiceNumber: "Invoice Number",
emptyList: "No Invoices",
noPaymentRequired: "No Payment Required",
payBatch: "Pay Due Invoices"
},
payment: {
empty: "There are no payments",
emptyList: "No Payments"
},
refund: {
empty: "There are no refunds",
emptyList: "No Refunds"
},
subscriptions: {
plan: "Plan",
nextInvoice: "Next Invoice",
title: "Manage subscriptions",
view: "Manage Subscription",
current: "Current subscription",
viewAll: "View all",
empty: "There are no subscriptions here",
changePayment: "Change payment method",
trialLeft: "Trail Left",
owner: "Subscription Owner"
},
overdue: {
title: "You have {count} due invoices for {subscriptionCount} subscriptions, totaling {total} {symbol}{method}. ",
simpleTitle: "You have {count} due invoices. ",
empty: "Great! You have no due invoices.",
defaultAlert: "Please pay immediately to avoid service disruption."
}
},
invoice: {
reason: {
creation: "Subscription create",
cycle: "Subscription cycle",
staking: "Subscription staking",
update: "Subscription update",
recover: "Subscription recover",
threshold: "Metered usage billing",
cancel: "Subscription cancel",
manual: "Manual invoice",
upcoming: "Upcoming invoice",
slashStake: "Slash stake",
stake: "Stake",
payment: "Payment",
returnStake: "Return stake",
stakeForChangePlan: "Subscription plan update",
stakeForChangePayment: "Subscription payment method update",
recharge: "Add funds",
rechargeForSubscription: "Add funds for subscription",
overdraftProtection: "SubGuard\u2122 Fee",
stakeForSubscriptionOverdraftProtection: "SubGuard\u2122",
reStakeToResumeSubscription: "Subscription resume",
gas: "Gas",
fee: "Fee"
}
},
subscription: {
overdue: {
simpleTitle: "There are {count} due invoices for your subscription {name}, you need to pay them to activate your subscription or before making new purchases.",
title: "There are {count} due invoices for your subscription {name}, the total due amount is {total} {symbol}{method}, you need to pay them to activate your subscription or before making new purchases.",
payNow: "Pay Now",
notSupport: "This payment method is not supported",
total: "Total {total} {currency}{method}",
view: "View Subscription Details",
viewNow: "View Now",
pastDue: "Past Due Invoices",
description: "If you have any questions, you can choose ",
list: "Past Due Invoices:",
empty: "There are no overdue invoices for your subscription {name}.",
retry: "Retry",
paid: "Paid"
}
}
},
refund: {
type: {
[RefundType.refund]: "Refund",
[RefundType.stakeReturn]: "Stake Return"
}
},
empty: {
records: "No matching records found"
},
benefits: {
title: "{count} Beneficiaries"
}
});