mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-11-16 23:04:24 +08:00
feat(i18n): add Russian UI and harden localization
This commit is contained in:
@@ -92,7 +92,7 @@ function sourceLabel(
|
||||
) {
|
||||
const key = SOURCE_LABEL_KEYS[type];
|
||||
if (key) return t(key);
|
||||
return type === 'remote_url' ? 'Remote URL' : 'GitHub';
|
||||
return type === 'remote_url' ? t('history.source.remote_url') : 'GitHub';
|
||||
}
|
||||
|
||||
function deploymentSnapshot(
|
||||
@@ -230,6 +230,8 @@ export function DeploymentHistory({
|
||||
rootDir = '',
|
||||
entryFile = 'index.html',
|
||||
}: DeploymentHistoryProps) {
|
||||
const uiText = useTranslations('runtime');
|
||||
|
||||
const t = useTranslations('pages');
|
||||
const tCommon = useTranslations('common');
|
||||
const queryClient = useQueryClient();
|
||||
@@ -401,7 +403,7 @@ export function DeploymentHistory({
|
||||
<div className='flex flex-col gap-6'>
|
||||
<Card className='border-dashed shadow-none'>
|
||||
<CardHeader className='pb-3'>
|
||||
<CardTitle className='text-base'>Production</CardTitle>
|
||||
<CardTitle className='text-base'>{uiText('ui_production')}</CardTitle>
|
||||
<CardDescription>{t('history.productionHint')}</CardDescription>
|
||||
<CardAction>
|
||||
<Button
|
||||
@@ -440,7 +442,9 @@ export function DeploymentHistory({
|
||||
|
||||
<Card className='border-dashed shadow-none'>
|
||||
<CardHeader className='pb-3'>
|
||||
<CardTitle className='text-base'>All deployments</CardTitle>
|
||||
<CardTitle className='text-base'>
|
||||
{uiText('ui_allDeployments')}
|
||||
</CardTitle>
|
||||
<CardDescription>{t('history.historyHint')}</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className='space-y-3'>
|
||||
|
||||
@@ -94,6 +94,8 @@ export function PagesSourceDialog({
|
||||
initialMode,
|
||||
onActionDispatched,
|
||||
}: PagesSourceDialogProps) {
|
||||
const uiText = useTranslations('runtime');
|
||||
|
||||
const t = useTranslations('pages.source');
|
||||
const tCommon = useTranslations('common');
|
||||
const queryClient = useQueryClient();
|
||||
@@ -361,10 +363,10 @@ export function PagesSourceDialog({
|
||||
{t('manual')}
|
||||
</ToggleGroupItem>
|
||||
<ToggleGroupItem value='remote_url' className='w-full'>
|
||||
Remote URL
|
||||
{uiText('ui_remoteUrl')}
|
||||
</ToggleGroupItem>
|
||||
<ToggleGroupItem value='github_release' className='w-full'>
|
||||
GitHub Release
|
||||
{uiText('ui_githubRelease')}
|
||||
</ToggleGroupItem>
|
||||
</ToggleGroup>
|
||||
</Field>
|
||||
@@ -379,7 +381,9 @@ export function PagesSourceDialog({
|
||||
) : mode === 'remote_url' ? (
|
||||
<>
|
||||
<Field data-invalid={Boolean(urlError)}>
|
||||
<FieldLabel htmlFor='pages-remote-url'>Remote URL</FieldLabel>
|
||||
<FieldLabel htmlFor='pages-remote-url'>
|
||||
{uiText('ui_remoteUrl')}
|
||||
</FieldLabel>
|
||||
<Input
|
||||
id='pages-remote-url'
|
||||
type='url'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
'use client';
|
||||
|
||||
import { useTranslations } from 'next-intl';
|
||||
|
||||
import {
|
||||
@@ -44,6 +46,8 @@ export function PagesSourceGitHubFields({
|
||||
onChange,
|
||||
onErrorsChange,
|
||||
}: PagesSourceGitHubFieldsProps) {
|
||||
const uiText = useTranslations('runtime');
|
||||
|
||||
const t = useTranslations('pages.source');
|
||||
return (
|
||||
<>
|
||||
@@ -107,7 +111,9 @@ export function PagesSourceGitHubFields({
|
||||
|
||||
{value.releaseSelector === 'tag' ? (
|
||||
<Field data-invalid={Boolean(errors.releaseTag)}>
|
||||
<FieldLabel htmlFor='pages-github-tag'>Release tag</FieldLabel>
|
||||
<FieldLabel htmlFor='pages-github-tag'>
|
||||
{uiText('ui_releaseTag')}
|
||||
</FieldLabel>
|
||||
<Input
|
||||
id='pages-github-tag'
|
||||
placeholder='v1.2.3'
|
||||
|
||||
Reference in New Issue
Block a user