Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
feature(CMS): slice first 3 path elements of for the title because th…
Browse files Browse the repository at this point in the history
…ey are redundant in the preview (#4272)

closes: COR-543

Co-authored-by: VWSCoronaDashboard25 <[email protected]>
  • Loading branch information
VWSCoronaDashboard25 and VWSCoronaDashboard25 authored May 31, 2022
1 parent f5bd004 commit 77ff781
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/cms/src/schemas/documents/lokalize-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,16 @@ export const lokalizeText = {
* list, but the path field is cleaner when browsing texts because it
* avoids a lot of string duplication.
*/
title: 'key',
key: 'key',
subtitle: 'text.nl',
},
prepare({ key, subtitle}: { key: string, subtitle: string}) {
const title = key.split('.').slice(3).join('.');
return {
title,
subtitle
}
},
},
};

Expand Down

0 comments on commit 77ff781

Please sign in to comment.