From b694bbe3cd9816c0133231a50515af386e5578e1 Mon Sep 17 00:00:00 2001 From: Ulrich Stellmacher Date: Mon, 9 Oct 2023 13:23:09 +0200 Subject: [PATCH] refactor: move quote related i18n props to quote lib (#17939) --- feature-libs/quote/assets/translations/en/quote.i18n.ts | 2 ++ .../components/list/quote-list-component.service.spec.ts | 6 +++--- .../quote/components/list/quote-list-component.service.ts | 6 +++--- .../quote/components/list/quote-list.component.spec.ts | 6 +++--- projects/assets/src/translations/en/common.ts | 3 --- 5 files changed, 11 insertions(+), 12 deletions(-) diff --git a/feature-libs/quote/assets/translations/en/quote.i18n.ts b/feature-libs/quote/assets/translations/en/quote.i18n.ts index 29bbb354ed2..b5fa0d32fd6 100644 --- a/feature-libs/quote/assets/translations/en/quote.i18n.ts +++ b/feature-libs/quote/assets/translations/en/quote.i18n.ts @@ -150,6 +150,8 @@ export const quote = { sortBy: 'Sort by', sortOrders: 'Sort orders', empty: 'We have no quote records for this account.', + quoteId: 'Quote ID', + status: 'Status', }, states: { BUYER_DRAFT: 'Draft', diff --git a/feature-libs/quote/components/list/quote-list-component.service.spec.ts b/feature-libs/quote/components/list/quote-list-component.service.spec.ts index 861d0200b12..477387967e9 100644 --- a/feature-libs/quote/components/list/quote-list-component.service.spec.ts +++ b/feature-libs/quote/components/list/quote-list-component.service.spec.ts @@ -104,9 +104,9 @@ describe('QuoteListComponentService', () => { //given const labels: { [key: string]: string } = { byDate: 'sorting.date', - byCode: 'sorting.quoteId', - byName: 'sorting.name', - byState: 'sorting.status', + byCode: 'quote.list.quoteId', + byName: 'quote.list.name', + byState: 'quote.list.status', }; //then diff --git a/feature-libs/quote/components/list/quote-list-component.service.ts b/feature-libs/quote/components/list/quote-list-component.service.ts index 69488c8507c..80087b879bd 100644 --- a/feature-libs/quote/components/list/quote-list-component.service.ts +++ b/feature-libs/quote/components/list/quote-list-component.service.ts @@ -41,9 +41,9 @@ export class QuoteListComponentService { sortLabels$: Observable<{ [key: string]: string }> = combineLatest([ this.translationService.translate('sorting.date'), - this.translationService.translate('sorting.quoteId'), - this.translationService.translate('sorting.name'), - this.translationService.translate('sorting.status'), + this.translationService.translate('quote.list.quoteId'), + this.translationService.translate('quote.list.name'), + this.translationService.translate('quote.list.status'), ]).pipe( map( ([ diff --git a/feature-libs/quote/components/list/quote-list.component.spec.ts b/feature-libs/quote/components/list/quote-list.component.spec.ts index 483c5ff14e7..e7f3f683afd 100644 --- a/feature-libs/quote/components/list/quote-list.component.spec.ts +++ b/feature-libs/quote/components/list/quote-list.component.spec.ts @@ -104,9 +104,9 @@ class MockCommerceQuotesListComponentService sorts?: SortModel[] | undefined = mockSorts; sortLabels$ = of({ byDate: 'sorting.date', - byCode: 'sorting.quoteId', - byName: 'sorting.name', - byState: 'sorting.status', + byCode: 'quote.list.quoteId', + byName: 'quote.list.name', + byState: 'quote.list.status', }); quotesState$ = mockQuoteListState$.asObservable(); sort = new BehaviorSubject('byCode'); diff --git a/projects/assets/src/translations/en/common.ts b/projects/assets/src/translations/en/common.ts index 9d1dceb59dc..e6ca6a4c6bc 100644 --- a/projects/assets/src/translations/en/common.ts +++ b/projects/assets/src/translations/en/common.ts @@ -89,9 +89,6 @@ export const common = { rma: 'Return Number', replenishmentNumber: 'Replenishment Number', nextOrderDate: 'Next Order Date', - quoteId: 'Quote ID', - name: 'Name', - status: 'Status', pageViewUpdated: 'Page view updated with your selected options.', }, httpHandlers: {