diff --git a/src/workspaces/components/Logos/DevSvgLogo.tsx b/src/workspaces/components/Logos/DevSvgLogo.tsx index 5ae86fff..afad3f5e 100644 --- a/src/workspaces/components/Logos/DevSvgLogo.tsx +++ b/src/workspaces/components/Logos/DevSvgLogo.tsx @@ -1,17 +1,14 @@ +import { useTranslation } from '@/components/locales'; + type SvgLogoProps = { size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'; }; export function OfficerIconLogo({ size = 'xl' }: SvgLogoProps) { + const { t } = useTranslation(); const config = sizeConfig[size]; - return ( - Officer Icon - ); + return {t('logo.icon')}; } const sizeConfig = { diff --git a/src/workspaces/components/Logos/PastilhasSvgLogo.tsx b/src/workspaces/components/Logos/PastilhasSvgLogo.tsx index d1080bc6..15020a69 100644 --- a/src/workspaces/components/Logos/PastilhasSvgLogo.tsx +++ b/src/workspaces/components/Logos/PastilhasSvgLogo.tsx @@ -1,3 +1,5 @@ +import { useTranslation } from '@/components/locales'; + type SvgLogoProps = { size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'; square?: boolean; @@ -12,27 +14,17 @@ export function OfficerSvgLogo({ size = 'xl', square = false }: SvgLogoProps) { } export function OfficerSvgLogoRegular({ size = 'xl' }: SvgLogoProps) { + const { t } = useTranslation(); const config = sizeConfig.regular[size]; - return ( - Officer Logo - ); + return {t('logo.logo')}; } export function OfficerSvgLogoSquare({ size = 'xl' }: SvgLogoProps) { + const { t } = useTranslation(); const config = sizeConfig.square[size]; - return ( - Officer Logo - ); + return {t('logo.logo')}; } const sizeConfig = { diff --git a/src/workspaces/components/ui/ThemeToggle.tsx b/src/workspaces/components/ui/ThemeToggle.tsx index 4604fa0e..a25adc5c 100644 --- a/src/workspaces/components/ui/ThemeToggle.tsx +++ b/src/workspaces/components/ui/ThemeToggle.tsx @@ -1,12 +1,14 @@ import { Moon, Sun } from 'lucide-react'; import { cn } from 'helpers/cn'; import { useColorMode } from './ThemeProvider'; +import { useTranslation } from '@/components/locales'; type ThemeToggleProps = { colorDark?: boolean; colorLight?: boolean }; export const ThemeToggle = (props: ThemeToggleProps) => { const { colorDark, colorLight } = props; const { colorMode, setColorMode } = useColorMode(); + const { t } = useTranslation(); const toggle = () => { setColorMode(colorMode === 'dark' ? 'light' : 'dark'); @@ -26,7 +28,7 @@ export const ThemeToggle = (props: ThemeToggleProps) => { colorDark && 'text-black', )} /> - Toggle color mode + {t('theme.toggle')} ); }; diff --git a/src/workspaces/components/ui/breadcrumb.tsx b/src/workspaces/components/ui/breadcrumb.tsx index 630b787c..9e30f1b5 100644 --- a/src/workspaces/components/ui/breadcrumb.tsx +++ b/src/workspaces/components/ui/breadcrumb.tsx @@ -3,6 +3,7 @@ import { Slot } from '@radix-ui/react-slot'; import { ChevronRight, MoreHorizontal } from 'lucide-react'; import { cn } from '@/lib/utils'; +import { useTranslation } from '@/components/locales'; const Breadcrumb = React.forwardRef< HTMLElement, @@ -66,17 +67,20 @@ const BreadcrumbSeparator = ({ children, className, ...props }: React.ComponentP ); BreadcrumbSeparator.displayName = 'BreadcrumbSeparator'; -const BreadcrumbEllipsis = ({ className, ...props }: React.ComponentProps<'span'>) => ( - -); +const BreadcrumbEllipsis = ({ className, ...props }: React.ComponentProps<'span'>) => { + const { t } = useTranslation(); + return ( + + ); +}; BreadcrumbEllipsis.displayName = 'BreadcrumbElipssis'; export { diff --git a/src/workspaces/components/ui/carousel.tsx b/src/workspaces/components/ui/carousel.tsx index 8719062e..b27e2c6d 100644 --- a/src/workspaces/components/ui/carousel.tsx +++ b/src/workspaces/components/ui/carousel.tsx @@ -4,6 +4,7 @@ import { ArrowLeft, ArrowRight } from 'lucide-react'; import { cn } from '@/lib/utils'; import { Button } from '@/components/ui/button'; +import { useTranslation } from '@/components/locales'; type CarouselApi = UseEmblaCarouselType[1]; type UseCarouselParameters = Parameters; @@ -168,6 +169,7 @@ CarouselItem.displayName = 'CarouselItem'; const CarouselPrevious = React.forwardRef>( ({ className, variant = 'outline', size = 'icon', ...props }, ref) => { const { orientation, scrollPrev, canScrollPrev } = useCarousel(); + const { t } = useTranslation(); return ( ); }, @@ -196,6 +198,7 @@ CarouselPrevious.displayName = 'CarouselPrevious'; const CarouselNext = React.forwardRef>( ({ className, variant = 'outline', size = 'icon', ...props }, ref) => { const { orientation, scrollNext, canScrollNext } = useCarousel(); + const { t } = useTranslation(); return ( ); }, diff --git a/src/workspaces/components/ui/dialog.tsx b/src/workspaces/components/ui/dialog.tsx index 40475617..9c224d7d 100644 --- a/src/workspaces/components/ui/dialog.tsx +++ b/src/workspaces/components/ui/dialog.tsx @@ -3,6 +3,7 @@ import * as DialogPrimitive from '@radix-ui/react-dialog'; import { X } from 'lucide-react'; import { cn } from '@/lib/utils'; +import { useTranslation } from '@/components/locales'; const Dialog = DialogPrimitive.Root; @@ -30,25 +31,28 @@ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName; const DialogContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef ->(({ className, children, ...props }, ref) => ( - - - - {children} - - - Close - - - -)); +>(({ className, children, ...props }, ref) => { + const { t } = useTranslation(); + return ( + + + + {children} + + + {t('button.close')} + + + + ); +}); DialogContent.displayName = DialogPrimitive.Content.displayName; const DialogHeader = ({ className, ...props }: React.HTMLAttributes) => ( diff --git a/src/workspaces/components/ui/mode-toggle.tsx b/src/workspaces/components/ui/mode-toggle.tsx index 0f5042ba..e8bfa07a 100644 --- a/src/workspaces/components/ui/mode-toggle.tsx +++ b/src/workspaces/components/ui/mode-toggle.tsx @@ -3,10 +3,12 @@ import { Moon, Sun } from 'lucide-react'; import { Button } from '@/components/ui/button'; import { useColorMode } from '@/components/ui/ThemeProvider'; import { cn } from 'helpers/cn'; +import { useTranslation } from '@/components/locales'; export const ModeToggle = React.forwardRef, React.ComponentProps>( ({ className, ...props }, ref) => { const { colorMode, setColorMode } = useColorMode(); + const { t } = useTranslation(); return ( ); }, diff --git a/src/workspaces/components/ui/pagination.tsx b/src/workspaces/components/ui/pagination.tsx index 191b36ac..96d61b5b 100644 --- a/src/workspaces/components/ui/pagination.tsx +++ b/src/workspaces/components/ui/pagination.tsx @@ -4,15 +4,19 @@ import { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-react'; import { cn } from '@/lib/utils'; import type { ButtonProps } from '@/components/ui/button'; import { buttonVariants } from '@/components/ui/button'; +import { useTranslation } from '@/components/locales'; -const Pagination = ({ className, ...props }: React.ComponentProps<'nav'>) => ( -