Add translations on core views (#13895)
closes https://github.com/twentyhq/twenty/issues/11999
This commit is contained in:
@@ -51,15 +51,23 @@ export class ViewSyncService {
|
||||
workspaceId: string,
|
||||
workspaceView: ViewWorkspaceEntity,
|
||||
): Promise<void> {
|
||||
let viewName = workspaceView.name;
|
||||
|
||||
if (workspaceView.key === 'INDEX') {
|
||||
// All INDEX views use the template for consistency
|
||||
viewName = 'All {objectLabelPlural}';
|
||||
}
|
||||
|
||||
const coreView: Partial<View> = {
|
||||
id: workspaceView.id,
|
||||
name: workspaceView.name,
|
||||
name: viewName,
|
||||
objectMetadataId: workspaceView.objectMetadataId,
|
||||
type: workspaceView.type === 'table' ? ViewType.TABLE : ViewType.KANBAN,
|
||||
key: workspaceView.key,
|
||||
icon: workspaceView.icon,
|
||||
position: workspaceView.position,
|
||||
isCompact: workspaceView.isCompact,
|
||||
isCustom: workspaceView.key !== 'INDEX',
|
||||
openRecordIn:
|
||||
workspaceView.openRecordIn === 'SIDE_PANEL'
|
||||
? ViewOpenRecordIn.SIDE_PANEL
|
||||
|
||||
Reference in New Issue
Block a user