feat(i18n): add Russian UI and harden localization

This commit is contained in:
Arthur Koba
2026-10-25 22:35:32 +03:00
parent 65a96670d5
commit b4e94076c9
115 changed files with 7767 additions and 993 deletions
+17 -6
View File
@@ -1,3 +1,6 @@
'use client';
import { useTranslations } from 'next-intl';
import * as React from 'react';
import {
ChevronLeftIcon,
@@ -9,10 +12,12 @@ import { cn } from '@/lib/utils';
import { buttonVariants, type Button } from '@/components/ui/button';
function Pagination({ className, ...props }: React.ComponentProps<'nav'>) {
const uiText = useTranslations('runtime');
return (
<nav
role='navigation'
aria-label='pagination'
aria-label={uiText('ui_pagination')}
data-slot='pagination'
className={cn('mx-auto flex w-full justify-center', className)}
{...props}
@@ -69,15 +74,17 @@ function PaginationPrevious({
className,
...props
}: React.ComponentProps<typeof PaginationLink>) {
const uiText = useTranslations('runtime');
return (
<PaginationLink
aria-label='Go to previous page'
aria-label={uiText('ui_previousPage')}
size='default'
className={cn('gap-1 px-2.5 sm:pl-2.5', className)}
{...props}
>
<ChevronLeftIcon />
<span className='hidden sm:block'>Previous</span>
<span className='hidden sm:block'>{uiText('ui_previousLabel')}</span>
</PaginationLink>
);
}
@@ -86,14 +93,16 @@ function PaginationNext({
className,
...props
}: React.ComponentProps<typeof PaginationLink>) {
const uiText = useTranslations('runtime');
return (
<PaginationLink
aria-label='Go to next page'
aria-label={uiText('ui_nextPage')}
size='default'
className={cn('gap-1 px-2.5 sm:pr-2.5', className)}
{...props}
>
<span className='hidden sm:block'>Next</span>
<span className='hidden sm:block'>{uiText('ui_nextLabel')}</span>
<ChevronRightIcon />
</PaginationLink>
);
@@ -103,6 +112,8 @@ function PaginationEllipsis({
className,
...props
}: React.ComponentProps<'span'>) {
const uiText = useTranslations('runtime');
return (
<span
aria-hidden
@@ -111,7 +122,7 @@ function PaginationEllipsis({
{...props}
>
<MoreHorizontalIcon className='size-4' />
<span className='sr-only'>More pages</span>
<span className='sr-only'>{uiText('ui_morePages')}</span>
</span>
);
}