Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions src/app/core/i18n/analytics.translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ export const ANALYTICS_TRANSLATIONS = {
comparedToLastMonth: 'compared to last month',
transactions: 'transactions',
groups: 'groups',
totalBalance: 'Total balance',
income: 'Income',
expense: 'Expense',
more: 'more',
theSame: 'The same',
less: 'less',
},
statistics: {
title: 'Statistics',
Expand All @@ -22,9 +28,13 @@ export const ANALYTICS_TRANSLATIONS = {
totalBalance: 'Total balance',
totalIncome: 'Total income',
totalExpenses: 'Total expenses',
selectedMonth: 'Selected month',
previousMonth: 'Previous month',
},
budgetsExpenses: {
title: 'Budgets vs Expenses',
expenses: 'Expenses',
budgets: 'Budgets',
},
},
uk: {
Expand All @@ -35,6 +45,12 @@ export const ANALYTICS_TRANSLATIONS = {
comparedToLastMonth: 'порівняно з минулим місяцем',
transactions: 'транзакцій',
groups: 'груп',
totalBalance: 'Загальний баланс',
income: 'Дохід',
expense: 'Витрата',
more: 'більше',
theSame: 'Однаково',
less: 'менше',
},
statistics: {
title: 'Статистика',
Expand All @@ -50,9 +66,13 @@ export const ANALYTICS_TRANSLATIONS = {
totalBalance: 'Загальний баланс',
totalIncome: 'Загальний дохід',
totalExpenses: 'Загальні витрати',
selectedMonth: 'Поточний місяць',
previousMonth: 'Попередній місяць',
},
budgetsExpenses: {
title: 'Бюджети vs Витрати',
expenses: 'Витрати',
budgets: 'Бюджети',
},
},
cs: {
Expand All @@ -63,6 +83,12 @@ export const ANALYTICS_TRANSLATIONS = {
comparedToLastMonth: 'oproti minulému měsíci',
transactions: 'transakcí',
groups: 'skupin',
totalBalance: 'Celkový zůstatek',
income: 'Příjem',
expense: 'Výdaj',
more: 'více',
theSame: 'Stejně',
less: 'méně',
},
statistics: {
title: 'Statistiky',
Expand All @@ -78,9 +104,13 @@ export const ANALYTICS_TRANSLATIONS = {
totalBalance: 'Celkový zůstatek',
totalIncome: 'Celkový příjem',
totalExpenses: 'Celkové výdaje',
selectedMonth: 'Vybraný měsíc',
previousMonth: 'Předchozí měsíc',
},
budgetsExpenses: {
title: 'Rozpočty vs Výdaje',
expenses: 'Výdaje',
budgets: 'Rozpočty',
},
},
};
15 changes: 15 additions & 0 deletions src/app/core/i18n/dashboard.translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ export const DASHBOARD_TRANSLATIONS = {
createGoalsText: 'Create saving goals to track your progress towards your financial targets.',
gotoGoals: 'Goto Goals',
},
summaryWidget: {
totalBalance: 'Total balance',
income: 'Income',
expenses: 'Expenses',
},
amountWidget: {
vsLastMonth: 'vs last month',
},
Expand Down Expand Up @@ -45,6 +50,11 @@ export const DASHBOARD_TRANSLATIONS = {
createGoalsText: 'Створіть цілі заощаджень для відстеження прогресу.',
gotoGoals: 'Перейти до цілей',
},
summaryWidget: {
totalBalance: 'Загальний баланс',
income: 'Дохід',
expenses: 'Витрати',
},
amountWidget: {
vsLastMonth: 'порівняно з минулим місяцем',
},
Expand Down Expand Up @@ -72,6 +82,11 @@ export const DASHBOARD_TRANSLATIONS = {
createGoalsText: 'Vytvořte cíle spoření pro sledování pokroku.',
gotoGoals: 'Přejít na cíle',
},
summaryWidget: {
totalBalance: 'Celkový zůstatek',
income: 'Příjem',
expenses: 'Výdaje',
},
amountWidget: {
vsLastMonth: 'oproti minulému měsíci',
},
Expand Down
8 changes: 4 additions & 4 deletions src/app/core/i18n/login.translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const LOGIN_TRANSLATIONS = {
continueWithGoogle: 'Continue with Google',
tryDemo: 'Try Demo Mode',
signInWithEmail: 'Sign in with email',
signInWithPasskey: 'Sign in with passkey',
signInWithPasskey: 'Sign in with Passkey',
noAccount: "Don't have an account?",
signUpLink: 'Sign up',
},
Expand All @@ -19,7 +19,7 @@ export const LOGIN_TRANSLATIONS = {
continueWithGoogle: 'Продовжити з Google',
tryDemo: 'Демо-режим',
signInWithEmail: 'Увійти через email',
signInWithPasskey: 'Увійти через ключ доступу',
signInWithPasskey: 'Увійти із Passkey',
noAccount: 'Ще не маєте облікового запису?',
signUpLink: 'Зареєструватися',
},
Expand All @@ -30,8 +30,8 @@ export const LOGIN_TRANSLATIONS = {
badge: 'Zdarma a bezpečně',
continueWithGoogle: 'Pokračovat přes Google',
tryDemo: 'Vyzkoušet Demo',
signInWithEmail: 'Přihlásit se e-mailem',
signInWithPasskey: 'Přihlásit se přístupovým klíčem',
signInWithEmail: 'Přes e-mail',
signInWithPasskey: 'Přihlásit klíčem',
noAccount: 'Nemáte účet?',
signUpLink: 'Registrovat se',
},
Expand Down
6 changes: 6 additions & 0 deletions src/app/core/i18n/shared.translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ export const SHARED_TRANSLATIONS = {
deposit: 'Deposit',
withdraw: 'Withdraw',
addNew: 'Add new',
selectItem: 'Select item',
selectAccount: 'Select account',
somethingWentWrong: 'Something went wrong. Please try again.',
},
uk: {
Expand Down Expand Up @@ -67,6 +69,8 @@ export const SHARED_TRANSLATIONS = {
deposit: 'Поповнити',
withdraw: 'Зняти',
addNew: 'Додати',
selectItem: 'Оберіть елемент',
selectAccount: 'Оберіть рахунок',
somethingWentWrong: 'Щось пішло не так. Спробуйте ще раз.',
},
cs: {
Expand Down Expand Up @@ -102,6 +106,8 @@ export const SHARED_TRANSLATIONS = {
deposit: 'Vložit',
withdraw: 'Vybrat',
addNew: 'Přidat',
selectItem: 'Vyberte položku',
selectAccount: 'Vyberte účet',
somethingWentWrong: 'Něco se pokazilo. Zkuste to znovu.',
},
};
62 changes: 55 additions & 7 deletions src/app/core/i18n/wallet.translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ export const WALLET_TRANSLATIONS = {
addAccount: 'Add account',
accountSettings: {
header: 'Account settings',
currencyInfo: 'To change account currency or delete it, delete all related transactions.',
currencyInfo:
'To change account currency or delete it, delete all related transactions.',
updateFailed: 'Account updating failed',
deleteFailed: 'Account deleting failed',
},
Expand Down Expand Up @@ -32,19 +33,35 @@ export const WALLET_TRANSLATIONS = {
},
transactionsOverview: {
title: 'Daily Transaction Flow',
tooltip: 'The expenses and incomes of the selected currency are based on the transaction amounts for each day of the selected month.',
tooltip:
'The expenses and incomes of the selected currency are based on the transaction amounts for each day of the selected month.',
incomesOn: 'Incomes On',
incomesOff: 'Incomes Off',
income: 'Income',
expense: 'Expense',
},
newAccountForm: {
nameLabel: 'Name',
namePlaceholder: 'Enter account name',
nameError: 'Should be between 3 and 30 characters',
currencyLabel: 'Currency',
currencyPlaceholder: 'Select a currency',
currencyError: 'Should be selected',
balanceLabel: 'Balance',
balancePlaceholder: 'Enter account balance',
balanceError: 'Amount required',
balanceDateLabel: 'Balance as of',
balanceDateOptional: '(optional)',
balanceDatePlaceholder: 'Now',
},
},
uk: {
transferMoney: 'Перекласти кошти',
transferMoney: 'Перевести кошти',
addAccount: 'Додати рахунок',
accountSettings: {
header: 'Налаштування рахунку',
currencyInfo: 'Щоб змінити валюту рахунку або видалити його, спочатку видаліть усі пов\'язані транзакції.',
currencyInfo:
"Щоб змінити валюту рахунку або видалити його, спочатку видаліть усі пов'язані транзакції.",
updateFailed: 'Помилка оновлення рахунку',
deleteFailed: 'Помилка видалення рахунку',
},
Expand Down Expand Up @@ -72,19 +89,35 @@ export const WALLET_TRANSLATIONS = {
},
transactionsOverview: {
title: 'Щоденний грошовий потік',
tooltip: 'Витрати та доходи у вибраній валюті на основі сум транзакцій за кожен день обраного місяця.',
tooltip:
'Витрати та доходи у вибраній валюті на основі сум транзакцій за кожен день обраного місяця.',
incomesOn: 'Доходи: вкл.',
incomesOff: 'Доходи: викл.',
income: 'Дохід',
expense: 'Витрата',
},
newAccountForm: {
nameLabel: 'Назва',
namePlaceholder: 'Введіть назву рахунку',
nameError: 'Має бути від 3 до 30 символів',
currencyLabel: 'Валюта',
currencyPlaceholder: 'Оберіть валюту',
currencyError: 'Необхідно обрати',
balanceLabel: 'Баланс',
balancePlaceholder: 'Введіть баланс рахунку',
balanceError: 'Сума обовʼязкова',
balanceDateLabel: 'Баланс станом на',
balanceDateOptional: '(необовʼязково)',
balanceDatePlaceholder: 'Зараз',
},
},
cs: {
transferMoney: 'Převést peníze',
addAccount: 'Přidat účet',
accountSettings: {
header: 'Nastavení účtu',
currencyInfo: 'Pro změnu měny účtu nebo jeho smazání nejprve smažte všechny související transakce.',
currencyInfo:
'Pro změnu měny účtu nebo jeho smazání nejprve smažte všechny související transakce.',
updateFailed: 'Aktualizace účtu selhala',
deleteFailed: 'Smazání účtu selhalo',
},
Expand Down Expand Up @@ -112,11 +145,26 @@ export const WALLET_TRANSLATIONS = {
},
transactionsOverview: {
title: 'Denní peněžní tok',
tooltip: 'Výdaje a příjmy ve vybrané měně na základě částek transakcí za každý den vybraného měsíce.',
tooltip:
'Výdaje a příjmy ve vybrané měně na základě částek transakcí za každý den vybraného měsíce.',
incomesOn: 'Příjmy: zap.',
incomesOff: 'Příjmy: vyp.',
income: 'Příjem',
expense: 'Výdaj',
},
newAccountForm: {
nameLabel: 'Název',
namePlaceholder: 'Zadejte název účtu',
nameError: 'Musí mít 3 až 30 znaků',
currencyLabel: 'Měna',
currencyPlaceholder: 'Vyberte měnu',
currencyError: 'Je nutné vybrat',
balanceLabel: 'Zůstatek',
balancePlaceholder: 'Zadejte zůstatek účtu',
balanceError: 'Částka je povinná',
balanceDateLabel: 'Zůstatek ke dni',
balanceDateOptional: '(volitelné)',
balanceDatePlaceholder: 'Nyní',
},
},
};
9 changes: 3 additions & 6 deletions src/app/features/analytics/analytics.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,11 @@
}
} @else {
<app-financial-summary-card
title="Total balance"
[title]="'analytics.financialSummary.totalBalance' | translate"
[currentAmount]="store.financialSummary()?.totalBalance ?? 0"
[previousAmount]="store.financialSummary()?.previousTotalBalance ?? 0"
[currency]="store.selectedCurrencyCode()"
[growTrendIsGood]="true"
infoTextPart="You have extra"
[transactionCount]="
(store.financialSummary()?.incomeTransactionCount ?? 0) +
(store.financialSummary()?.expenseTransactionCount ?? 0)
Expand All @@ -38,22 +37,20 @@
"
/>
<app-financial-summary-card
title="Income"
[title]="'analytics.financialSummary.income' | translate"
[currentAmount]="store.financialSummary()?.monthlyIncome ?? 0"
[previousAmount]="store.financialSummary()?.previousMonthlyIncome ?? 0"
[currency]="store.selectedCurrencyCode()"
[growTrendIsGood]="true"
infoTextPart="You earn extra"
[transactionCount]="store.financialSummary()?.incomeTransactionCount ?? 0"
[groupsCount]="store.financialSummary()?.incomeGroupsCount ?? 0"
/>
<app-financial-summary-card
title="Expense"
[title]="'analytics.financialSummary.expense' | translate"
[currentAmount]="store.financialSummary()?.monthlyExpense ?? 0"
[previousAmount]="store.financialSummary()?.previousMonthlyExpense ?? 0"
[currency]="store.selectedCurrencyCode()"
[growTrendIsGood]="false"
infoTextPart="You have extra"
[transactionCount]="
store.financialSummary()?.expenseTransactionCount ?? 0
"
Expand Down
2 changes: 2 additions & 0 deletions src/app/features/analytics/analytics.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ChangeDetectionStrategy, Component, inject } from '@angular/core';
import { TranslatePipe } from '@shared/pipes/translate.pipe';
import { Card } from '@shared/ui/card';
import { SkeletonModule } from 'primeng/skeleton';
import { AnalyticsStore } from './stores';
Expand All @@ -17,6 +18,7 @@ import { StatsFilters } from './ui/stats-filters';
AnalyticStatisticsCard,
SkeletonModule,
Card,
TranslatePipe,
],
templateUrl: './analytics.html',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
inject,
input,
} from '@angular/core';
import { LocalizationService } from '@core/services/localization.service';
import { ThemeService } from '@core/services/theme.service';
import { ChartModule } from 'primeng/chart';

Expand All @@ -21,6 +22,8 @@ import { ChartModule } from 'primeng/chart';
export class BudgetsExpensesChart {
private readonly isDarkModeSignal = inject(ThemeService).isDark;
private readonly datePipe = inject(DatePipe);
private readonly localizationService = inject(LocalizationService);
private readonly t = (key: string) => this.localizationService.translate(key);

readonly labels = input<string[]>([]);
readonly expenses = input<number[]>([]);
Expand Down Expand Up @@ -60,13 +63,13 @@ export class BudgetsExpensesChart {
labels: this.labels().map((i) => this.datePipe.transform(i, 'MMM')),
datasets: [
{
label: 'Expenses',
label: this.t('analytics.budgetsExpenses.expenses'),
backgroundColor: this.chartColors().expense,
borderColor: this.chartColors().expense,
data: this.expenses(),
},
{
label: 'Budgets',
label: this.t('analytics.budgetsExpenses.budgets'),
backgroundColor: this.chartColors().budget,
borderColor: this.chartColors().budget,
data: this.budgets(),
Expand Down
Loading
Loading