overlays: localize sendmessage confirmation

This commit is contained in:
Megamouse 2024-02-05 09:21:42 +01:00
parent 77ba2b40e7
commit 0b1a7ee346
3 changed files with 12 additions and 1 deletions

View File

@ -162,15 +162,19 @@ namespace rsx
{
visible = false;
localized_string_id confirmation_loc_id = localized_string_id::CELL_NP_SENDMESSAGE_DIALOG_CONFIRMATION;
switch (msg_data.mainType)
{
case SceNpBasicMessageMainType::SCE_NP_BASIC_MESSAGE_MAIN_TYPE_ADD_FRIEND:
m_description->set_text(get_localized_string(localized_string_id::CELL_NP_SENDMESSAGE_DIALOG_TITLE_ADD_FRIEND));
m_description->auto_resize();
confirmation_loc_id = localized_string_id::CELL_NP_SENDMESSAGE_DIALOG_CONFIRMATION_ADD_FRIEND;
break;
case SceNpBasicMessageMainType::SCE_NP_BASIC_MESSAGE_MAIN_TYPE_INVITE:
m_description->set_text(get_localized_string(localized_string_id::CELL_NP_SENDMESSAGE_DIALOG_TITLE_INVITE));
m_description->auto_resize();
confirmation_loc_id = localized_string_id::CELL_NP_SENDMESSAGE_DIALOG_CONFIRMATION_INVITE;
break;
case SceNpBasicMessageMainType::SCE_NP_BASIC_MESSAGE_MAIN_TYPE_DATA_ATTACHMENT:
case SceNpBasicMessageMainType::SCE_NP_BASIC_MESSAGE_MAIN_TYPE_GENERAL:
@ -236,7 +240,8 @@ namespace rsx
rsx_log.notice("sendmessage dialog about to open confirmation dialog");
const std::string confirmation_msg = fmt::format("Send message to %s ?\n\nSubject: %s\n\n%s", npid, msg_data.subject, msg_data.body);
const std::string loc_msg = get_localized_string(confirmation_loc_id, npid.c_str());
const std::string confirmation_msg = fmt::format("%s %s\n\n%s", loc_msg, msg_data.subject, msg_data.body);
s32 confirmation_code = CELL_MSGDIALOG_BUTTON_NO;
// Hide list

View File

@ -145,6 +145,9 @@ enum class localized_string_id
CELL_NP_SENDMESSAGE_DIALOG_TITLE,
CELL_NP_SENDMESSAGE_DIALOG_TITLE_INVITE,
CELL_NP_SENDMESSAGE_DIALOG_TITLE_ADD_FRIEND,
CELL_NP_SENDMESSAGE_DIALOG_CONFIRMATION,
CELL_NP_SENDMESSAGE_DIALOG_CONFIRMATION_INVITE,
CELL_NP_SENDMESSAGE_DIALOG_CONFIRMATION_ADD_FRIEND,
RECORDING_ABORTED,

View File

@ -168,6 +168,9 @@ private:
case localized_string_id::CELL_NP_SENDMESSAGE_DIALOG_TITLE: return tr("Select Message To Send", "SENDMESSAGE_DIALOG");
case localized_string_id::CELL_NP_SENDMESSAGE_DIALOG_TITLE_INVITE: return tr("Send Invite", "SENDMESSAGE_DIALOG");
case localized_string_id::CELL_NP_SENDMESSAGE_DIALOG_TITLE_ADD_FRIEND: return tr("Add Friend", "SENDMESSAGE_DIALOG");
case localized_string_id::CELL_NP_SENDMESSAGE_DIALOG_CONFIRMATION: return tr("Send message to %0 ?\n\nSubject:", "SENDMESSAGE_DIALOG").arg(std::forward<Args>(args)...);
case localized_string_id::CELL_NP_SENDMESSAGE_DIALOG_CONFIRMATION_INVITE: return tr("Send invite to %0 ?\n\nSubject:", "SENDMESSAGE_DIALOG").arg(std::forward<Args>(args)...);
case localized_string_id::CELL_NP_SENDMESSAGE_DIALOG_CONFIRMATION_ADD_FRIEND: return tr("Send friend request to %0 ?\n\nSubject:", "SENDMESSAGE_DIALOG").arg(std::forward<Args>(args)...);
case localized_string_id::RECORDING_ABORTED: return tr("Recording aborted!");
case localized_string_id::RPCN_NO_ERROR: return tr("RPCN: No Error");
case localized_string_id::RPCN_ERROR_INVALID_INPUT: return tr("RPCN: Invalid Input (Wrong Host/Port)");