1088f7bbab
## Summary
This PR adds the `lingui/no-unlocalized-strings` ESLint rule to detect
untranslated strings and fixes translation issues across multiple
components.
## Changes
### ESLint Configuration (`eslint.config.react.mjs`)
- Added comprehensive `ignore` patterns for non-translatable strings
(CSS values, HTML attributes, technical identifiers)
- Added `ignoreNames` for props that don't need translation (className,
data-*, aria-*, etc.)
- Added `ignoreFunctions` for console methods, URL APIs, and other
non-user-facing functions
- Disabled rule for debug files, storybook, and test files
### Components Fixed (~19 files)
- Object record components (field inputs, pickers, merge dialogs)
- Settings components (accounts, admin panel)
- Serverless function components
- Record table and title cell components
## Status
🚧 **Work in Progress** - ~124 files remaining to fix
This PR is being submitted as draft to allow progressive fixing of
remaining translation issues.
## Testing
- Run `npx eslint "src/**/*.tsx"` in `packages/twenty-front` to check
remaining issues
63 lines
1.9 KiB
TypeScript
63 lines
1.9 KiB
TypeScript
import { Dropdown } from '@/ui/layout/dropdown/components/Dropdown';
|
|
import { DropdownContent } from '@/ui/layout/dropdown/components/DropdownContent';
|
|
import { DropdownMenuItemsContainer } from '@/ui/layout/dropdown/components/DropdownMenuItemsContainer';
|
|
import { GenericDropdownContentWidth } from '@/ui/layout/dropdown/constants/GenericDropdownContentWidth';
|
|
import { useLingui } from '@lingui/react/macro';
|
|
import { IconDotsVertical, IconPencil, IconTrash } from 'twenty-ui/display';
|
|
import { LightIconButton } from 'twenty-ui/input';
|
|
import { MenuItem } from 'twenty-ui/navigation';
|
|
|
|
type FavoriteFolderNavigationDrawerItemDropdownProps = {
|
|
folderId: string;
|
|
onRename: () => void;
|
|
onDelete: () => void;
|
|
closeDropdown: () => void;
|
|
};
|
|
|
|
export const FavoriteFolderNavigationDrawerItemDropdown = ({
|
|
folderId,
|
|
onRename,
|
|
onDelete,
|
|
closeDropdown,
|
|
}: FavoriteFolderNavigationDrawerItemDropdownProps) => {
|
|
const { t } = useLingui();
|
|
const handleRename = () => {
|
|
closeDropdown();
|
|
onRename();
|
|
};
|
|
|
|
const handleDelete = () => {
|
|
closeDropdown();
|
|
onDelete();
|
|
};
|
|
|
|
return (
|
|
<Dropdown
|
|
dropdownId={`favorite-folder-edit-${folderId}`}
|
|
data-select-disable
|
|
clickableComponent={
|
|
<LightIconButton Icon={IconDotsVertical} accent="tertiary" />
|
|
}
|
|
dropdownPlacement="bottom-start"
|
|
dropdownComponents={
|
|
<DropdownContent widthInPixels={GenericDropdownContentWidth.Narrow}>
|
|
<DropdownMenuItemsContainer>
|
|
<MenuItem
|
|
LeftIcon={IconPencil}
|
|
onClick={handleRename}
|
|
accent="default"
|
|
text={t`Rename`}
|
|
/>
|
|
<MenuItem
|
|
LeftIcon={IconTrash}
|
|
onClick={handleDelete}
|
|
accent="danger"
|
|
text={t`Delete`}
|
|
/>
|
|
</DropdownMenuItemsContainer>
|
|
</DropdownContent>
|
|
}
|
|
/>
|
|
);
|
|
};
|