1 /******************************************************************************
4 * Copyright (c) 2020, longpanda <admin@ventoy.net>
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 3 of the
9 * License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <http://www.gnu.org/licenses/>.
21 #ifndef __LANGUAGE_H__
22 #define __LANGUAGE_H__
30 STR_INCORRECT_DIR
, //3
31 STR_INCORRECT_TREE_DIR
, //4
44 STR_INSTALL_SUCCESS
,//14
45 STR_INSTALL_FAILED
,//15
46 STR_UPDATE_SUCCESS
,//16
47 STR_UPDATE_FAILED
,//17
52 STR_MENU_SECURE_BOOT
,//20
54 STR_MENU_PART_CFG
,//21
57 STR_PRESERVE_SPACE
,//24
58 STR_SPACE_VAL_INVALID
,//25
61 STR_CLEAR_SUCCESS
, //27
62 STR_CLEAR_FAILED
, //28
63 STR_MENU_PART_STYLE
, //29
64 STR_DISK_2TB_MBR_ERROR
,//30
66 STR_SHOW_ALL_DEV
, //31
67 STR_PART_ALIGN_4KB
, //32
68 STR_WEB_COMMUNICATION_ERR
, //33
69 STR_WEB_REMOTE_ABNORMAL
, //34
70 STR_WEB_REQUEST_TIMEOUT
, //35
71 STR_WEB_SERVICE_UNAVAILABLE
, //36
72 STR_WEB_TOKEN_MISMATCH
, //37
73 STR_WEB_SERVICE_BUSY
, //38
75 STR_MENU_VTSI_CREATE
, //39
76 STR_VTSI_CREATE_TIP
, //40
77 STR_VTSI_CREATE_SUCCESS
, //41
78 STR_VTSI_CREATE_FAILED
, //42
80 STR_MENU_PART_RESIZE
,//43
81 STR_PART_RESIZE_TIP
,//44
82 STR_PART_RESIZE_SUCCESS
,//45
83 STR_PART_RESIZE_FAILED
,//46
84 STR_PART_RESIZE_UNSUPPORTED
,//47
86 STR_INSTALL_YES_TIP1
,//48
87 STR_INSTALL_YES_TIP2
,//49
89 STR_PART_VENTOY_FS
, //50
92 STR_PART_CLUSTER
, //52
93 STR_PART_CLUSTER_DEFAULT
, //53
100 extern BOOL g_SecureBoot
;
102 #define VTOY_MENU_SECURE_BOOT 0xA000
103 #define VTOY_MENU_PART_CFG 0xA001
104 #define VTOY_MENU_CLEAN 0xA002
105 #define VTOY_MENU_PART_STYLE 0xA003
106 #define VTOY_MENU_PART_MBR 0xA004
107 #define VTOY_MENU_PART_GPT 0xA005
108 #define VTOY_MENU_ALL_DEV 0xA006
109 #define VTOY_MENU_VTSI 0xA007
110 #define VTOY_MENU_PART_RESIZE 0xA008
113 typedef enum OPT_SUBMENU
115 OPT_SUBMENU_SECURE_BOOT
= 0,
116 OPT_SUBMENU_PART_STYLE
,
117 OPT_SUBMENU_PART_CFG
,
121 OPT_SUBMENU_PART_RESIZE
,
127 #define VTOY_MENU_LANGUAGE_BEGIN 0xB000
130 #define VENTOY_LANGUAGE_INI TEXT(".\\ventoy\\languages.ini")
131 #define VENTOY_LANGUAGE_JSON TEXT(".\\ventoy\\languages.json")
132 #define VENTOY_LANGUAGE_INI_A ".\\ventoy\\languages.ini"
133 #define VENTOY_LANGUAGE_JSON_A ".\\ventoy\\languages.json"
135 #define VENTOY_CFG_INI TEXT(".\\Ventoy2Disk.ini")
136 #define VENTOY_CFG_INI_A ".\\Ventoy2Disk.ini"
137 #define VENTOY_MAX_LANGUAGE 200
139 #define GET_INI_STRING(Section, Key, Buf) GetPrivateProfileString(Section, Key, TEXT("#"), Buf, sizeof(Buf), VENTOY_LANGUAGE_INI)
143 typedef struct VENTOY_LANGUAGE
146 WCHAR FontFamily
[128];
149 WCHAR StrId
[STR_ID_MAX
][64];
150 WCHAR MsgString
[STR_ID_MAX
][1024];
154 extern VENTOY_LANGUAGE
*g_cur_lang_data
;
156 const TCHAR
* GetString(enum STR_ID ID
);
158 #define _G(a) GetString(a)