shadcn primitives and logos keyed: dialog, sheet, pagination, carousel, breadcrumb, theme toggles

These are the strings a user meets everywhere, mostly sr-only: the dialog and
sheet close buttons, pagination labels, carousel arrows, the breadcrumb ellipsis
and both colour-mode toggles. nav aria-label='pagination' became a real key too —
a screen reader announces it, so it is user-facing.

Logo alt text keeps the product name and translates only around it
('Logótipo Officer'). Arrow-button insets became logical (-start-12/-end-12).

The three 'useX must be used within <Y>' Errors are deliberately untouched:
never-translate, per the doc's list.
This commit is contained in:
2026-08-23 04:10:39 +00:00
parent 5ce1a2928e
commit 2ec3f11cdd
9 changed files with 126 additions and 95 deletions
+3 -1
View File
@@ -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',
)}
/>
<span className="sr-only">Toggle color mode</span>
<span className="sr-only">{t('theme.toggle')}</span>
</div>
);
};