mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 20:24:03 +00:00
feat(purchase): add per-purchase participant splits
This commit is contained in:
@@ -235,7 +235,8 @@ export const enBotTranslations: BotTranslationCatalog = {
|
||||
purchase: {
|
||||
sharedPurchaseFallback: 'shared purchase',
|
||||
processing: 'Checking that purchase...',
|
||||
proposal: (summary) => `I think this shared purchase was: ${summary}. Confirm or cancel below.`,
|
||||
proposal: (summary, participants) =>
|
||||
`I think this shared purchase was: ${summary}.${participants ? `\n\n${participants}` : ''}\nConfirm or cancel below.`,
|
||||
clarification: (question) => question,
|
||||
clarificationMissingAmountAndCurrency:
|
||||
'What amount and currency should I record for this shared purchase?',
|
||||
@@ -244,6 +245,11 @@ export const enBotTranslations: BotTranslationCatalog = {
|
||||
clarificationMissingItem: 'What exactly was purchased?',
|
||||
clarificationLowConfidence:
|
||||
'I am not confident I understood this. Please restate the shared purchase with item, amount, and currency.',
|
||||
participantsHeading: 'Participants:',
|
||||
participantIncluded: (displayName) => `- ${displayName}`,
|
||||
participantExcluded: (displayName) => `- ${displayName} (excluded)`,
|
||||
participantToggleIncluded: (displayName) => `✅ ${displayName}`,
|
||||
participantToggleExcluded: (displayName) => `⬜ ${displayName}`,
|
||||
confirmButton: 'Confirm',
|
||||
cancelButton: 'Cancel',
|
||||
confirmed: (summary) => `Purchase confirmed: ${summary}`,
|
||||
@@ -252,6 +258,7 @@ export const enBotTranslations: BotTranslationCatalog = {
|
||||
cancelledToast: 'Purchase cancelled.',
|
||||
alreadyConfirmed: 'This purchase was already confirmed.',
|
||||
alreadyCancelled: 'This purchase was already cancelled.',
|
||||
atLeastOneParticipant: 'Keep at least one participant in the purchase split.',
|
||||
notYourProposal: 'Only the original sender can confirm or cancel this purchase.',
|
||||
proposalUnavailable: 'This purchase proposal is no longer available.',
|
||||
parseFailed:
|
||||
|
||||
@@ -238,7 +238,8 @@ export const ruBotTranslations: BotTranslationCatalog = {
|
||||
purchase: {
|
||||
sharedPurchaseFallback: 'общая покупка',
|
||||
processing: 'Проверяю покупку...',
|
||||
proposal: (summary) => `Похоже, это общая покупка: ${summary}. Подтвердите или отмените ниже.`,
|
||||
proposal: (summary, participants) =>
|
||||
`Похоже, это общая покупка: ${summary}.${participants ? `\n\n${participants}` : ''}\nПодтвердите или отмените ниже.`,
|
||||
clarification: (question) => question,
|
||||
clarificationMissingAmountAndCurrency:
|
||||
'Какую сумму и валюту нужно записать для этой общей покупки?',
|
||||
@@ -247,6 +248,11 @@ export const ruBotTranslations: BotTranslationCatalog = {
|
||||
clarificationMissingItem: 'Что именно было куплено?',
|
||||
clarificationLowConfidence:
|
||||
'Я не уверен, что правильно понял сообщение. Переформулируйте покупку с предметом, суммой и валютой.',
|
||||
participantsHeading: 'Участники:',
|
||||
participantIncluded: (displayName) => `- ${displayName}`,
|
||||
participantExcluded: (displayName) => `- ${displayName} (не участвует)`,
|
||||
participantToggleIncluded: (displayName) => `✅ ${displayName}`,
|
||||
participantToggleExcluded: (displayName) => `⬜ ${displayName}`,
|
||||
confirmButton: 'Подтвердить',
|
||||
cancelButton: 'Отменить',
|
||||
confirmed: (summary) => `Покупка подтверждена: ${summary}`,
|
||||
@@ -255,6 +261,7 @@ export const ruBotTranslations: BotTranslationCatalog = {
|
||||
cancelledToast: 'Покупка отменена.',
|
||||
alreadyConfirmed: 'Эта покупка уже подтверждена.',
|
||||
alreadyCancelled: 'Это предложение покупки уже отменено.',
|
||||
atLeastOneParticipant: 'В распределении покупки должен остаться хотя бы один участник.',
|
||||
notYourProposal: 'Подтвердить или отменить эту покупку может только отправитель сообщения.',
|
||||
proposalUnavailable: 'Это предложение покупки уже недоступно.',
|
||||
parseFailed:
|
||||
|
||||
@@ -227,13 +227,18 @@ export interface BotTranslationCatalog {
|
||||
purchase: {
|
||||
sharedPurchaseFallback: string
|
||||
processing: string
|
||||
proposal: (summary: string) => string
|
||||
proposal: (summary: string, participants: string | null) => string
|
||||
clarification: (question: string) => string
|
||||
clarificationMissingAmountAndCurrency: string
|
||||
clarificationMissingAmount: string
|
||||
clarificationMissingCurrency: string
|
||||
clarificationMissingItem: string
|
||||
clarificationLowConfidence: string
|
||||
participantsHeading: string
|
||||
participantIncluded: (displayName: string) => string
|
||||
participantExcluded: (displayName: string) => string
|
||||
participantToggleIncluded: (displayName: string) => string
|
||||
participantToggleExcluded: (displayName: string) => string
|
||||
confirmButton: string
|
||||
cancelButton: string
|
||||
confirmed: (summary: string) => string
|
||||
@@ -242,6 +247,7 @@ export interface BotTranslationCatalog {
|
||||
cancelledToast: string
|
||||
alreadyConfirmed: string
|
||||
alreadyCancelled: string
|
||||
atLeastOneParticipant: string
|
||||
notYourProposal: string
|
||||
proposalUnavailable: string
|
||||
parseFailed: string
|
||||
|
||||
Reference in New Issue
Block a user