More translatable strings

This commit is contained in:
twinaphex 2016-06-30 05:58:05 +02:00
parent acd68519de
commit fbc83640b6
4 changed files with 36 additions and 9 deletions

View File

@ -2098,6 +2098,20 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg)
return "Error parsing arguments.";
case MSG_ERROR:
return "Error";
case MSG_FOUND_DISK_LABEL:
return "Found disk label";
case MSG_READING_FIRST_DATA_TRACK:
return "Reading first data track...";
case MSG_FOUND_FIRST_DATA_TRACK_ON_FILE:
return "Found first data track on file";
case MSG_COULD_NOT_FIND_VALID_DATA_TRACK:
return "Could not find valid data track";
case MSG_COMPARING_WITH_KNOWN_MAGIC_NUMBERS:
return "Comparing with known magic numbers...";
case MSG_COULD_NOT_FIND_COMPATIBLE_SYSTEM:
return "Could not find compatible system.";
case MSG_COULD_NOT_OPEN_DATA_TRACK:
return "could not open data track";
case MSG_MEMORY:
return "Memory";
case MSG_FRAMES:

View File

@ -140,6 +140,13 @@ enum msg_hash_enums
MSG_CONTENT_LOADING_SKIPPED_IMPLEMENTATION_WILL_DO_IT,
MSG_PROGRAM,
MSG_ERROR,
MSG_FOUND_DISK_LABEL,
MSG_READING_FIRST_DATA_TRACK,
MSG_COULD_NOT_FIND_COMPATIBLE_SYSTEM,
MSG_COMPARING_WITH_KNOWN_MAGIC_NUMBERS,
MSG_COULD_NOT_FIND_VALID_DATA_TRACK,
MSG_COULD_NOT_OPEN_DATA_TRACK,
MSG_FOUND_FIRST_DATA_TRACK_ON_FILE,
MSG_FRAMES,
MSG_FOUND_SHADER,
MSG_LOADING_HISTORY_FILE,

View File

@ -125,13 +125,13 @@ static int iso_get_serial(database_state_handle_t *db_state,
{
if (detect_psp_game(name, serial) == 0)
return 0;
RARCH_LOG("Found disk label '%s'\n", serial);
RARCH_LOG("%s '%s'\n", msg_hash_to_str(MSG_FOUND_DISK_LABEL), serial);
}
else if (string_is_equal(system_name, "ps1"))
{
if (detect_ps1_game(name, serial) == 0)
return 0;
RARCH_LOG("Found disk label '%s'\n", serial);
RARCH_LOG("%s '%s'\n", msg_hash_to_str(MSG_FOUND_DISK_LABEL), serial);
}
return 0;
@ -142,15 +142,18 @@ static int cue_get_serial(database_state_handle_t *db_state,
{
int32_t offset = 0;
char track_path[PATH_MAX_LENGTH] = {0};
int rv = find_first_data_track(name, &offset, track_path, PATH_MAX_LENGTH);
int rv = find_first_data_track(name,
&offset, track_path, PATH_MAX_LENGTH);
if (rv < 0)
{
RARCH_LOG("Could not find valid data track: %s\n", strerror(-rv));
RARCH_LOG("%s: %s\n",
msg_hash_to_str(MSG_COULD_NOT_FIND_VALID_DATA_TRACK),
strerror(-rv));
return rv;
}
RARCH_LOG("Reading 1st data track...\n");
RARCH_LOG("%s\n", msg_hash_to_str(MSG_READING_FIRST_DATA_TRACK));
return iso_get_serial(db_state, db, track_path, serial);
}

View File

@ -256,7 +256,9 @@ int detect_psp_game(const char *track_path, char *game_id)
if (!fd)
{
RARCH_LOG("Could not open data track: %s\n", strerror(errno));
RARCH_LOG("%s: %s\n",
msg_hash_to_str(MSG_COULD_NOT_OPEN_DATA_TRACK),
strerror(errno));
return -errno;
}
@ -341,7 +343,7 @@ int detect_system(const char *track_path, int32_t offset,
goto clean;
}
RARCH_LOG("Comparing with known magic numbers...\n");
RARCH_LOG("%s\n", msg_hash_to_str(MSG_COMPARING_WITH_KNOWN_MAGIC_NUMBERS));
for (i = 0; MAGIC_NUMBERS[i].system_name != NULL; i++)
{
if (memcmp(MAGIC_NUMBERS[i].magic, magic, MAGIC_LEN) == 0)
@ -364,7 +366,7 @@ int detect_system(const char *track_path, int32_t offset,
}
}
RARCH_LOG("Could not find compatible system\n");
RARCH_LOG("%s\n", msg_hash_to_str(MSG_COULD_NOT_FIND_COMPATIBLE_SYSTEM));
rv = -EINVAL;
clean:
@ -421,7 +423,8 @@ int find_first_data_track(const char *cue_path,
*offset = ((m * 60) * (s * 75) * f) * 25;
RARCH_LOG("Found 1st data track on file '%s+%d'\n",
RARCH_LOG("%s '%s+%d'\n",
msg_hash_to_str(MSG_FOUND_FIRST_DATA_TRACK_ON_FILE),
track_path, *offset);
rv = 0;