Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dadigang
Ventoy
Commits
e0132ac4
Commit
e0132ac4
authored
Jan 10, 2023
by
longpanda
Browse files
switch to en_US when use text mode.
parent
2b3192b0
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
2 deletions
+39
-2
GRUB2/MOD_SRC/grub-2.04/grub-core/normal/menu.c
GRUB2/MOD_SRC/grub-2.04/grub-core/normal/menu.c
+2
-2
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c
+2
-0
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_def.h
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_def.h
+2
-0
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_plugin.c
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_plugin.c
+31
-0
INSTALL/grub/debug.cfg
INSTALL/grub/debug.cfg
+2
-0
No files found.
GRUB2/MOD_SRC/grub-2.04/grub-core/normal/menu.c
View file @
e0132ac4
...
@@ -951,12 +951,12 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
...
@@ -951,12 +951,12 @@ run_menu (grub_menu_t menu, int nested, int *auto_boot)
menu_fini
();
menu_fini
();
if
(
g_ventoy_terminal_output
==
0
)
if
(
g_ventoy_terminal_output
==
0
)
{
{
grub_script_execute_sourcecode
(
"terminal_output console"
);
grub_script_execute_sourcecode
(
"
vt_push_menu_lang en_US
\n
terminal_output console"
);
g_ventoy_terminal_output
=
1
;
g_ventoy_terminal_output
=
1
;
}
}
else
else
{
{
grub_script_execute_sourcecode
(
"terminal_output gfxterm"
);
grub_script_execute_sourcecode
(
"terminal_output gfxterm
\n
vt_pop_menu_lang
"
);
g_ventoy_terminal_output
=
0
;
g_ventoy_terminal_output
=
0
;
}
}
goto
refresh
;
goto
refresh
;
...
...
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c
View file @
e0132ac4
...
@@ -6951,6 +6951,8 @@ static cmd_para ventoy_cmds[] =
...
@@ -6951,6 +6951,8 @@ static cmd_para ventoy_cmds[] =
{
"vt_cur_menu_lang"
,
ventoy_cmd_cur_menu_lang
,
0
,
NULL
,
""
,
""
,
NULL
},
{
"vt_cur_menu_lang"
,
ventoy_cmd_cur_menu_lang
,
0
,
NULL
,
""
,
""
,
NULL
},
{
"vt_vtoychksum_exist"
,
ventoy_cmd_vtoychksum_exist
,
0
,
NULL
,
""
,
""
,
NULL
},
{
"vt_vtoychksum_exist"
,
ventoy_cmd_vtoychksum_exist
,
0
,
NULL
,
""
,
""
,
NULL
},
{
"vt_cmp_checksum"
,
ventoy_cmd_cmp_checksum
,
0
,
NULL
,
""
,
""
,
NULL
},
{
"vt_cmp_checksum"
,
ventoy_cmd_cmp_checksum
,
0
,
NULL
,
""
,
""
,
NULL
},
{
"vt_push_menu_lang"
,
ventoy_cmd_push_menulang
,
0
,
NULL
,
""
,
""
,
NULL
},
{
"vt_pop_menu_lang"
,
ventoy_cmd_pop_menulang
,
0
,
NULL
,
""
,
""
,
NULL
},
};
};
...
...
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_def.h
View file @
e0132ac4
...
@@ -1313,6 +1313,8 @@ grub_err_t ventoy_cmd_cur_menu_lang(grub_extcmd_context_t ctxt, int argc, char *
...
@@ -1313,6 +1313,8 @@ grub_err_t ventoy_cmd_cur_menu_lang(grub_extcmd_context_t ctxt, int argc, char *
extern
int
ventoy_menu_push_key
(
int
code
);
extern
int
ventoy_menu_push_key
(
int
code
);
int
ventoy_ctrl_var_init
(
void
);
int
ventoy_ctrl_var_init
(
void
);
int
ventoy_global_var_init
(
void
);
int
ventoy_global_var_init
(
void
);
grub_err_t
ventoy_cmd_push_menulang
(
grub_extcmd_context_t
ctxt
,
int
argc
,
char
**
args
);
grub_err_t
ventoy_cmd_pop_menulang
(
grub_extcmd_context_t
ctxt
,
int
argc
,
char
**
args
);
#endif
/* __VENTOY_DEF_H__ */
#endif
/* __VENTOY_DEF_H__ */
GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_plugin.c
View file @
e0132ac4
...
@@ -66,6 +66,7 @@ static theme_list *g_theme_head = NULL;
...
@@ -66,6 +66,7 @@ static theme_list *g_theme_head = NULL;
static
int
g_theme_random
=
vtoy_theme_random_boot_second
;
static
int
g_theme_random
=
vtoy_theme_random_boot_second
;
static
char
g_theme_single_file
[
256
];
static
char
g_theme_single_file
[
256
];
static
char
g_cur_menu_language
[
32
]
=
{
0
};
static
char
g_cur_menu_language
[
32
]
=
{
0
};
static
char
g_push_menu_language
[
32
]
=
{
0
};
static
int
ventoy_plugin_is_parent
(
const
char
*
pat
,
int
patlen
,
const
char
*
isopath
)
static
int
ventoy_plugin_is_parent
(
const
char
*
pat
,
int
patlen
,
const
char
*
isopath
)
{
{
...
@@ -3624,3 +3625,33 @@ grub_err_t ventoy_cmd_cur_menu_lang(grub_extcmd_context_t ctxt, int argc, char *
...
@@ -3624,3 +3625,33 @@ grub_err_t ventoy_cmd_cur_menu_lang(grub_extcmd_context_t ctxt, int argc, char *
VENTOY_CMD_RETURN
(
0
);
VENTOY_CMD_RETURN
(
0
);
}
}
grub_err_t
ventoy_cmd_push_menulang
(
grub_extcmd_context_t
ctxt
,
int
argc
,
char
**
args
)
{
(
void
)
argc
;
(
void
)
ctxt
;
if
(
g_push_menu_language
[
0
]
==
0
)
{
grub_memcpy
(
g_push_menu_language
,
g_cur_menu_language
,
sizeof
(
g_push_menu_language
));
ventoy_plugin_load_menu_lang
(
0
,
args
[
0
]);
}
VENTOY_CMD_RETURN
(
0
);
}
grub_err_t
ventoy_cmd_pop_menulang
(
grub_extcmd_context_t
ctxt
,
int
argc
,
char
**
args
)
{
(
void
)
argc
;
(
void
)
ctxt
;
(
void
)
args
;
if
(
g_push_menu_language
[
0
])
{
ventoy_plugin_load_menu_lang
(
0
,
g_push_menu_language
);
g_push_menu_language
[
0
]
=
0
;
}
VENTOY_CMD_RETURN
(
0
);
}
INSTALL/grub/debug.cfg
View file @
e0132ac4
...
@@ -83,10 +83,12 @@ submenu "$VTLANG_RESOLUTION_CFG" --class=debug_resolution --class=F5tool {
...
@@ -83,10 +83,12 @@ submenu "$VTLANG_RESOLUTION_CFG" --class=debug_resolution --class=F5tool {
submenu "$VTLANG_SCREEN_MODE" --class=debug_screen_mode --class=F5tool {
submenu "$VTLANG_SCREEN_MODE" --class=debug_screen_mode --class=F5tool {
menuentry "$VTLANG_SCREEN_TEXT_MODE" --class=debug_text_mode --class=debug_screen_mode --class=F5tool {
menuentry "$VTLANG_SCREEN_TEXT_MODE" --class=debug_text_mode --class=debug_screen_mode --class=F5tool {
vt_push_menu_lang en_US
terminal_output console
terminal_output console
}
}
menuentry "$VTLANG_SCREEN_GUI_MODE" --class=debug_gui_mode --class=debug_screen_mode --class=F5tool {
menuentry "$VTLANG_SCREEN_GUI_MODE" --class=debug_gui_mode --class=debug_screen_mode --class=F5tool {
terminal_output gfxterm
terminal_output gfxterm
vt_pop_menu_lang
}
}
menuentry "$VTLANG_RETURN_PREVIOUS" --class=vtoyret VTOY_RET {
menuentry "$VTLANG_RETURN_PREVIOUS" --class=vtoyret VTOY_RET {
echo "Return ..."
echo "Return ..."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment