diff --git a/.github/ISSUE_TEMPLATE/issue_template.yml b/.github/ISSUE_TEMPLATE/issue_template.yml index dd1b14d2..acdc7067 100644 --- a/.github/ISSUE_TEMPLATE/issue_template.yml +++ b/.github/ISSUE_TEMPLATE/issue_template.yml @@ -21,7 +21,7 @@ body: attributes: label: Ventoy Version description: What version of ventoy are you running? - placeholder: 1.0.83 + placeholder: 1.0.84 validations: required: true - type: dropdown diff --git a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c index 4fbfe7f7..eab86b1a 100644 --- a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c +++ b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_cmd.c @@ -6177,12 +6177,21 @@ static grub_err_t ventoy_cmd_fs_ignore_case(grub_extcmd_context_t ctxt, int argc return 0; } +static grub_err_t ventoy_cmd_init_menu_lang(grub_extcmd_context_t ctxt, int argc, char **args) +{ + (void)ctxt; + (void)argc; + + ventoy_plugin_load_menu_lang(1, args[0]); + VENTOY_CMD_RETURN(0); +} + static grub_err_t ventoy_cmd_load_menu_lang(grub_extcmd_context_t ctxt, int argc, char **args) { (void)ctxt; (void)argc; - ventoy_plugin_load_menu_lang(args[0]); + ventoy_plugin_load_menu_lang(0, args[0]); VENTOY_CMD_RETURN(0); } @@ -6399,6 +6408,7 @@ static cmd_para ventoy_cmds[] = { "vt_limine_menu", ventoy_cmd_linux_limine_menu, 0, NULL, "", "", NULL }, { "vt_secondary_recover_mode", ventoy_cmd_secondary_recover_mode, 0, NULL, "", "", NULL }, { "vt_load_menu_lang", ventoy_cmd_load_menu_lang, 0, NULL, "", "", NULL }, + { "vt_init_menu_lang", ventoy_cmd_init_menu_lang, 0, NULL, "", "", NULL }, { "vt_cur_menu_lang", ventoy_cmd_cur_menu_lang, 0, NULL, "", "", NULL }, }; diff --git a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_def.h b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_def.h index 810a2302..ba1dcf22 100644 --- a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_def.h +++ b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_def.h @@ -1261,7 +1261,7 @@ grub_err_t ventoy_cmd_browser_disk(grub_extcmd_context_t ctxt, int argc, char ** int ventoy_get_fs_type(const char *fs); int ventoy_img_name_valid(const char *filename, grub_size_t namelen); void * ventoy_alloc_chain(grub_size_t size); -int ventoy_plugin_load_menu_lang(const char *lang); +int ventoy_plugin_load_menu_lang(int init, const char *lang); const char *ventoy_get_vmenu_title(const char *vMenu); grub_err_t ventoy_cmd_cur_menu_lang(grub_extcmd_context_t ctxt, int argc, char **args); extern int ventoy_menu_push_key(int code); diff --git a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_plugin.c b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_plugin.c index 3c2ae77e..91d331ef 100644 --- a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_plugin.c +++ b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_plugin.c @@ -3474,7 +3474,7 @@ const char *ventoy_get_vmenu_title(const char *vMenu) return vtoy_json_get_string_ex(g_menu_lang_json->pstChild, vMenu); } -int ventoy_plugin_load_menu_lang(const char *lang) +int ventoy_plugin_load_menu_lang(int init, const char *lang) { int ret = 1; grub_file_t file = NULL; @@ -3528,9 +3528,12 @@ int ventoy_plugin_load_menu_lang(const char *lang) grub_snprintf(g_ventoy_hotkey_tip, sizeof(g_ventoy_hotkey_tip), "%s", ventoy_get_vmenu_title("VTMENU_STR_HOTKEY_LIST")); } - ventoy_menu_push_key(GRUB_TERM_ESC); - ventoy_menu_push_key(GRUB_TERM_ESC); - g_ventoy_menu_refresh = 1; + if (init == 0) + { + ventoy_menu_push_key(GRUB_TERM_ESC); + ventoy_menu_push_key(GRUB_TERM_ESC); + g_ventoy_menu_refresh = 1; + } ret = 0; end: diff --git a/INSTALL/grub/grub.cfg b/INSTALL/grub/grub.cfg index 71750eef..4e980a6d 100644 --- a/INSTALL/grub/grub.cfg +++ b/INSTALL/grub/grub.cfg @@ -2354,7 +2354,7 @@ function img_unsupport_menuentry { ############################################################# ############################################################# -set VENTOY_VERSION="1.0.83" +set VENTOY_VERSION="1.0.84" #ACPI not compatible with Window7/8, so disable by default set VTOY_PARAM_NO_ACPI=1 @@ -2457,9 +2457,9 @@ else fi if [ -n "$VTOY_MENU_LANGUAGE" ]; then - vt_load_menu_lang "$VTOY_MENU_LANGUAGE" + vt_init_menu_lang "$VTOY_MENU_LANGUAGE" else - vt_load_menu_lang en_US + vt_init_menu_lang en_US fi if [ -n "$VTOY_MENU_TIMEOUT" ]; then