Skip to content

Commit

Permalink
refactor: move quote related i18n props to quote lib (#17939)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uli-Tiger authored Oct 9, 2023
1 parent 70e3302 commit b694bbe
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 12 deletions.
2 changes: 2 additions & 0 deletions feature-libs/quote/assets/translations/en/quote.i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
3 changes: 0 additions & 3 deletions projects/assets/src/translations/en/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit b694bbe

Please sign in to comment.