Add target_lang/source_lang options

This commit is contained in:
twinaphex 2019-08-22 19:39:00 +02:00
parent 7f095907e2
commit 5b71939848
28 changed files with 212 additions and 1 deletions

View File

@ -1053,6 +1053,10 @@ static char buildbot_assets_server_url[] = "http://buildbot.libretro.com/assets/
static char default_discord_app_id[] = "475456035851599874";
#define DEFAULT_AI_SERVICE_SOURCE_LANG 0
#define DEFAULT_AI_SERVICE_TARGET_LANG 0
#define DEFAULT_AI_SERVICE_ENABLE false
#define DEFAULT_AI_SERVICE_MODE 1

View File

@ -1826,6 +1826,8 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
SETTING_UINT("video_windowed_position_width", &settings->uints.window_position_width, true, DEFAULT_WINDOW_WIDTH, false);
SETTING_UINT("video_windowed_position_height", &settings->uints.window_position_height, true, DEFAULT_WINDOW_HEIGHT, false);
SETTING_UINT("ai_service_mode", &settings->uints.ai_service_mode, DEFAULT_AI_SERVICE_MODE, 0, false);
SETTING_UINT("ai_service_target_lang", &settings->uints.ai_service_target_lang, 0, 0, false);
SETTING_UINT("ai_service_source_lang", &settings->uints.ai_service_source_lang, 0, 0, false);
SETTING_UINT("video_record_threads", &settings->uints.video_record_threads, true, DEFAULT_VIDEO_RECORD_THREADS, false);

View File

@ -547,6 +547,8 @@ typedef struct settings
unsigned libnx_overclock;
unsigned ai_service_mode;
unsigned ai_service_target_lang;
unsigned ai_service_source_lang;
} uints;
struct

View File

@ -3882,3 +3882,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
"A http:// url pointing to the translation service to use.")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
"Enable AI Service to run when the AI Service hotkey is pressed.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_TARGET_LANG,
"Target Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_TARGET_LANG,
"The language the service will translate to. If set to 'Don't Care', it will default to English.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG,
"Source Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_SOURCE_LANG,
"The language the service will translate from. If set to 'Don't Care', it will attempt to auto-detect the language. Setting it to a specific language will make the translation more accurate.")

View File

@ -4900,3 +4900,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
"A http:// url pointing to the translation service to use.")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
"Enable AI Service to run when the AI Service hotkey is pressed.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_TARGET_LANG,
"Target Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_TARGET_LANG,
"The language the service will translate to. If set to 'Don't Care', it will default to English.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG,
"Source Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_SOURCE_LANG,
"The language the service will translate from. If set to 'Don't Care', it will attempt to auto-detect the language. Setting it to a specific language will make the translation more accurate.")

View File

@ -3658,3 +3658,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
"A http:// url pointing to the translation service to use.")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
"Enable AI Service to run when the AI Service hotkey is pressed.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_TARGET_LANG,
"Target Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_TARGET_LANG,
"The language the service will translate to. If set to 'Don't Care', it will default to English.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG,
"Source Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_SOURCE_LANG,
"The language the service will translate from. If set to 'Don't Care', it will attempt to auto-detect the language. Setting it to a specific language will make the translation more accurate.")

View File

@ -3787,3 +3787,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
"A http:// url pointing to the translation service to use.")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
"Enable AI Service to run when the AI Service hotkey is pressed.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_TARGET_LANG,
"Target Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_TARGET_LANG,
"The language the service will translate to. If set to 'Don't Care', it will default to English.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG,
"Source Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_SOURCE_LANG,
"The language the service will translate from. If set to 'Don't Care', it will attempt to auto-detect the language. Setting it to a specific language will make the translation more accurate.")

View File

@ -7864,3 +7864,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
"A http:// url pointing to the translation service to use.")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
"Enable AI Service to run when the AI Service hotkey is pressed.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_TARGET_LANG,
"Target Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_TARGET_LANG,
"The language the service will translate to. If set to 'Don't Care', it will default to English.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG,
"Source Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_SOURCE_LANG,
"The language the service will translate from. If set to 'Don't Care', it will attempt to auto-detect the language. Setting it to a specific language will make the translation more accurate.")

View File

@ -3546,3 +3546,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
"A http:// url pointing to the translation service to use.")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
"Enable AI Service to run when the AI Service hotkey is pressed.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_TARGET_LANG,
"Target Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_TARGET_LANG,
"The language the service will translate to. If set to 'Don't Care', it will default to English.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG,
"Source Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_SOURCE_LANG,
"The language the service will translate from. If set to 'Don't Care', it will attempt to auto-detect the language. Setting it to a specific language will make the translation more accurate.")

View File

@ -8016,3 +8016,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
"A http:// url pointing to the translation service to use.")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
"Enable AI Service to run when the AI Service hotkey is pressed.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_TARGET_LANG,
"Target Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_TARGET_LANG,
"The language the service will translate to. If set to 'Don't Care', it will default to English.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG,
"Source Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_SOURCE_LANG,
"The language the service will translate from. If set to 'Don't Care', it will attempt to auto-detect the language. Setting it to a specific language will make the translation more accurate.")

View File

@ -8804,3 +8804,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
"A http:// url pointing to the translation service to use.")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
"Enable AI Service to run when the AI Service hotkey is pressed.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_TARGET_LANG,
"Target Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_TARGET_LANG,
"The language the service will translate to. If set to 'Don't Care', it will default to English.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG,
"Source Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_SOURCE_LANG,
"The language the service will translate from. If set to 'Don't Care', it will attempt to auto-detect the language. Setting it to a specific language will make the translation more accurate.")

View File

@ -3767,3 +3767,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
"A http:// url pointing to the translation service to use.")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
"Enable AI Service to run when the AI Service hotkey is pressed.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_TARGET_LANG,
"Target Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_TARGET_LANG,
"The language the service will translate to. If set to 'Don't Care', it will default to English.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG,
"Source Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_SOURCE_LANG,
"The language the service will translate from. If set to 'Don't Care', it will attempt to auto-detect the language. Setting it to a specific language will make the translation more accurate.")

View File

@ -9179,3 +9179,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
"A http:// url pointing to the translation service to use.")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
"Enable AI Service to run when the AI Service hotkey is pressed.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_TARGET_LANG,
"Target Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_TARGET_LANG,
"The language the service will translate to. If set to 'Don't Care', it will default to English.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG,
"Source Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_SOURCE_LANG,
"The language the service will translate from. If set to 'Don't Care', it will attempt to auto-detect the language. Setting it to a specific language will make the translation more accurate.")

View File

@ -9011,3 +9011,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
"A http:// url pointing to the translation service to use.")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
"Enable AI Service to run when the AI Service hotkey is pressed.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_TARGET_LANG,
"Target Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_TARGET_LANG,
"The language the service will translate to. If set to 'Don't Care', it will default to English.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG,
"Source Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_SOURCE_LANG,
"The language the service will translate from. If set to 'Don't Care', it will attempt to auto-detect the language. Setting it to a specific language will make the translation more accurate.")

View File

@ -2001,3 +2001,7 @@ MSG_HASH(MENU_ENUM_LABEL_AI_SERVICE_URL,
"ai_service_url")
MSG_HASH(MENU_ENUM_LABEL_AI_SERVICE_ENABLE,
"ai_service_enable")
MSG_HASH(MENU_ENUM_LABEL_AI_SERVICE_TARGET_LANG,
"ai_service_target_lang")
MSG_HASH(MENU_ENUM_LABEL_AI_SERVICE_SOURCE_LANG,
"ai_service_source_lang")

View File

@ -3540,3 +3540,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
"A http:// url pointing to the translation service to use.")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
"Enable AI Service to run when the AI Service hotkey is pressed.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_TARGET_LANG,
"Target Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_TARGET_LANG,
"The language the service will translate to. If set to 'Don't Care', it will default to English.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG,
"Source Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_SOURCE_LANG,
"The language the service will translate from. If set to 'Don't Care', it will attempt to auto-detect the language. Setting it to a specific language will make the translation more accurate.")

View File

@ -4331,3 +4331,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
"A http:// url pointing to the translation service to use.")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
"Enable AI Service to run when the AI Service hotkey is pressed.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_TARGET_LANG,
"Target Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_TARGET_LANG,
"The language the service will translate to. If set to 'Don't Care', it will default to English.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG,
"Source Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_SOURCE_LANG,
"The language the service will translate from. If set to 'Don't Care', it will attempt to auto-detect the language. Setting it to a specific language will make the translation more accurate.")

View File

@ -9091,3 +9091,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
"A http:// url pointing to the translation service to use.")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
"Enable AI Service to run when the AI Service hotkey is pressed.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_TARGET_LANG,
"Target Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_TARGET_LANG,
"The language the service will translate to. If set to 'Don't Care', it will default to English.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG,
"Source Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_SOURCE_LANG,
"The language the service will translate from. If set to 'Don't Care', it will attempt to auto-detect the language. Setting it to a specific language will make the translation more accurate.")

View File

@ -3612,3 +3612,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
"A http:// url pointing to the translation service to use.")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
"Enable AI Service to run when the AI Service hotkey is pressed.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_TARGET_LANG,
"Target Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_TARGET_LANG,
"The language the service will translate to. If set to 'Don't Care', it will default to English.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG,
"Source Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_SOURCE_LANG,
"The language the service will translate from. If set to 'Don't Care', it will attempt to auto-detect the language. Setting it to a specific language will make the translation more accurate.")

View File

@ -3810,3 +3810,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
"A http:// url pointing to the translation service to use.")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
"Enable AI Service to run when the AI Service hotkey is pressed.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_TARGET_LANG,
"Target Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_TARGET_LANG,
"The language the service will translate to. If set to 'Don't Care', it will default to English.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG,
"Source Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_SOURCE_LANG,
"The language the service will translate from. If set to 'Don't Care', it will attempt to auto-detect the language. Setting it to a specific language will make the translation more accurate.")

View File

@ -8816,3 +8816,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
"A http:// url pointing to the translation service to use.")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
"Enable AI Service to run when the AI Service hotkey is pressed.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_TARGET_LANG,
"Target Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_TARGET_LANG,
"The language the service will translate to. If set to 'Don't Care', it will default to English.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG,
"Source Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_SOURCE_LANG,
"The language the service will translate from. If set to 'Don't Care', it will attempt to auto-detect the language. Setting it to a specific language will make the translation more accurate.")

View File

@ -9155,3 +9155,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
"A http:// url pointing to the translation service to use.")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
"Enable AI Service to run when the AI Service hotkey is pressed.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_TARGET_LANG,
"Target Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_TARGET_LANG,
"The language the service will translate to. If set to 'Don't Care', it will default to English.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG,
"Source Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_SOURCE_LANG,
"The language the service will translate from. If set to 'Don't Care', it will attempt to auto-detect the language. Setting it to a specific language will make the translation more accurate.")

View File

@ -3702,3 +3702,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_URL,
"A http:// url pointing to the translation service to use.")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE,
"Enable AI Service to run when the AI Service hotkey is pressed.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_TARGET_LANG,
"Target Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_TARGET_LANG,
"The language the service will translate to. If set to 'Don't Care', it will default to English.")
MSG_HASH(MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG,
"Source Language")
MSG_HASH(MENU_ENUM_SUBLABEL_AI_SERVICE_SOURCE_LANG,
"The language the service will translate from. If set to 'Don't Care', it will attempt to auto-detect the language. Setting it to a specific language will make the translation more accurate.")

View File

@ -127,6 +127,8 @@ default_sublabel_macro(action_bind_sublabel_logging_settings_list, MENU_
default_sublabel_macro(action_bind_sublabel_user_interface_settings_list, MENU_ENUM_SUBLABEL_USER_INTERFACE_SETTINGS)
default_sublabel_macro(action_bind_sublabel_ai_service_settings_list, MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS)
default_sublabel_macro(action_bind_sublabel_ai_service_mode, MENU_ENUM_SUBLABEL_AI_SERVICE_MODE)
default_sublabel_macro(action_bind_sublabel_ai_service_target_lang, MENU_ENUM_SUBLABEL_AI_SERVICE_TARGET_LANG)
default_sublabel_macro(action_bind_sublabel_ai_service_source_lang, MENU_ENUM_SUBLABEL_AI_SERVICE_SOURCE_LANG)
default_sublabel_macro(action_bind_sublabel_ai_service_url, MENU_ENUM_SUBLABEL_AI_SERVICE_URL)
default_sublabel_macro(action_bind_sublabel_ai_service_enable, MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE)
default_sublabel_macro(action_bind_sublabel_power_management_settings_list, MENU_ENUM_SUBLABEL_POWER_MANAGEMENT_SETTINGS)
@ -2547,6 +2549,12 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_AI_SERVICE_URL:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_ai_service_url);
break;
case MENU_ENUM_LABEL_AI_SERVICE_TARGET_LANG:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_ai_service_target_lang);
break;
case MENU_ENUM_LABEL_AI_SERVICE_SOURCE_LANG:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_ai_service_source_lang);
break;
case MENU_ENUM_LABEL_AI_SERVICE_MODE:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_ai_service_mode);
break;

View File

@ -3726,6 +3726,8 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
{MENU_ENUM_LABEL_AI_SERVICE_MODE, PARSE_ONLY_UINT, true },
{MENU_ENUM_LABEL_AI_SERVICE_URL, PARSE_ONLY_STRING, true },
{MENU_ENUM_LABEL_AI_SERVICE_ENABLE, PARSE_ONLY_BOOL, true},
{MENU_ENUM_LABEL_AI_SERVICE_SOURCE_LANG, PARSE_ONLY_UINT, true},
{MENU_ENUM_LABEL_AI_SERVICE_TARGET_LANG, PARSE_ONLY_UINT, true},
};
for (i = 0; i < ARRAY_SIZE(build_list); i++)

View File

@ -56,6 +56,10 @@
#include "../cheevos-new/cheevos.h"
#endif
#ifdef HAVE_TRANSLATE
#include "../translation/translation_driver.h"
#endif
#include "../frontend/frontend_driver.h"
#include "widgets/menu_input_bind_dialog.h"
@ -12848,6 +12852,7 @@ static bool setting_append_list(
END_GROUP(list, list_info, parent_group);
break;
case SETTINGS_LIST_AI_SERVICE:
#ifdef HAVE_TRANSLATE
START_GROUP(list, list_info, &group_info,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS),
parent_group);
@ -12900,8 +12905,37 @@ static bool setting_append_list(
general_read_handler,
SD_FLAG_NONE);
CONFIG_UINT(
list, list_info,
&settings->uints.ai_service_source_lang,
MENU_ENUM_LABEL_AI_SERVICE_SOURCE_LANG,
MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG,
DEFAULT_AI_SERVICE_SOURCE_LANG,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
menu_settings_list_current_add_range(list, list_info, TRANSLATION_LANG_DONT_CARE, (TRANSLATION_LANG_LAST-1), 1, true, true);
CONFIG_UINT(
list, list_info,
&settings->uints.ai_service_target_lang,
MENU_ENUM_LABEL_AI_SERVICE_TARGET_LANG,
MENU_ENUM_LABEL_VALUE_AI_SERVICE_TARGET_LANG,
DEFAULT_AI_SERVICE_TARGET_LANG,
&group_info,
&subgroup_info,
parent_group,
general_write_handler,
general_read_handler);
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
menu_settings_list_current_add_range(list, list_info, TRANSLATION_LANG_DONT_CARE, (TRANSLATION_LANG_LAST-1), 1, true, true);
END_SUB_GROUP(list, list_info, parent_group);
END_GROUP(list, list_info, parent_group);
#endif
break;
case SETTINGS_LIST_USER_INTERFACE:
START_GROUP(list, list_info, &group_info,

View File

@ -1670,6 +1670,8 @@ enum msg_hash_enums
MENU_LABEL(INPUT_SETTINGS),
MENU_LABEL(AI_SERVICE_SETTINGS),
MENU_LABEL(AI_SERVICE_MODE),
MENU_LABEL(AI_SERVICE_TARGET_LANG),
MENU_LABEL(AI_SERVICE_SOURCE_LANG),
MENU_LABEL(AI_SERVICE_URL),
MENU_LABEL(AI_SERVICE_ENABLE),

View File

@ -82,7 +82,8 @@ enum translation_lang
TRANSLATION_LANG_UR, /* Urdu */
TRANSLATION_LANG_VI, /* Vietnamese */
TRANSLATION_LANG_CY, /* Welsh */
TRANSLATION_LANG_YI /* Yiddish */
TRANSLATION_LANG_YI, /* Yiddish */
TRANSLATION_LANG_LAST
};
struct translation_driver_info