fix: checkout payment-description fallback hardcoded Russian regardless of locale

getPaymentDescription()'s final fallback ('Покупка на Маркетплейсе')
ignored the active language. Moved to a translated key.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
sdarbinyan
2026-08-13 09:09:12 +04:00
parent c0bce7feac
commit 8937aea57c
5 changed files with 5 additions and 1 deletions

View File

@@ -124,6 +124,7 @@ export const en: Translations = {
emailNeedsDomain: 'Email must contain a domain (.com, .ru, etc.)', emailNeedsDomain: 'Email must contain a domain (.com, .ru, etc.)',
emailInvalid: 'Invalid email format', emailInvalid: 'Invalid email format',
telegramIdMissing: 'We could not identify your Telegram account, so we could not save your contact details. Your payment was still successful.', telegramIdMissing: 'We could not identify your Telegram account, so we could not save your contact details. Your payment was still successful.',
paymentDescriptionFallback: 'Purchase on Marketplace',
emailPlaceholder: 'you@example.com', emailPlaceholder: 'you@example.com',
phonePlaceholder: '+7 (___) ___-__-__', phonePlaceholder: '+7 (___) ___-__-__',
loginRequired: 'Log in to checkout', loginRequired: 'Log in to checkout',

View File

@@ -124,6 +124,7 @@ export const hy: Translations = {
emailNeedsDomain: 'Email-ը պետք է պարունակի դոմեյն (.com, .ru և այլն)', emailNeedsDomain: 'Email-ը պետք է պարունակի դոմեյն (.com, .ru և այլն)',
emailInvalid: 'Սխալ email ձևաչափ', emailInvalid: 'Սխալ email ձևաչափ',
telegramIdMissing: 'Չհաջողվեց հաստատել ձեր Telegram հաշիվը, ուստի կոնտակտային տվյալները չեն պահպանվել։ Վճարումը հաջողությամբ կատարվել է։', telegramIdMissing: 'Չհաջողվեց հաստատել ձեր Telegram հաշիվը, ուստի կոնտակտային տվյալները չեն պահպանվել։ Վճարումը հաջողությամբ կատարվել է։',
paymentDescriptionFallback: 'Գնում Մարկետփլեյսում',
emailPlaceholder: 'you@example.com', emailPlaceholder: 'you@example.com',
phonePlaceholder: '+7 (___) ___-__-__', phonePlaceholder: '+7 (___) ___-__-__',
loginRequired: 'Մուտք գործեք ձևակերպելու համար', loginRequired: 'Մուտք գործեք ձևակերպելու համար',

View File

@@ -124,6 +124,7 @@ export const ru: Translations = {
emailNeedsDomain: 'Email должен содержать домен (.com, .ru и т.д.)', emailNeedsDomain: 'Email должен содержать домен (.com, .ru и т.д.)',
emailInvalid: 'Некорректный формат email', emailInvalid: 'Некорректный формат email',
telegramIdMissing: 'Не удалось определить ваш Telegram-аккаунт, поэтому контактные данные не сохранены. Оплата прошла успешно.', telegramIdMissing: 'Не удалось определить ваш Telegram-аккаунт, поэтому контактные данные не сохранены. Оплата прошла успешно.',
paymentDescriptionFallback: 'Покупка на Маркетплейсе',
emailPlaceholder: 'you@example.com', emailPlaceholder: 'you@example.com',
phonePlaceholder: '+7 (___) ___-__-__', phonePlaceholder: '+7 (___) ___-__-__',
loginRequired: 'Войдите для оформления', loginRequired: 'Войдите для оформления',

View File

@@ -122,6 +122,7 @@ export interface Translations {
emailNeedsDomain: string; emailNeedsDomain: string;
emailInvalid: string; emailInvalid: string;
telegramIdMissing: string; telegramIdMissing: string;
paymentDescriptionFallback: string;
emailPlaceholder: string; emailPlaceholder: string;
phonePlaceholder: string; phonePlaceholder: string;
loginRequired: string; loginRequired: string;

View File

@@ -615,7 +615,7 @@ export class CartComponent implements OnDestroy {
return hostname; return hostname;
} }
return 'Покупка на Маркетплейсе'; return this.i18n.t('cart.paymentDescriptionFallback');
} }
private generateOrderId(): string { private generateOrderId(): string {