mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 00:40:09 +00:00
Create more translatable strings
This commit is contained in:
parent
dbb6c156b3
commit
6917c7767d
@ -352,7 +352,9 @@ static void event_disk_control_set_index(unsigned idx)
|
|||||||
snprintf(msg, sizeof(msg), "Setting disk %u of %u in tray.",
|
snprintf(msg, sizeof(msg), "Setting disk %u of %u in tray.",
|
||||||
idx + 1, num_disks);
|
idx + 1, num_disks);
|
||||||
else
|
else
|
||||||
strlcpy(msg, "Removed disk from tray.", sizeof(msg));
|
strlcpy(msg,
|
||||||
|
msg_hash_to_str(MSG_REMOVED_DISK_FROM_TRAY),
|
||||||
|
sizeof(msg));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -360,7 +362,9 @@ static void event_disk_control_set_index(unsigned idx)
|
|||||||
snprintf(msg, sizeof(msg), "Failed to set disk %u of %u.",
|
snprintf(msg, sizeof(msg), "Failed to set disk %u of %u.",
|
||||||
idx + 1, num_disks);
|
idx + 1, num_disks);
|
||||||
else
|
else
|
||||||
strlcpy(msg, "Failed to remove disk from tray.", sizeof(msg));
|
strlcpy(msg,
|
||||||
|
msg_hash_to_str(MSG_FAILED_TO_REMOVE_DISK_FROM_TRAY),
|
||||||
|
sizeof(msg));
|
||||||
error = true;
|
error = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -400,7 +404,7 @@ static void event_check_disk_prev(
|
|||||||
|
|
||||||
if (!disk_prev_enable)
|
if (!disk_prev_enable)
|
||||||
{
|
{
|
||||||
RARCH_ERR("Got invalid disk index from libretro.\n");
|
RARCH_ERR("%s.\n", msg_hash_to_str(MSG_GOT_INVALID_DISK_INDEX));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -435,7 +439,7 @@ static void event_check_disk_next(
|
|||||||
|
|
||||||
if (!disk_next_enable)
|
if (!disk_next_enable)
|
||||||
{
|
{
|
||||||
RARCH_ERR("Got invalid disk index from libretro.\n");
|
RARCH_ERR("%s.\n", msg_hash_to_str(MSG_GOT_INVALID_DISK_INDEX));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,6 +20,12 @@ const char *msg_hash_to_str_us(uint32_t hash)
|
|||||||
{
|
{
|
||||||
switch (hash)
|
switch (hash)
|
||||||
{
|
{
|
||||||
|
case MSG_GOT_INVALID_DISK_INDEX:
|
||||||
|
return "Got invalid disk index.";
|
||||||
|
case MSG_FAILED_TO_REMOVE_DISK_FROM_TRAY:
|
||||||
|
return "Failed to remove disk from tray.";
|
||||||
|
case MSG_REMOVED_DISK_FROM_TRAY:
|
||||||
|
return "Removed disk from tray.";
|
||||||
case MSG_VIRTUAL_DISK_TRAY:
|
case MSG_VIRTUAL_DISK_TRAY:
|
||||||
return "virtual disk tray.";
|
return "virtual disk tray.";
|
||||||
case MSG_FAILED_TO:
|
case MSG_FAILED_TO:
|
||||||
|
@ -90,6 +90,11 @@
|
|||||||
#define MSG_TO 0x005979a8U
|
#define MSG_TO 0x005979a8U
|
||||||
|
|
||||||
#define MSG_VIRTUAL_DISK_TRAY 0x4aa37f15U
|
#define MSG_VIRTUAL_DISK_TRAY 0x4aa37f15U
|
||||||
|
#define MSG_REMOVED_DISK_FROM_TRAY 0xf26a9653U
|
||||||
|
|
||||||
|
#define MSG_FAILED_TO_REMOVE_DISK_FROM_TRAY 0xc1c9a655U
|
||||||
|
|
||||||
|
#define MSG_GOT_INVALID_DISK_INDEX 0xb138dd76U
|
||||||
|
|
||||||
const char *msg_hash_to_str(uint32_t hash);
|
const char *msg_hash_to_str(uint32_t hash);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user