mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 20:24:03 +00:00
feat(bot): implement household status summary
This commit is contained in:
@@ -22,9 +22,6 @@ export const enBotTranslations: BotTranslationCatalog = {
|
||||
groupHeading: 'Group chat:',
|
||||
groupAdminsHeading: 'Group admins:'
|
||||
},
|
||||
bot: {
|
||||
householdStatusPending: 'Household status is not connected yet. Data integration is next.'
|
||||
},
|
||||
common: {
|
||||
unableToIdentifySender: 'Unable to identify sender for this command.',
|
||||
useHelp: 'Send /help to see available commands.'
|
||||
@@ -144,6 +141,16 @@ export const enBotTranslations: BotTranslationCatalog = {
|
||||
`Payment recorded: ${kind === 'rent' ? 'rent' : 'utilities'} ${amount} ${currency} for ${period}`,
|
||||
paymentAddFailed: (message) => `Failed to record payment: ${message}`,
|
||||
noStatementCycle: 'No cycle found for statement.',
|
||||
householdStatusTitle: (period) => `Household status for ${period}`,
|
||||
householdStatusRentDirect: (amount, currency) => `Rent: ${amount} ${currency}`,
|
||||
householdStatusRentConverted: (sourceAmount, sourceCurrency, displayAmount, displayCurrency) =>
|
||||
`Rent: ${sourceAmount} ${sourceCurrency} (~${displayAmount} ${displayCurrency})`,
|
||||
householdStatusUtilities: (amount, currency) => `Utilities: ${amount} ${currency}`,
|
||||
householdStatusPurchases: (amount, currency) => `Shared purchases: ${amount} ${currency}`,
|
||||
householdStatusMember: (displayName, due, paid, remaining, currency) =>
|
||||
`- ${displayName}: due ${due} ${currency}, paid ${paid} ${currency}, remaining ${remaining} ${currency}`,
|
||||
householdStatusTotals: (due, paid, remaining, currency) =>
|
||||
`Totals: due ${due} ${currency}, paid ${paid} ${currency}, remaining ${remaining} ${currency}`,
|
||||
statementTitle: (period) => `Statement for ${period}`,
|
||||
statementLine: (displayName, amount, currency) => `- ${displayName}: ${amount} ${currency}`,
|
||||
statementTotal: (amount, currency) => `Total: ${amount} ${currency}`,
|
||||
|
||||
@@ -22,9 +22,6 @@ export const ruBotTranslations: BotTranslationCatalog = {
|
||||
groupHeading: 'Группа дома:',
|
||||
groupAdminsHeading: 'Админы группы:'
|
||||
},
|
||||
bot: {
|
||||
householdStatusPending: 'Статус дома пока не подключен. Интеграция данных будет следующей.'
|
||||
},
|
||||
common: {
|
||||
unableToIdentifySender: 'Не удалось определить отправителя для этой команды.',
|
||||
useHelp: 'Отправьте /help, чтобы увидеть доступные команды.'
|
||||
@@ -147,6 +144,16 @@ export const ruBotTranslations: BotTranslationCatalog = {
|
||||
`Оплата сохранена: ${kind === 'rent' ? 'аренда' : 'коммуналка'} ${amount} ${currency} за ${period}`,
|
||||
paymentAddFailed: (message) => `Не удалось сохранить оплату: ${message}`,
|
||||
noStatementCycle: 'Для выписки период не найден.',
|
||||
householdStatusTitle: (period) => `Статус дома за ${period}`,
|
||||
householdStatusRentDirect: (amount, currency) => `Аренда: ${amount} ${currency}`,
|
||||
householdStatusRentConverted: (sourceAmount, sourceCurrency, displayAmount, displayCurrency) =>
|
||||
`Аренда: ${sourceAmount} ${sourceCurrency} (~${displayAmount} ${displayCurrency})`,
|
||||
householdStatusUtilities: (amount, currency) => `Коммуналка: ${amount} ${currency}`,
|
||||
householdStatusPurchases: (amount, currency) => `Общие покупки: ${amount} ${currency}`,
|
||||
householdStatusMember: (displayName, due, paid, remaining, currency) =>
|
||||
`- ${displayName}: должен ${due} ${currency}, оплачено ${paid} ${currency}, осталось ${remaining} ${currency}`,
|
||||
householdStatusTotals: (due, paid, remaining, currency) =>
|
||||
`Итого: должен ${due} ${currency}, оплачено ${paid} ${currency}, осталось ${remaining} ${currency}`,
|
||||
statementTitle: (period) => `Выписка за ${period}`,
|
||||
statementLine: (displayName, amount, currency) => `- ${displayName}: ${amount} ${currency}`,
|
||||
statementTotal: (amount, currency) => `Итого: ${amount} ${currency}`,
|
||||
|
||||
@@ -44,9 +44,6 @@ export interface BotTranslationCatalog {
|
||||
groupHeading: string
|
||||
groupAdminsHeading: string
|
||||
}
|
||||
bot: {
|
||||
householdStatusPending: string
|
||||
}
|
||||
common: {
|
||||
unableToIdentifySender: string
|
||||
useHelp: string
|
||||
@@ -154,6 +151,29 @@ export interface BotTranslationCatalog {
|
||||
) => string
|
||||
paymentAddFailed: (message: string) => string
|
||||
noStatementCycle: string
|
||||
householdStatusTitle: (period: string) => string
|
||||
householdStatusRentDirect: (amount: string, currency: string) => string
|
||||
householdStatusRentConverted: (
|
||||
sourceAmount: string,
|
||||
sourceCurrency: string,
|
||||
displayAmount: string,
|
||||
displayCurrency: string
|
||||
) => string
|
||||
householdStatusUtilities: (amount: string, currency: string) => string
|
||||
householdStatusPurchases: (amount: string, currency: string) => string
|
||||
householdStatusMember: (
|
||||
displayName: string,
|
||||
due: string,
|
||||
paid: string,
|
||||
remaining: string,
|
||||
currency: string
|
||||
) => string
|
||||
householdStatusTotals: (
|
||||
due: string,
|
||||
paid: string,
|
||||
remaining: string,
|
||||
currency: string
|
||||
) => string
|
||||
statementTitle: (period: string) => string
|
||||
statementLine: (displayName: string, amount: string, currency: string) => string
|
||||
statementTotal: (amount: string, currency: string) => string
|
||||
|
||||
Reference in New Issue
Block a user