feat(localization): Add en/vi language

This commit is contained in:
Tran Anh Tuan
2025-11-20 16:21:17 +07:00
parent dea435a4ec
commit 216e865ca5
37 changed files with 2356 additions and 455 deletions

View File

@@ -4,21 +4,21 @@ import { history, RequestConfig } from '@umijs/max';
import { message } from 'antd';
// Error handling scheme: Error types
enum ErrorShowType {
SILENT = 0,
WARN_MESSAGE = 1,
ERROR_MESSAGE = 2,
NOTIFICATION = 3,
REDIRECT = 9,
}
// enum ErrorShowType {
// SILENT = 0,
// WARN_MESSAGE = 1,
// ERROR_MESSAGE = 2,
// NOTIFICATION = 3,
// REDIRECT = 9,
// }
// Response data structure agreed with the backend
interface ResponseStructure<T = any> {
success: boolean;
data: T;
errorCode?: number;
errorMessage?: string;
showType?: ErrorShowType;
}
// interface ResponseStructure<T = any> {
// success: boolean;
// data: T;
// errorCode?: number;
// errorMessage?: string;
// showType?: ErrorShowType;
// }
const codeMessage = {
200: 'The server successfully returned the requested data。',