From 8937aea57cfa3bbe9ecc200c690ea92628ab1b8b Mon Sep 17 00:00:00 2001 From: sdarbinyan Date: Thu, 13 Aug 2026 09:09:12 +0400 Subject: [PATCH] fix: checkout payment-description fallback hardcoded Russian regardless of locale MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit getPaymentDescription()'s final fallback ('Покупка на Маркетплейсе') ignored the active language. Moved to a translated key. Co-Authored-By: Claude Sonnet 5 --- src/app/i18n/en.ts | 1 + src/app/i18n/hy.ts | 1 + src/app/i18n/ru.ts | 1 + src/app/i18n/translations.ts | 1 + src/app/pages/cart/cart.component.ts | 2 +- 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/i18n/en.ts b/src/app/i18n/en.ts index 749cd3c..ddb80ce 100644 --- a/src/app/i18n/en.ts +++ b/src/app/i18n/en.ts @@ -124,6 +124,7 @@ export const en: Translations = { emailNeedsDomain: 'Email must contain a domain (.com, .ru, etc.)', 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.', + paymentDescriptionFallback: 'Purchase on Marketplace', emailPlaceholder: 'you@example.com', phonePlaceholder: '+7 (___) ___-__-__', loginRequired: 'Log in to checkout', diff --git a/src/app/i18n/hy.ts b/src/app/i18n/hy.ts index 539d2a0..991d790 100644 --- a/src/app/i18n/hy.ts +++ b/src/app/i18n/hy.ts @@ -124,6 +124,7 @@ export const hy: Translations = { emailNeedsDomain: 'Email-ը պետք է պարունակի դոմեյն (.com, .ru և այլն)', emailInvalid: 'Սխալ email ձևաչափ', telegramIdMissing: 'Չհաջողվեց հաստատել ձեր Telegram հաշիվը, ուստի կոնտակտային տվյալները չեն պահպանվել։ Վճարումը հաջողությամբ կատարվել է։', + paymentDescriptionFallback: 'Գնում Մարկետփլեյսում', emailPlaceholder: 'you@example.com', phonePlaceholder: '+7 (___) ___-__-__', loginRequired: 'Մուտք գործեք ձևակերպելու համար', diff --git a/src/app/i18n/ru.ts b/src/app/i18n/ru.ts index 6c06518..3988a0e 100644 --- a/src/app/i18n/ru.ts +++ b/src/app/i18n/ru.ts @@ -124,6 +124,7 @@ export const ru: Translations = { emailNeedsDomain: 'Email должен содержать домен (.com, .ru и т.д.)', emailInvalid: 'Некорректный формат email', telegramIdMissing: 'Не удалось определить ваш Telegram-аккаунт, поэтому контактные данные не сохранены. Оплата прошла успешно.', + paymentDescriptionFallback: 'Покупка на Маркетплейсе', emailPlaceholder: 'you@example.com', phonePlaceholder: '+7 (___) ___-__-__', loginRequired: 'Войдите для оформления', diff --git a/src/app/i18n/translations.ts b/src/app/i18n/translations.ts index a52246f..b8ef180 100644 --- a/src/app/i18n/translations.ts +++ b/src/app/i18n/translations.ts @@ -122,6 +122,7 @@ export interface Translations { emailNeedsDomain: string; emailInvalid: string; telegramIdMissing: string; + paymentDescriptionFallback: string; emailPlaceholder: string; phonePlaceholder: string; loginRequired: string; diff --git a/src/app/pages/cart/cart.component.ts b/src/app/pages/cart/cart.component.ts index 35ae9d2..b030843 100644 --- a/src/app/pages/cart/cart.component.ts +++ b/src/app/pages/cart/cart.component.ts @@ -615,7 +615,7 @@ export class CartComponent implements OnDestroy { return hostname; } - return 'Покупка на Маркетплейсе'; + return this.i18n.t('cart.paymentDescriptionFallback'); } private generateOrderId(): string {