diff --git a/src/app/core/i18n/analytics.translations.ts b/src/app/core/i18n/analytics.translations.ts index c8a020c..bed8eb0 100644 --- a/src/app/core/i18n/analytics.translations.ts +++ b/src/app/core/i18n/analytics.translations.ts @@ -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', @@ -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: { @@ -35,6 +45,12 @@ export const ANALYTICS_TRANSLATIONS = { comparedToLastMonth: 'порівняно з минулим місяцем', transactions: 'транзакцій', groups: 'груп', + totalBalance: 'Загальний баланс', + income: 'Дохід', + expense: 'Витрата', + more: 'більше', + theSame: 'Однаково', + less: 'менше', }, statistics: { title: 'Статистика', @@ -50,9 +66,13 @@ export const ANALYTICS_TRANSLATIONS = { totalBalance: 'Загальний баланс', totalIncome: 'Загальний дохід', totalExpenses: 'Загальні витрати', + selectedMonth: 'Поточний місяць', + previousMonth: 'Попередній місяць', }, budgetsExpenses: { title: 'Бюджети vs Витрати', + expenses: 'Витрати', + budgets: 'Бюджети', }, }, cs: { @@ -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', @@ -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', }, }, }; diff --git a/src/app/core/i18n/dashboard.translations.ts b/src/app/core/i18n/dashboard.translations.ts index cce286b..20ffc39 100644 --- a/src/app/core/i18n/dashboard.translations.ts +++ b/src/app/core/i18n/dashboard.translations.ts @@ -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', }, @@ -45,6 +50,11 @@ export const DASHBOARD_TRANSLATIONS = { createGoalsText: 'Створіть цілі заощаджень для відстеження прогресу.', gotoGoals: 'Перейти до цілей', }, + summaryWidget: { + totalBalance: 'Загальний баланс', + income: 'Дохід', + expenses: 'Витрати', + }, amountWidget: { vsLastMonth: 'порівняно з минулим місяцем', }, @@ -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', }, diff --git a/src/app/core/i18n/login.translations.ts b/src/app/core/i18n/login.translations.ts index 87a8d3f..81ad6e8 100644 --- a/src/app/core/i18n/login.translations.ts +++ b/src/app/core/i18n/login.translations.ts @@ -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', }, @@ -19,7 +19,7 @@ export const LOGIN_TRANSLATIONS = { continueWithGoogle: 'Продовжити з Google', tryDemo: 'Демо-режим', signInWithEmail: 'Увійти через email', - signInWithPasskey: 'Увійти через ключ доступу', + signInWithPasskey: 'Увійти із Passkey', noAccount: 'Ще не маєте облікового запису?', signUpLink: 'Зареєструватися', }, @@ -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', }, diff --git a/src/app/core/i18n/shared.translations.ts b/src/app/core/i18n/shared.translations.ts index 2b743f4..1758d32 100644 --- a/src/app/core/i18n/shared.translations.ts +++ b/src/app/core/i18n/shared.translations.ts @@ -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: { @@ -67,6 +69,8 @@ export const SHARED_TRANSLATIONS = { deposit: 'Поповнити', withdraw: 'Зняти', addNew: 'Додати', + selectItem: 'Оберіть елемент', + selectAccount: 'Оберіть рахунок', somethingWentWrong: 'Щось пішло не так. Спробуйте ще раз.', }, cs: { @@ -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.', }, }; diff --git a/src/app/core/i18n/wallet.translations.ts b/src/app/core/i18n/wallet.translations.ts index cb3190f..d47a241 100644 --- a/src/app/core/i18n/wallet.translations.ts +++ b/src/app/core/i18n/wallet.translations.ts @@ -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', }, @@ -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: 'Помилка видалення рахунку', }, @@ -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', }, @@ -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í', + }, }, }; diff --git a/src/app/features/analytics/analytics.html b/src/app/features/analytics/analytics.html index 11764aa..e3a61e7 100644 --- a/src/app/features/analytics/analytics.html +++ b/src/app/features/analytics/analytics.html @@ -22,12 +22,11 @@ } } @else { this.localizationService.translate(key); readonly labels = input([]); readonly expenses = input([]); @@ -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(), diff --git a/src/app/features/analytics/ui/financial-monthly-overview-chart/financial-monthly-overview-chart.ts b/src/app/features/analytics/ui/financial-monthly-overview-chart/financial-monthly-overview-chart.ts index 577103d..1d50a3b 100644 --- a/src/app/features/analytics/ui/financial-monthly-overview-chart/financial-monthly-overview-chart.ts +++ b/src/app/features/analytics/ui/financial-monthly-overview-chart/financial-monthly-overview-chart.ts @@ -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'; @@ -21,6 +22,8 @@ import { ChartModule } from 'primeng/chart'; export class FinancialMonthlyOverviewChart { private readonly themeService = inject(ThemeService); private readonly datePipe = inject(DatePipe); + private readonly localizationService = inject(LocalizationService); + private readonly t = (key: string) => this.localizationService.translate(key); readonly labels = input([]); readonly currentAmounts = input([]); @@ -67,7 +70,7 @@ export class FinancialMonthlyOverviewChart { labels: this.labels().map((i) => this.datePipe.transform(i, this.labelFormat())), datasets: [ { - label: 'Selected month', + label: this.t('analytics.monthlyOverview.selectedMonth'), backgroundColor: ({ chart, }: { @@ -100,7 +103,7 @@ export class FinancialMonthlyOverviewChart { pointRadius: 0, }, { - label: 'Previous month', + label: this.t('analytics.monthlyOverview.previousMonth'), backgroundColor: this.colors().previousLine, borderColor: this.colors().previousLine, data: this.previousAmounts(), diff --git a/src/app/features/analytics/ui/financial-summary-card/financial-summary-card.ts b/src/app/features/analytics/ui/financial-summary-card/financial-summary-card.ts index 1b0dcf7..572a5f3 100644 --- a/src/app/features/analytics/ui/financial-summary-card/financial-summary-card.ts +++ b/src/app/features/analytics/ui/financial-summary-card/financial-summary-card.ts @@ -3,8 +3,10 @@ import { ChangeDetectionStrategy, Component, computed, + inject, input, } from '@angular/core'; +import { LocalizationService } from '@core/services/localization.service'; import { TranslatePipe } from '@shared/pipes/translate.pipe'; import { Card } from '@shared/ui/card'; import { CardHeaderTitle } from '@shared/ui/card-header-title/card-header-title'; @@ -34,6 +36,9 @@ import { FinancialSummaryCardButton } from './financial-summary-card-button/fina }, }) export class FinancialSummaryCard { + private readonly localizationService = inject(LocalizationService); + private readonly t = (key: string) => this.localizationService.translate(key); + readonly title = input(''); readonly currentAmount = input(0); readonly previousAmount = input(0); @@ -48,9 +53,9 @@ export class FinancialSummaryCard { protected readonly comparedText = computed(() => this.currentAmount() > this.previousAmount() - ? 'more' + ? this.t('analytics.financialSummary.more') : this.currentAmount() === this.previousAmount() - ? 'The same' - : 'less', + ? this.t('analytics.financialSummary.theSame') + : this.t('analytics.financialSummary.less'), ); } diff --git a/src/app/features/auth/login/ui/email-auth-button/email-auth-button.ts b/src/app/features/auth/login/ui/email-auth-button/email-auth-button.ts index 19d9fed..746751b 100644 --- a/src/app/features/auth/login/ui/email-auth-button/email-auth-button.ts +++ b/src/app/features/auth/login/ui/email-auth-button/email-auth-button.ts @@ -28,7 +28,7 @@ import { - + {{ label() }} diff --git a/src/app/features/auth/login/ui/google-button/google-button.ts b/src/app/features/auth/login/ui/google-button/google-button.ts index cff2d3a..2a707c8 100644 --- a/src/app/features/auth/login/ui/google-button/google-button.ts +++ b/src/app/features/auth/login/ui/google-button/google-button.ts @@ -15,7 +15,7 @@ import { GooglePic } from '../google-pic/google-pic'; (click)="clickLogin.emit()" > - + {{ 'login.continueWithGoogle' | translate }} diff --git a/src/app/features/auth/login/ui/passkey-button/passkey-button.ts b/src/app/features/auth/login/ui/passkey-button/passkey-button.ts index a3e8444..309a2e8 100644 --- a/src/app/features/auth/login/ui/passkey-button/passkey-button.ts +++ b/src/app/features/auth/login/ui/passkey-button/passkey-button.ts @@ -25,7 +25,7 @@ import { TranslatePipe } from '@shared/pipes/translate.pipe'; - + {{ 'login.signInWithPasskey' | translate }} diff --git a/src/app/features/budget/layout/budget-layout.ts b/src/app/features/budget/layout/budget-layout.ts index 16aa724..41f4fbc 100644 --- a/src/app/features/budget/layout/budget-layout.ts +++ b/src/app/features/budget/layout/budget-layout.ts @@ -8,6 +8,7 @@ import { import { toSignal } from '@angular/core/rxjs-interop'; import { NavigationEnd, Router, RouterOutlet } from '@angular/router'; import { AccountsStore } from '@core/store/accounts-store'; +import { LocalizationService } from '@core/services/localization.service'; import { BreadcrumbModule } from 'primeng/breadcrumb'; import { filter, map, startWith } from 'rxjs'; import { BudgetStore } from '../stores'; @@ -36,6 +37,8 @@ export class BudgetLayout { private readonly accountsStore = inject(AccountsStore); private readonly datePipe = inject(DatePipe); private readonly router = inject(Router); + private readonly localizationService = inject(LocalizationService); + private readonly t = (key: string) => this.localizationService.translate(key); private readonly currentUrl = toSignal( this.router.events.pipe( filter((e) => e instanceof NavigationEnd), @@ -45,7 +48,7 @@ export class BudgetLayout { ); protected readonly breadcrumbItems = computed(() => { - const home = ['Budget']; + const home = [this.t('core.pages.budget.title')]; if (this.budgetStore.month()) { home.push( diff --git a/src/app/features/dashboard/dashboard.html b/src/app/features/dashboard/dashboard.html index 163affb..ad1857a 100644 --- a/src/app/features/dashboard/dashboard.html +++ b/src/app/features/dashboard/dashboard.html @@ -10,7 +10,7 @@ @for (widget of store.displayedTotalsSummary(); track widget.title) { { expect(cards).toEqual([ { - title: 'Total balance', + title: 'dashboard.summaryWidget.totalBalance', amount: 10000, previousAmount: 9000, growTrendIsGood: true, }, { - title: 'Income', + title: 'dashboard.summaryWidget.income', amount: 3000, previousAmount: 2800, growTrendIsGood: true, }, { - title: 'Expenses', + title: 'dashboard.summaryWidget.expenses', amount: 2000, previousAmount: 1800, growTrendIsGood: false, diff --git a/src/app/features/dashboard/store/dashboard-store.ts b/src/app/features/dashboard/store/dashboard-store.ts index eaa8f12..9b7070c 100644 --- a/src/app/features/dashboard/store/dashboard-store.ts +++ b/src/app/features/dashboard/store/dashboard-store.ts @@ -77,19 +77,19 @@ export const DashboardStore = signalStore( return [ { - title: 'Total balance', + title: 'dashboard.summaryWidget.totalBalance', amount: totalBalance, previousAmount: previousMonthTotalBalance, growTrendIsGood: true, }, { - title: 'Income', + title: 'dashboard.summaryWidget.income', amount: monthlyIncome, previousAmount: previousMonthlyIncome, growTrendIsGood: true, }, { - title: 'Expenses', + title: 'dashboard.summaryWidget.expenses', amount: monthlyExpense, previousAmount: previousMonthlyExpense, growTrendIsGood: false, diff --git a/src/app/features/landing/landing.html b/src/app/features/landing/landing.html index 8d7e64a..a8d4ade 100644 --- a/src/app/features/landing/landing.html +++ b/src/app/features/landing/landing.html @@ -191,6 +191,11 @@

🇺🇦 +
+ + + +

{{ 'landing.footer.designInspiredBy' | translate }} TRANSLATIONS[this.lang()].landing.heroBadges); - protected readonly stats = computed(() => TRANSLATIONS[this.lang()].landing.stats); - protected readonly sectionsData = computed(() => TRANSLATIONS[this.lang()].landing.sectionsData); - protected readonly howItWorksSteps = computed(() => TRANSLATIONS[this.lang()].landing.howItWorksSteps); - protected readonly testimonials = computed(() => TRANSLATIONS[this.lang()].landing.testimonialsList); + protected readonly heroBadges = computed( + () => TRANSLATIONS[this.lang()].landing.heroBadges, + ); + protected readonly stats = computed( + () => TRANSLATIONS[this.lang()].landing.stats, + ); + protected readonly sectionsData = computed( + () => TRANSLATIONS[this.lang()].landing.sectionsData, + ); + protected readonly howItWorksSteps = computed( + () => TRANSLATIONS[this.lang()].landing.howItWorksSteps, + ); + protected readonly testimonials = computed( + () => TRANSLATIONS[this.lang()].landing.testimonialsList, + ); protected readonly currentYear = new Date().getFullYear(); diff --git a/src/app/features/landing/ui/instagram-link.ts b/src/app/features/landing/ui/instagram-link.ts new file mode 100644 index 0000000..49cd6f8 --- /dev/null +++ b/src/app/features/landing/ui/instagram-link.ts @@ -0,0 +1,36 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-instagram-link', + template: ` + + + Instagram + + + + `, + styles: ` + :host { + display: block; + height: 16px; + width: 16px; + } + `, +}) +export class InstagramLink {} diff --git a/src/app/features/landing/ui/threads-link.ts b/src/app/features/landing/ui/threads-link.ts new file mode 100644 index 0000000..f575cbd --- /dev/null +++ b/src/app/features/landing/ui/threads-link.ts @@ -0,0 +1,36 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-threads-link', + template: ` + + + Threads + + + + `, + styles: ` + :host { + display: block; + height: 16px; + width: 16px; + } + `, +}) +export class ThreadsLink {} diff --git a/src/app/features/landing/ui/x-link.ts b/src/app/features/landing/ui/x-link.ts new file mode 100644 index 0000000..e86dac4 --- /dev/null +++ b/src/app/features/landing/ui/x-link.ts @@ -0,0 +1,36 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-x-link', + template: ` + + + X + + + + `, + styles: ` + :host { + display: block; + height: 16px; + width: 16px; + } + `, +}) +export class XLink {} diff --git a/src/app/shared/ui/account-select/account-select.html b/src/app/shared/ui/account-select/account-select.html index b1c30b7..ac5200d 100644 --- a/src/app/shared/ui/account-select/account-select.html +++ b/src/app/shared/ui/account-select/account-select.html @@ -4,7 +4,7 @@ [options]="accounts()" inputId="account" optionValue="id" - [placeholder]="placeholder()" + [placeholder]="placeholder() || ('shared.selectAccount' | translate)" class="w-full" emptyMessage="No accounts to select" appendTo="body" diff --git a/src/app/shared/ui/account-select/account-select.ts b/src/app/shared/ui/account-select/account-select.ts index 31f9d67..2a95f86 100644 --- a/src/app/shared/ui/account-select/account-select.ts +++ b/src/app/shared/ui/account-select/account-select.ts @@ -12,13 +12,14 @@ import { NG_VALUE_ACCESSOR, } from '@angular/forms'; import { Account } from '@core/models/accounts'; +import { TranslatePipe } from '@shared/pipes/translate.pipe'; import { SelectDesignTokens } from '@primeuix/themes/types/select'; import { SelectModule } from 'primeng/select'; import { CurrencyCodeChip } from '../currency-code-chip'; @Component({ selector: 'app-account-select', - imports: [SelectModule, FormsModule, CurrencyCodeChip], + imports: [SelectModule, FormsModule, CurrencyCodeChip, TranslatePipe], templateUrl: './account-select.html', host: { class: 'w-full block' }, changeDetection: ChangeDetectionStrategy.OnPush, @@ -32,7 +33,7 @@ import { CurrencyCodeChip } from '../currency-code-chip'; }) export class AccountSelect implements ControlValueAccessor { readonly label = input(); - readonly placeholder = input('Select account'); + readonly placeholder = input(); readonly accounts = input([]); readonly isInvalid = input(false); diff --git a/src/app/shared/ui/auth-card/auth-card.ts b/src/app/shared/ui/auth-card/auth-card.ts index 90f8228..ba0da3a 100644 --- a/src/app/shared/ui/auth-card/auth-card.ts +++ b/src/app/shared/ui/auth-card/auth-card.ts @@ -12,7 +12,7 @@ import { ToastModule } from 'primeng/toast'; class="relative min-h-screen flex flex-col items-center justify-center p-6" >

@if (showLogo()) {
diff --git a/src/app/shared/ui/logo-short/logo-short.ts b/src/app/shared/ui/logo-short/logo-short.ts index bd77ce4..8feb65b 100644 --- a/src/app/shared/ui/logo-short/logo-short.ts +++ b/src/app/shared/ui/logo-short/logo-short.ts @@ -6,7 +6,7 @@ import { Component } from '@angular/core'; styles: ` :host { display: block; - height: 60px; + height: 52px; } `, }) diff --git a/src/app/shared/ui/new-account-form/new-account-form.html b/src/app/shared/ui/new-account-form/new-account-form.html index 2298a0c..e5c6463 100644 --- a/src/app/shared/ui/new-account-form/new-account-form.html +++ b/src/app/shared/ui/new-account-form/new-account-form.html @@ -1,12 +1,12 @@
- + - Should be between 3 and 30 characters + {{ t('wallet.newAccountForm.nameError') }}
}
- + Should be selected
+
{{ t('wallet.newAccountForm.currencyError') }}
}
@if (hasBalance()) {
- + @if (form.controls.balance.invalid && form.controls.balance.dirty) { -
Amount required
+
{{ t('wallet.newAccountForm.balanceError') }}
}
diff --git a/src/app/shared/ui/new-account-form/new-account-form.ts b/src/app/shared/ui/new-account-form/new-account-form.ts index 4efa592..b889d88 100644 --- a/src/app/shared/ui/new-account-form/new-account-form.ts +++ b/src/app/shared/ui/new-account-form/new-account-form.ts @@ -14,6 +14,7 @@ import { Validators, } from '@angular/forms'; import { Currency } from '@core/models/currencies'; +import { LocalizationService } from '@core/services/localization.service'; import { ButtonModule } from 'primeng/button'; import { DatePickerModule } from 'primeng/datepicker'; import { InputNumberModule } from 'primeng/inputnumber'; @@ -56,6 +57,10 @@ export class NewAccountForm { readonly submitForm = output(); private readonly formBuilder = inject(FormBuilder); + private readonly localizationService = inject(LocalizationService); + + protected readonly t = (key: string) => + this.localizationService.translate(key); protected readonly today = new Date(); diff --git a/src/app/shared/ui/select/select.html b/src/app/shared/ui/select/select.html index dcca03f..203a468 100644 --- a/src/app/shared/ui/select/select.html +++ b/src/app/shared/ui/select/select.html @@ -5,7 +5,7 @@ [inputId]="inputId()" [optionLabel]="optionLabel()" [optionValue]="optionValue()" - [placeholder]="placeholder()" + [placeholder]="placeholder() || ('shared.selectItem' | translate)" class="w-full" [dt]="selectDt" [invalid]="isInvalid()" diff --git a/src/app/shared/ui/select/select.ts b/src/app/shared/ui/select/select.ts index fd89fc3..7a48696 100644 --- a/src/app/shared/ui/select/select.ts +++ b/src/app/shared/ui/select/select.ts @@ -12,13 +12,14 @@ import { FormsModule, NG_VALUE_ACCESSOR, } from '@angular/forms'; +import { TranslatePipe } from '@shared/pipes/translate.pipe'; import { SelectDesignTokens } from '@primeuix/themes/types/select'; import { ButtonModule } from 'primeng/button'; import { SelectModule } from 'primeng/select'; @Component({ selector: 'app-select', - imports: [SelectModule, FormsModule, ButtonModule], + imports: [SelectModule, FormsModule, ButtonModule, TranslatePipe], templateUrl: './select.html', changeDetection: ChangeDetectionStrategy.OnPush, providers: [ @@ -34,7 +35,7 @@ export class Select implements ControlValueAccessor { readonly inputId = input.required(); readonly optionLabel = input('name'); readonly optionValue = input('value'); - readonly placeholder = input('Select item'); + readonly placeholder = input(); readonly options = input([]); readonly isInvalid = input(false); readonly hasAddButton = input(false);