feat(i18n): migrate all hardcoded Russian text to i18n

- Replace all hardcoded Russian strings with t() calls across 30+ files
- Add ~500 new translation keys to all 4 locales (ru, en, zh, fa)
- Convert module-level config objects to labelKey pattern
- Remove Russian fallbacks from t() calls (fallbackLng handles it)
- Replace DeepLinkRedirect custom i18n with standard t() calls
- Fix subscription.servers key collision (string vs object)
This commit is contained in:
c0mrade
2026-01-27 22:19:41 +03:00
parent d837f8050c
commit 9707ad97a4
34 changed files with 5275 additions and 1075 deletions

View File

@@ -189,7 +189,7 @@ export default function Support() {
file,
preview: '',
uploading: false,
error: t('support.invalidFileType') || 'Invalid file type. Use JPEG, PNG, GIF, or WebP.',
error: t('support.invalidFileType'),
});
return;
}
@@ -200,7 +200,7 @@ export default function Support() {
file,
preview: '',
uploading: false,
error: t('support.fileTooLarge') || 'File is too large. Maximum size is 10MB.',
error: t('support.fileTooLarge'),
});
return;
}
@@ -222,7 +222,7 @@ export default function Support() {
file,
preview,
uploading: false,
error: t('support.uploadFailed') || 'Failed to upload image',
error: t('support.uploadFailed'),
});
}
};
@@ -551,10 +551,7 @@ export default function Support() {
// Rate limit: max 3 tickets per 60 seconds
if (!checkRateLimit(RATE_LIMIT_KEYS.TICKET_CREATE, 3, 60000)) {
const resetTime = getRateLimitResetTime(RATE_LIMIT_KEYS.TICKET_CREATE);
setRateLimitError(
t('support.tooManyRequests', { seconds: resetTime }) ||
`Слишком много запросов. Подождите ${resetTime} сек.`,
);
setRateLimitError(t('support.tooManyRequests', { seconds: resetTime }));
return;
}
createMutation.mutate();
@@ -716,10 +713,7 @@ export default function Support() {
// Rate limit: max 5 replies per 30 seconds
if (!checkRateLimit(RATE_LIMIT_KEYS.TICKET_REPLY, 5, 30000)) {
const resetTime = getRateLimitResetTime(RATE_LIMIT_KEYS.TICKET_REPLY);
setRateLimitError(
t('support.tooManyRequests', { seconds: resetTime }) ||
`Слишком много запросов. Подождите ${resetTime} сек.`,
);
setRateLimitError(t('support.tooManyRequests', { seconds: resetTime }));
return;
}
replyMutation.mutate();