fix: Enable Lingui recommended rules and fix all translation violations (#14133)
- Enable lingui/no-single-variables-to-translate and all other
recommended Lingui rules
- Fix single variable translation patterns (t`${variable}` → variable)
- Fix expression-in-message violations by extracting variables
- Fix t-call-in-function violations by moving translations inside
functions
- Update ESLint configs to use linguiPlugin.configs['flat/recommended']
- Clean up unused imports and improve translation patterns
This commit is contained in:
+2
-3
@@ -7,7 +7,6 @@ import { recordStoreFamilyState } from '@/object-record/record-store/states/reco
|
||||
import { useRecoilComponentValue } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValue';
|
||||
import { useActiveWorkflowVersionsWithManualTrigger } from '@/workflow/hooks/useActiveWorkflowVersionsWithManualTrigger';
|
||||
import { useRunWorkflowVersion } from '@/workflow/hooks/useRunWorkflowVersion';
|
||||
import { msg } from '@lingui/core/macro';
|
||||
|
||||
import { type WorkflowVersion } from '@/workflow/types/Workflow';
|
||||
import { COMMAND_MENU_DEFAULT_ICON } from '@/workflow/workflow-trigger/constants/CommandMenuDefaultIcon';
|
||||
@@ -81,8 +80,8 @@ export const useRunWorkflowRecordActions = ({
|
||||
type: ActionType.WorkflowRun,
|
||||
key: `workflow-run-${activeWorkflowVersion.id}`,
|
||||
scope: ActionScope.RecordSelection,
|
||||
label: msg`${name}`,
|
||||
shortLabel: msg`${name}`,
|
||||
label: name,
|
||||
shortLabel: name,
|
||||
position: index,
|
||||
Icon,
|
||||
isPinned: activeWorkflowVersion.trigger?.settings?.isPinned,
|
||||
|
||||
+2
-3
@@ -4,11 +4,10 @@ import { ActionType } from '@/action-menu/actions/types/ActionType';
|
||||
import { ActionMenuContext } from '@/action-menu/contexts/ActionMenuContext';
|
||||
import { useActiveWorkflowVersionsWithManualTrigger } from '@/workflow/hooks/useActiveWorkflowVersionsWithManualTrigger';
|
||||
import { useRunWorkflowVersion } from '@/workflow/hooks/useRunWorkflowVersion';
|
||||
import { msg } from '@lingui/core/macro';
|
||||
import { COMMAND_MENU_DEFAULT_ICON } from '@/workflow/workflow-trigger/constants/CommandMenuDefaultIcon';
|
||||
import { useContext } from 'react';
|
||||
import { capitalize, isDefined } from 'twenty-shared/utils';
|
||||
import { useIcons } from 'twenty-ui/display';
|
||||
import { COMMAND_MENU_DEFAULT_ICON } from '@/workflow/workflow-trigger/constants/CommandMenuDefaultIcon';
|
||||
|
||||
export const useRunWorkflowRecordAgnosticActions = () => {
|
||||
const { getIcon } = useIcons();
|
||||
@@ -41,7 +40,7 @@ export const useRunWorkflowRecordAgnosticActions = () => {
|
||||
type: ActionType.WorkflowRun,
|
||||
key: `workflow-run-${activeWorkflowVersion.id}`,
|
||||
scope: ActionScope.Global,
|
||||
label: msg`${name}`,
|
||||
label: name,
|
||||
position: index,
|
||||
Icon,
|
||||
shouldBeRegistered: () => true,
|
||||
|
||||
Reference in New Issue
Block a user