Skip to content
js
import {
	EngineRoutingSchemaType,
	WebitelMediaExporterExportStatus,
} from '@webitel/api-services/gen/models';
import deepmerge from 'deepmerge';
import {
	AgentStatus,
	CallDirection,
	ChannelState,
	ChannelType,
} from 'webitel-sdk';

import {
	AdminSections,
	AuditorSections,
	ChatGatewayProvider,
	CrmSections,
	CrmSections as CrmSectionsNew,
	IconAction,
	QueueType,
	RelativeDatetimeValue,
	SupervisorSections,
	WtApplication,
} from '../../enums';
import { AccessMode } from '../../modules/ObjectPermissions/enums/AccessMode.enum';
import { snakeToCamel } from '../../scripts';
import { SortSymbols } from '../../scripts/sortQueryAdapters.js';
import notTranslatable from './notTranslatable.en';

export default deepmerge(
	{
		// describes reusable buttons, actions, default titles, and other ui elements
		reusable: {
			comment: 'Comment',
			replace: 'Replace',
			download: 'Download',
			history: 'History',
			filter: ({ plural }) =>
				plural([
					'Filter',
					'Filters',
				]),
			total: 'Total',
			ok: 'Ok',
			object: 'Object',
			save: 'Save',
			saveAs: 'Save as',
			saved: 'Saved',
			send: 'Send',
			sendMessage: 'Send message',
			start: 'Start',
			close: 'Close',
			add: 'Add',
			cancel: 'Cancel',
			import: 'Import',
			export: 'Export',
			true: 'True',
			title: 'Title',
			position: 'Position',
			delete: 'Delete',
			search: 'Search',
			open: 'Open',
			openInHistory: 'Open in History',
			name: 'Name',
			expand: 'Expand',
			collapse: 'Collapse',
			generate: 'Generate',
			from: 'From',
			to: 'To',
			today: 'Today',
			clear: 'Clear',
			tts: 'Text-to-Speech',
			state: 'State',
			status: 'Status',
			refresh: 'Refresh',
			retry: 'Retry',
			downloadAll: 'Download all',
			warning: 'Warning',
			doNotSave: "Don't save",
			required: 'Required',
			copy: 'Copy',
			new: 'New',
			createdAt: 'Created on',
			createdBy: 'Created by',
			modifiedAt: 'Modified on',
			modifiedBy: 'Modified by',
			general: 'General',
			generalInfo: 'General info',
			all: 'All {entity}',
			upload: 'Upload',
			edit: 'Edit',
			back: 'Back',
			step: 'Step { count }',
			more: 'More',
			read: 'Read',
			create: 'Create',
			update: 'Update',
			draggable: 'Draggable',
			empty: 'Empty',
			unassigned: 'Unassigned',
			showUnassigned: 'Show unassigned',
			group: 'Group',
			dateTime: 'Date & time',
			updatedBy: (/*{ named }*/) => {
				return 'Edited';
			},
			check: 'Check',
		},
		// yak zhe ya zaebalsya povtoriaty odni i ti sami slova!!!!
		vocabulary: {
			apply: 'Apply',
			language: 'Language',
			voice: 'Voice',
			format: 'Format',
			text: 'Text',
			yes: 'Yes',
			no: 'No',
			description: 'Description',
			login: 'Login',
			host: 'Host',
			time: 'Time',
			channel: 'Channel | Channels',
			file: 'File | Files',
			logout: 'Logout',
			priority: 'Priority | Priorities',
			color: 'Color',
			variables: 'Variable | Variables',
			type: 'Type',
			tag: 'Tag | Tags',
			output: 'Output | Outputs',
			values: 'Value | Values',
			keys: 'Key | Keys',
			duration: 'Duration',
			reset: 'Reset',
			errors: 'Error | Errors',
			labels: 'Label | Labels',
			permissions: 'Permission | Permissions',
			options: 'Option | Options',
			emails: 'Email | Emails',
			phones: 'Phone | Phones',
			messaging: 'Messaging',
			emptyResultSearch: 'Your search yielded no results',
			contact: 'Contact | Contacts',
			column: 'Column | Columns',
			notification: 'Notification | Notifications',
			screencast: 'Screen recordings',
			password: 'Password',
			number: 'Number',
			expireAt: 'Expire at',
			destination: 'Destination',
			utilizationProgress: 'Utilization progress',
			settings: 'Settings',
		},
		// date-related texts
		date: {
			sec: 'Sec',
			timezone: 'Time zone | Time zones',
		},
		// locales, related to user access, permissions, etc.
		access: {
			ObAC: 'Managed by operations',
			RbAC: 'Managed by records',
			operations: 'Operations',
			rbacDefault: 'Default Record based Access',
			accessMode: {
				[AccessMode.Forbidden]: 'Forbidden',
				[AccessMode.Allow]: 'Allow',
				[AccessMode.Manage]: 'Allow with delegation',
			},
		},
		// describes Webitel system entities
		objects: {
			team: 'Team | Teams',
			supervisor: 'Supervisor | Supervisors',
			auditor: 'Auditor | Auditors',
			region: 'Region | Regions',
			skill: 'Skill | Skills',
			communicationType: 'Communication type | Communication types',
			grantee: 'Grantee | Grantees',
			grantor: 'Grantor | Grantors',
			role: 'Role | Roles',
			user: 'User | Users',
			list: 'List | Lists',
			contact: 'Contact | Contacts',
			case: 'Case | Cases',
			customLookup: {
				customLookup: 'Custom lookup | Custom lookups',
			},
			calendar: 'Calendar | Calendars',
			direction: 'Direction',
			gateway: 'Gateway | Gateways',
			hangupCause: 'Hangup cause',
			hasOption: 'Has option',
			hasRecording: 'Recording',
			amdResult: 'AMD result',
			ratedBy: 'Rated by',
			talkDuration: 'Talk duration',
			totalDuration: 'Total duration',
			transcription: 'Transcription',
			attachment: 'Attachment | Attachments',
			owner: 'Owner | Owners',
			customization: {
				customization: 'Customization | Customizations',
			},
			chatGateway: 'Chat gateway | Chat gateways',
			chat: {
				chat: 'Chat | Chats',
				draftPlaceholder: 'Write a message...',
			},
			queue: {
				progressiveCount: 'Progressive call count',
				queue: 'Queue | Queues',
				queueType: 'Queue type | Queue types',
				type: {
					[QueueType.INBOUND_QUEUE]: 'Inbound queue',
					[QueueType.OFFLINE_QUEUE]: 'Offline queue',
					[QueueType.OUTBOUND_IVR_QUEUE]: 'Outbound IVR queue',
					[QueueType.PREDICTIVE_DIALER]: 'Predictive dialer',
					[QueueType.PROGRESSIVE_DIALER]: 'Progressive dialer',
					[QueueType.PREVIEW_DIALER]: 'Preview dialer',
					[QueueType.CHAT_INBOUND_QUEUE]: 'Chat queue',
					[QueueType.INBOUND_JOB_QUEUE]: 'Inbound task queue',
					[QueueType.OUTBOUND_JOB_QUEUE]: 'Outbound task queue',
					[QueueType.IM_CHAT_QUEUE]: 'im queue',
				},
			},
			agent: {
				agent: 'Agent | Agents',
				status: {
					[AgentStatus.Online]: 'Online',
					[AgentStatus.Pause]: 'Pause',
					[AgentStatus.Offline]: 'Offline',
					[snakeToCamel(AgentStatus.BreakOut)]: 'Break out',
				},
			},
			bucket: 'Bucket | Buckets',
			joinedAt: 'Joined at',
			leavingAt: 'Leaving at',
			offeringAt: 'Offering at',
			stopCause: {
				stopCause: 'End cause',
				abandoned: 'Abandoned',
				timeout: 'Timeout',
				cancel: 'Cancel',
				success: 'Success',
				failed: 'Failed',
				missed: 'Missed',
				expired: 'Expired',
				canceledByTimeout: 'Canceled by timeout',
			},
			memberPriority: 'Priority',
			attempts: 'Attempts',
			callReportingResult: {
				result: 'Result',
				abandoned: 'Abandoned',
				cancel: 'Cancel',
				success: 'Success',
				failed: 'Failed',
				missed: 'Missed',
				timeout: 'Timeout',
				endless: 'Endless',
				transferred: 'Transferred',
			},
			flow: {
				name: 'Flow schema | Flow schemas',
				type: {
					[EngineRoutingSchemaType.Chat]: 'Chat',
					[EngineRoutingSchemaType.Voice]: 'Voice',
					[EngineRoutingSchemaType.Service]: 'Service',
					[EngineRoutingSchemaType.Processing]: 'Forms',
					[EngineRoutingSchemaType.Default]: 'No type',
				},
			},
			messengers: {
				[ChatGatewayProvider.TELEGRAM_BOT]: 'Telegram Bot',
				[ChatGatewayProvider.TELEGRAM_APP]: 'Telegram App',
				[ChatGatewayProvider.MESSENGER]: 'Meta',
				[ChatGatewayProvider.VIBER]: 'Viber',
				[ChatGatewayProvider.WEBCHAT]: 'Web chat',
				[ChatGatewayProvider.INFOBIP]: 'Infobip',
				[ChatGatewayProvider.CUSTOM]: 'Custom Chat Gateway',
				[ChatGatewayProvider.PORTAL]: 'Portal',
			},
			quickReplies: {
				quickReplies: 'Quick reply | Quick replies',
				quickRepliesEmpty: 'There are no quick replies yet',
			},
			screenRecordings: 'Screen recording | Screen recordings',
			screenshots: 'Screenshot | Screenshots',
			agentPdfs: {
				pdfs: 'PDF | PDFs',
				status: {
					[WebitelMediaExporterExportStatus.Pending]: 'Pending',
					[WebitelMediaExporterExportStatus.Processing]: 'Processing',
					[WebitelMediaExporterExportStatus.Done]: 'Done',
					[WebitelMediaExporterExportStatus.Failed]: 'Error',
				},
			},
			importCSV: 'Import CSV',
			CSV: {
				skipHeaders: 'Skip headers',
				charSet: 'Char set',
				separator: 'Separator',
				CSVColumn: 'CSV column',
				fieldName: 'Field name',
				clearMember: 'Clear member',
			},
		},
		channel: {
			state: {
				[ChannelState.Waiting]: 'Waiting',
				[ChannelState.Distribute]: 'Distribute',
				[ChannelState.Offering]: 'Offering',
				[ChannelState.Answered]: 'Answered',
				[ChannelState.Active]: 'Active',
				[ChannelState.Bridged]: 'Bridged',
				[ChannelState.Hold]: 'Hold',
				[ChannelState.Missed]: 'Missed',
				[snakeToCamel(ChannelState.WrapTime)]: 'Wrap time',
				[ChannelState.Processing]: 'Processing',
				[ChannelState.Transfer]: 'Transfer',
			},
			type: {
				[ChannelType.Call]: 'Call',
				[ChannelType.Email]: 'Email',
				[ChannelType.Chat]: 'Chat',
				[ChannelType.Job]: 'Task',
				[ChannelType.OutCall]: 'Outbound call',
			},
		},
		calls: {
			direction: {
				[CallDirection.Inbound]: 'Inbound',
				[CallDirection.Outbound]: 'Outbound',
			},
			connectionQuality: {
				high: 'Excellent network quality',
				medium: 'Unstable network quality',
				low: 'Poor network quality',
			},
		},
		cases: {
			status: 'Status',
			source: 'Source',
			author: 'Author',
			reporter: 'Reporter',
			impacted: 'Impacted',
			assignee: 'Assignee',
			groupPerformers: 'Group',
			reason: 'Reason | Reasons',
			rating: 'Rating',
			service: 'Service | Services',
			selectAService: 'Select a service',
			appliedSLA: 'Applied SLA',
			appliedCondition: 'Applied condition',
			reactionTime: 'Reaction time',
			resolutionTime: 'Resolution time',
			actualReactionTime: 'Actual reaction time',
			actualResolutionTime: 'Actual resolution time',
		},
		// describes Webitel FRONTEND applications + their navs
		WtApplication: {
			overrideApplicationsAccess: {
				[WtApplication.Crm]: {
					sections: {
						[CrmSectionsNew.CasesExtensions]: ({ linked }) =>
							linked('objects.customization.customization') +
							': ' +
							linked('objects.case'),
						[CrmSectionsNew.ContactsExtensions]: ({ linked }) =>
							linked('objects.customization.customization') +
							': ' +
							linked('objects.contact'),
						[CrmSectionsNew.CustomLookups]: ({ linked }) =>
							linked('objects.customization.customization') +
							': Custom lookups', // dont use linked: objects.customLookup.customLookup, coz "linked" doesnt support pluralization
					},
				},
			},
			[WtApplication.Agent]: {
				name: 'Agent Workspace',
			},
			[WtApplication.Audit]: {
				name: 'Audit',
				sections: {
					[AuditorSections.Scorecards]: 'Scorecards',
				},
			},
			[WtApplication.Crm]: {
				name: 'CRM',
				sections: {
					[CrmSections.Contacts]: 'Contacts',
					[CrmSections.Cases]: 'Cases',
					[CrmSections.Priorities]: 'Priorities',
					[CrmSections.CloseReasonGroups]: 'Closure reasons',
					[CrmSections.Statuses]: 'Statuses',
					[CrmSections.Slas]: 'SLA',
					[CrmSections.ServiceCatalogs]: 'Service catalogs',
					[CrmSections.Sources]: 'Case sources',
					[CrmSections.ContactGroups]: 'Contact groups',
				},
			},
			[WtApplication.History]: {
				name: 'Call History',
			},
			[WtApplication.Analytics]: {
				name: 'Data Visualisation Tool',
			},
			[WtApplication.Supervisor]: {
				name: 'Supervisor Workspace',
				sections: {
					[SupervisorSections.Queues]: 'Queues',
					[SupervisorSections.Agents]: 'Agents',
					[SupervisorSections.ActiveCalls]: 'Active calls',
				},
			},
			[WtApplication.Admin]: {
				name: 'Admin',
				sections: {
					[AdminSections.Users]: 'Users',
					[AdminSections.License]: 'Licenses',
					[AdminSections.Devices]: 'Devices',
					[AdminSections.Flow]: 'Flow schemas',
					[AdminSections.Dialplan]: 'Dialplans',
					[AdminSections.Gateways]: 'Gateways',
					[AdminSections.Chatplan]: 'Chatplans',
					[AdminSections.ChatGateways]: 'Chat gateways',
					[AdminSections.Skills]: 'Agent skills',
					[AdminSections.Buckets]: 'Buckets',
					[AdminSections.Media]: 'Media files',
					[AdminSections.ShiftTemplates]: 'Shift templates',
					[AdminSections.PauseTemplates]: 'Pause templates',
					[AdminSections.WorkingConditions]: 'Working conditions',
					[AdminSections.Blacklist]: 'Lists',
					[AdminSections.Calendars]: 'Calendars',
					[AdminSections.Regions]: 'Locations',
					[AdminSections.Communications]: 'Communication types',
					[AdminSections.PauseCause]: 'Agent statuses',
					[AdminSections.Agents]: 'Agents',
					[AdminSections.Teams]: 'Teams',
					[AdminSections.Resources]: 'Resources',
					[AdminSections.ResourceGroups]: 'Resource groups',
					[AdminSections.Queues]: 'Queues',
					[AdminSections.Storage]: 'Storage',
					[AdminSections.StoragePolicies]: 'Storage policies',
					[AdminSections.CognitiveProfiles]: 'Cognitive profiles',
					[AdminSections.EmailProfiles]: 'Email profiles',
					[AdminSections.SingleSignOn]: 'SSO',
					[AdminSections.ImportCsv]: 'Imports of CSV from file',
					[AdminSections.Triggers]: 'Triggers',
					[AdminSections.Media]: 'Media files',
					[AdminSections.Roles]: 'Roles',
					[AdminSections.Objects]: 'Objects',
					[AdminSections.Changelogs]: 'Change log',
					[AdminSections.Configuration]: 'Configuration',
					[AdminSections.GlobalVariables]: 'Global variables',
					[AdminSections.QuickReplies]: 'Quick replies',
					[AdminSections.ActivityTypes]: 'Activity Types',
				},
			},
			[WtApplication.Wfm]: {
				name: 'WFM',
			},
			[WtApplication.Meet]: {
				theCameraIsTurnedOff: 'The camera is turned off',
				theCallIsOnHold: 'On hold',
			},
		},
		validation: {
			hourRange: 'Hours must be from 00 to 23',
			timerangeStartLessThanEnd: 'Time From cannot be greater than To',
			timerangeNotIntersect: 'Time intervals on the same day cannot overlap',
			required: 'Field is required',
			numeric: 'Should be numeric',
			email: 'Should look like email',
			gatewayHostValidator: 'Should look like IPv4 or FQDN',
			sipAccountValidator: 'Should look like SIP account',
			ipValidator: 'Should look like IPv4',
			macValidator: 'Should look like MAC',
			sameAs: 'Incorrect password',
			requiredArrayValue: 'Array should not be empty',
			minValue: ({ named }) => {
				let text = 'Value cannot be less than';
				if (named('min') != null) {
					text += ` ${named('min')}`;
				}

				return text;
			},
			maxValue: ({ named }) => {
				let text = 'Value cannot be greater than';
				if (named('max') != null) {
					text += ` ${named('max')}`;
				}
				return text;
			},

			minLength: ({ named }) => {
				let text = 'The length should not be less than';
				if (named('min')) {
					text += ` ${named('min')}`;
				}

				return text;
			},
			maxLength: ({ named }) => {
				let text = 'The length should not be greater than';
				if (named('max')) {
					text += ` ${named('max')}`;
				}

				return text;
			},
			url: 'Should look like URL',
			websocketValidator: 'Should look like WebSocket url',
			isRegExpMatched: 'Password must match the regular expression:',
			regExpValidator: 'This regular expression is not valid',
			domainValidator: 'Incorrect domain',
			decimalValidator:
				'Decimal precision should be no more than { count } places',
			latinWithNumber:
				'The code must contain only letters (A-Z, a-z) and numbers (0-9), and must start with a letter',
			integer: 'The field should contain only whole numbers',
			nameAlreadyInUse: 'This name is already in use',
			phoneNumberSymbolsValidator:
				"Number must contain letters (a-z, A-Z), numbers (0-9), and special characters: +, -, _, ., !, ~, *, ', (,)",
			sipPasswordSymbolsValidator:
				'Password cannot contain special symbols and whitespaces',
			loginValidator: () => `Enter login in the format name${'@'}domain`,
		},
		webitelUI: {
			searchBar: {
				placeholder: 'Search',
				settingsHint: 'Search mode',
				variableSearchHint: 'Query format: "key=value"',
			},
			timepicker: {
				day: 'Day:',
				hour: 'Hour:',
				min: 'Min:',
				sec: 'Sec:',
			},
			datetimepicker: {
				lastHour: 'Last hour',
				lastDay: 'Last day',
			},
			pagination: {
				sizeText: 'Rows per page:',
				prev: 'Previous',
				next: 'Next',
			},
			appNavigator: {
				title: 'Webitel applications',
				admin: 'Admin',
				agent: 'Agent',
				supervisor: 'Supervisor',
				audit: 'Audit',
				history: 'History',
				grafana: 'Grafana',
				crm: 'CRM',
			},
			headerActions: {
				account: 'Account',
				docs: 'Docs',
				settings: 'Settings',
				logout: 'Logout',
				buildVersion: 'Build version',
			},
			tableActions: {
				filterReset: 'Reset filters',
				columnSelect: 'Select columns',
				refreshTable: 'Refresh table',
				expandFilters: 'Expand filters',
			},
			tableColumnSelect: {
				title: 'Select visible columns',
			},
			statusSelect: {
				online: 'Online',
				pause: 'Pause',
				offline: 'Offline',
				breakOut: 'Break Out',
			},
			iconAction: {
				hints: {
					[IconAction.DELETE]: ({ linked }) => linked('reusable.delete'),
					[IconAction.EDIT]: ({ linked }) => linked('reusable.edit'),
					[IconAction.ADD]: ({ linked }) => linked('reusable.add'),
					[IconAction.HISTORY]: ({ linked }) => linked('reusable.history'),
					[IconAction.DOWNLOAD]: ({ linked }) => linked('reusable.download'),
					[IconAction.DOWNLOAD_PDF]: 'Download PDF',
					[IconAction.FILTERS]: ({ linked }) => linked('reusable.filter'),
					[IconAction.COLUMNS]: 'Select columns',
					[IconAction.VARIABLES]: 'Select variables columns',
					[IconAction.REFRESH]: ({ linked }) => linked('reusable.refresh'),
					[IconAction.EXPAND]: ({ linked }) => linked('reusable.expand'),
					[IconAction.COLLAPSE]: ({ linked }) => linked('reusable.collapse'),
					[IconAction.CLOSE]: ({ linked }) => linked('reusable.close'),
					[IconAction.CLEAR]: ({ linked }) =>
						linked('webitelUI.tableActions.filterReset'),
					[IconAction.ADD_FILTER]: ({ linked }) => linked('reusable.add'),
					[IconAction.SAVE]: ({ linked }) => linked('reusable.save'),
					[IconAction.CANCEL]: ({ linked }) => linked('reusable.cancel'),
					[IconAction.SAVE_PRESET]: ({ linked }) => {
						return `${linked('reusable.save')} ${linked(
							'webitelUI.filters.presets.preset',
						).toLowerCase()}`;
					},
					[IconAction.APPLY_PRESET]: ({ linked }) => {
						return `${linked('vocabulary.apply')} ${linked(
							'webitelUI.filters.presets.preset',
						).toLowerCase()}`;
					},
					[IconAction.ADD_CONTACT]: ({ linked }) => {
						return `${linked('reusable.add')} contacts`;
					},
					[IconAction.CHAT]: ({ linked }) => linked('objects.chat.chat'),
					[IconAction.SORT]: ({ named }) => {
						const order = named('order');
						if (order === SortSymbols.ASC) return 'Sort ascending';
						if (order === SortSymbols.DESC) return 'Sort descending';
						return 'Sort';
					},
					[IconAction.UPLOAD]: ({ linked }) => linked('reusable.upload'),
					[IconAction.LOGOUT]: 'End sessions',
				},
			},
			errorPages: {
				goBack: 'Go back',
				page403: {
					title: 'Access denied',
					text: 'Sorry, you have not enough privileges to see this page.',
				},
				page404: {
					title: "Looks like you're lost",
					text: "Sorry, we can't find the page you want.",
				},
			},
			copyAction: {
				copy: 'Copy',
				copied: 'Copied to clipboard!',
			},
			auditForm: {
				question: 'Criteria',
				option: 'Option | Options',
				score: 'Score | Scores',
				addQuestion: 'Add criteria',
				answerType: 'Answer type',
				type: {
					options: 'Options',
					score: 'Score',
					yes: 'Select "Yes"',
				},
				criticalViolation: 'Critical violation',
				clearSelection: 'Clear selection',
			},
			deleteConfirmationPopup: {
				title: 'Confirm deletion',
				askingAlert:
					'Are you sure you want to delete {subject}? This action cannot be undone.',
				tableAskingAlert:
					'Are you sure you want\n to delete {count} record? | Are you sure you want\n to delete {count} records?',
				deleteAll: 'ALL',
			},
			dummy: {
				text: 'There are no records yet',
			},
			empty: {
				text: {
					empty: 'There are no records yet',
					filters: 'Unfortunately, no records match your criteria',
				},
			},
			agentStatusSelect: {
				pauseCausePopup: {
					title: 'Select a pause cause',
					min: 'Min',
					unlimited: 'Unlimited',
				},
				statusSelectErrorPopup: {
					title: 'Attention',
					message:
						'The limit for agents to take a pause has been exceeded. The pause is unavailable right now.',
				},
				activityTypePopup: {
					title: 'Please select activity type',
					defaultOption: 'Standard Online',
				},
			},
			pdfGeneration: {
				generationStarted: 'Your PDF file is being created…',
			},
			saveFailedPopup: {
				title: 'Save failed',
				label: 'Something went wrong, please try again',
				exportToJson: 'Export to JSON',
			},
			filters: {
				datetime: {
					[RelativeDatetimeValue.Today]: 'Today',
					[RelativeDatetimeValue.ThisWeek]: 'This week',
					[RelativeDatetimeValue.ThisMonth]: 'This month',
					[RelativeDatetimeValue.Custom]: 'Custom date range',
				},
				andMore: 'and {count} more',
				addFilter: ({ linked }) => {
					return `${linked('reusable.add')} a ${linked(
						'reusable.filter',
					).toLowerCase()}`;
				},
				filterName: ({ linked }) => {
					// because filter select has a 'column' label now
					return linked('vocabulary.column');
				},
				filterValue: ({ linked }) => {
					return linked('vocabulary.values');
				},
				filterValueFrom: ({ linked }) => {
					const from = linked('reusable.from').toLowerCase();
					return `${linked('vocabulary.values')} ${from}`;
				},
				filterLabel: ({ linked }) => {
					return linked('vocabulary.labels');
				},
				actualReactionTime: ({ linked }) => {
					return linked('cases.actualReactionTime');
				},
				actualResolutionTime: ({ linked }) => {
					return linked('cases.actualResolutionTime');
				},
				agent: ({ linked }) => {
					return linked('objects.agent.agent');
				},
				amdResult: ({ linked }) => {
					return linked('objects.amdResult');
				},
				assignee: ({ linked }) => {
					return linked('cases.assignee');
				},
				author: ({ linked }) => {
					return linked('cases.author');
				},
				bucket: ({ linked }) => {
					return linked('objects.bucket');
				},
				cause: ({ linked }) => {
					return linked('objects.hangupCause');
				},
				closeReasonGroups: ({ linked }) => {
					return linked('cases.reason');
				},
				contact: ({ linked }) => {
					return linked('vocabulary.contact');
				},
				contactGroup: ({ linked }) => {
					return linked('cases.groupPerformers');
				},
				createdAt: ({ linked }) => {
					return linked('reusable.createdAt');
				},
				createdAtFrom: ({ linked }) => {
					return linked('reusable.from');
				},
				createdAtTo: ({ linked }) => {
					return linked('reusable.to');
				},
				direction: ({ linked }) => {
					return linked('objects.direction');
				},
				gateway: ({ linked }) => {
					return linked('objects.gateway');
				},
				grantee: ({ linked }) => {
					return linked('objects.grantee');
				},
				hasAttachment: ({ linked }) => {
					return linked('objects.attachment');
				},
				hasFile: ({ linked }) => {
					return linked('objects.hasRecording');
				},
				hasTranscription: ({ linked }) => {
					return linked('objects.transcription');
				},
				hasUser: ({ linked }) => {
					return linked('objects.user');
				},
				joinedAt: ({ linked }) => {
					return linked('objects.joinedAt');
				},
				leavingAt: ({ linked }) => {
					return linked('objects.leavingAt');
				},
				offeringAt: ({ linked }) => {
					return linked('objects.offeringAt');
				},
				stopCause: ({ linked }) => {
					return linked('objects.stopCause.stopCause');
				},
				memberPriority: ({ linked }) => {
					return linked('objects.memberPriority');
				},
				attempts: ({ linked }) => {
					return linked('objects.attempts');
				},
				name: ({ linked }) => {
					return linked('reusable.name');
				},
				destination: ({ linked }) => {
					return linked('vocabulary.destination');
				},
				duration: ({ linked }) => {
					return linked('vocabulary.duration');
				},
				result: ({ linked }) => {
					return linked('objects.callReportingResult.result');
				},
				tags: ({ linked }) => {
					return linked('vocabulary.tag');
				},
				impacted: ({ linked }) => {
					return linked('cases.impacted');
				},
				contactLabel: ({ linked }) => {
					return linked('vocabulary.labels');
				},
				contactOwner: ({ linked }) => {
					return linked('objects.owner');
				},
				priority: ({ linked }) => {
					return linked('vocabulary.priority');
				},
				queue: ({ linked }) => {
					return linked('objects.queue.queue');
				},
				rated: 'Rated',
				ratedBy: ({ linked }) => {
					return linked('objects.ratedBy');
				},
				rating: ({ linked }) => {
					return linked('cases.rating');
				},
				reactionTime: ({ linked }) => {
					return linked('cases.reactionTime');
				},
				reporter: ({ linked }) => {
					return linked('cases.reporter');
				},
				resolutionTime: ({ linked }) => {
					return linked('cases.resolutionTime');
				},
				score: ({ linked }) => {
					return linked('webitelUI.auditForm.score');
				},
				service: ({ linked }) => {
					return linked('cases.service');
				},
				showEmptyAmdResult: 'Show empty',
				sla: ({ linked }) => {
					return linked('cases.appliedSLA');
				},
				slaCondition: ({ linked }) => {
					return linked('cases.appliedCondition');
				},
				source: ({ linked }) => {
					return linked('cases.source');
				},
				status: ({ linked }) => {
					return linked('cases.status');
				},
				tag: ({ linked }) => {
					return linked('vocabulary.tag');
				},
				talkDuration: ({ linked }) => {
					return linked('objects.talkDuration');
				},
				team: ({ linked }) => {
					return linked('objects.team');
				},
				totalDuration: ({ linked }) => {
					return linked('objects.totalDuration');
				},
				user: ({ linked }) => {
					return linked('objects.user');
				},
				variable: ({ linked }) => {
					return linked('vocabulary.variables');
				},
				queueType: ({ linked }) => {
					return linked('objects.queue.queueType');
				},
				queuePeriod: ({ linked }) => {
					return linked('vocabulary.time');
				},
				agentStatus: ({ linked }) => {
					return linked('cases.status');
				},
				auditor: ({ linked }) => {
					return linked('objects.auditor');
				},
				skill: ({ linked }) => {
					return linked('objects.skill');
				},
				supervisor: ({ linked }) => {
					return linked('objects.supervisor');
				},
				utilizationProgress: ({ linked }) => {
					return linked('vocabulary.utilizationProgress');
				},
				region: ({ linked }) => {
					return linked('objects.region');
				},
				presets: {
					preset: 'Preset | Presets',
					overwritePresetTitle: 'A preset with this name already exists.',
					overwritePresetText: 'Do you want to replace it?',
					notifications: {
						success: {
							/* suka ebuchij linked(,param) ne praciuje */
							update: ({ linked }) => {
								return linked('systemNotifications.success.update', {
									entity: linked('filters.presets.preset'),
								});
							},
							create: ({ linked }) => {
								return linked('systemNotifications.success.create', {
									entity: linked('filters.presets.preset'),
								});
							},
							delete: ({ linked }) => {
								return linked('systemNotifications.success.delete', {
									entity: linked('filters.presets.preset'),
								});
							},
						},
					},
				},
			},
			select: {
				selectedItemsLabel: 'items selected',
			},
		},
		systemNotifications: {
			success: {
				update: ({ named }) =>
					`The ${named('entity').toLowerCase()} was updated`,
				create: ({ named }) => `The ${named('entity').toLowerCase()} was saved`,
				delete: ({ named }) =>
					`The ${named('entity').toLowerCase()} was deleted`,
			},
			warnings: {
				passwordExpirationMessageDays:
					'Your password will expire in {amount} days',
				passwordExpirationMessageHours:
					'Your password will expire in less than {amount} hours',
				licenseExpirationSoonMessage:
					'Your license {name} will expire in {amount} days',
				licenseExpirationMessage: 'Your license {name} has expired',
			},
		},
		errorNotifications: {
			websocketDisconnect: 'WebSocket connection lost. Please reload the page.',
			chatHistoryApi: 'There was an error loading the chat history',
			markChatProcessed: 'Failed to move the chat to “Closed”',
		},
		connectionQuality: {
			high: 'Excellent network quality.',
			medium: 'There might be some delay, please check your network.',
			low: 'Network quality is poor, please check your network.',
		},
	},
	notTranslatable,
);