mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 13:20:30 +00:00
Add some task-related localized strings
This commit is contained in:
parent
7e156584ba
commit
cf0a493605
@ -157,12 +157,8 @@ const char *msg_hash_to_str_es(uint32_t hash)
|
||||
return "Borrando archivo temporal de contenido";
|
||||
case MSG_LOADED_STATE_FROM_SLOT:
|
||||
return "Carga rápida desde la ranura";
|
||||
case MSG_DOWNLOAD_PROGRESS:
|
||||
return "Progreso de la descarga";
|
||||
case MSG_COULD_NOT_PROCESS_ZIP_FILE:
|
||||
return "No se ha podido procesar el archivo ZIP.";
|
||||
case MSG_DOWNLOAD_COMPLETE:
|
||||
return "Descarga completa";
|
||||
case MSG_SCANNING_OF_DIRECTORY_FINISHED:
|
||||
return "Escaneado de carpetas terminado";
|
||||
case MSG_SCANNING:
|
||||
@ -195,6 +191,10 @@ const char *msg_hash_to_str_es(uint32_t hash)
|
||||
return "Rebobinando.";
|
||||
case MSG_REWIND_REACHED_END:
|
||||
return "Se ha llegado al final del búfer de rebobinado.";
|
||||
case MSG_TASK_FAILED:
|
||||
return "Fracasado";
|
||||
case MSG_DOWNLOADING:
|
||||
return "Descargando";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -148,12 +148,8 @@ const char *msg_hash_to_str_pl(uint32_t hash)
|
||||
return "Usuwanie tymczasowego pliku treści";
|
||||
case MSG_LOADED_STATE_FROM_SLOT:
|
||||
return "Wczytano stan ze slotu";
|
||||
case MSG_DOWNLOAD_PROGRESS:
|
||||
return "Postęp pobierania";
|
||||
case MSG_COULD_NOT_PROCESS_ZIP_FILE:
|
||||
return "Nie udało się przetworzyć pliku ZIP.";
|
||||
case MSG_DOWNLOAD_COMPLETE:
|
||||
return "Zakończono pobieranie";
|
||||
case MSG_SCANNING_OF_DIRECTORY_FINISHED:
|
||||
return "Zakończono skanowanie katalogu";
|
||||
case MSG_SCANNING:
|
||||
|
@ -100,12 +100,8 @@ const char *msg_hash_to_str_pt(uint32_t hash)
|
||||
return "Removendo conteúdo temporário";
|
||||
case MSG_LOADED_STATE_FROM_SLOT:
|
||||
return "Estado carregado do slot";
|
||||
case MSG_DOWNLOAD_PROGRESS:
|
||||
return "Progresso do download";
|
||||
case MSG_COULD_NOT_PROCESS_ZIP_FILE:
|
||||
return "Incapaz de processar arquivo ZIP.";
|
||||
case MSG_DOWNLOAD_COMPLETE:
|
||||
return "Download concluído";
|
||||
case MSG_SCANNING_OF_DIRECTORY_FINISHED:
|
||||
return "Exame de diretório concluído";
|
||||
case MSG_SCANNING:
|
||||
@ -138,6 +134,12 @@ const char *msg_hash_to_str_pt(uint32_t hash)
|
||||
return "Retrocedendo.";
|
||||
case MSG_REWIND_REACHED_END:
|
||||
return "Final do buffer de retrocesso atingido.";
|
||||
case MSG_TASK_FAILED:
|
||||
return "Falhou";
|
||||
case MSG_DOWNLOADING:
|
||||
return "Baixando";
|
||||
case MSG_EXTRACTING:
|
||||
return "Extraindo";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -148,12 +148,8 @@ const char *msg_hash_to_str_us(uint32_t hash)
|
||||
return "Removing temporary content file";
|
||||
case MSG_LOADED_STATE_FROM_SLOT:
|
||||
return "Loaded state from slot";
|
||||
case MSG_DOWNLOAD_PROGRESS:
|
||||
return "Download progress";
|
||||
case MSG_COULD_NOT_PROCESS_ZIP_FILE:
|
||||
return "Could not process ZIP file.";
|
||||
case MSG_DOWNLOAD_COMPLETE:
|
||||
return "Download complete";
|
||||
case MSG_SCANNING_OF_DIRECTORY_FINISHED:
|
||||
return "Scanning of directory finished";
|
||||
case MSG_SCANNING:
|
||||
@ -186,6 +182,12 @@ const char *msg_hash_to_str_us(uint32_t hash)
|
||||
return "Rewinding.";
|
||||
case MSG_REWIND_REACHED_END:
|
||||
return "Reached end of rewind buffer.";
|
||||
case MSG_TASK_FAILED:
|
||||
return "Failed";
|
||||
case MSG_DOWNLOADING:
|
||||
return "Downloading";
|
||||
case MSG_EXTRACTING:
|
||||
return "Extracting";
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -338,15 +338,10 @@ static void cb_decompressed(void *task_data, void *user_data, const char *err)
|
||||
|
||||
if (dec && !err)
|
||||
{
|
||||
char msg[PATH_MAX_LENGTH];
|
||||
|
||||
if (type_hash == CB_CORE_UPDATER_DOWNLOAD)
|
||||
event_command(EVENT_CMD_CORE_INFO_INIT);
|
||||
else if (type_hash == CB_UPDATE_ASSETS)
|
||||
event_command(EVENT_CMD_REINIT);
|
||||
|
||||
snprintf(msg, sizeof(msg), "%s extracted.", path_basename(dec->source_file));
|
||||
rarch_main_msg_queue_push(msg, 1, 90, true);
|
||||
}
|
||||
|
||||
if (err)
|
||||
@ -448,9 +443,6 @@ void cb_generic_download(void *task_data, void *user_data, const char *err)
|
||||
goto finish;
|
||||
}
|
||||
|
||||
rarch_main_msg_queue_pushf(1, 90, true, "%s: %s",
|
||||
msg_hash_to_str(MSG_DOWNLOAD_COMPLETE), transf->path);
|
||||
|
||||
#ifdef HAVE_ZLIB
|
||||
file_ext = path_get_extension(output_path);
|
||||
|
||||
@ -459,15 +451,8 @@ void cb_generic_download(void *task_data, void *user_data, const char *err)
|
||||
|
||||
if (!strcasecmp(file_ext, "zip"))
|
||||
{
|
||||
rarch_main_msg_queue_pushf(1, 90, true,
|
||||
"Decompressing %s...", path_basename(output_path));
|
||||
|
||||
if (!rarch_task_push_decompress(output_path, dir_path, NULL,
|
||||
cb_decompressed, (void*)(uintptr_t)transf->type_hash))
|
||||
{
|
||||
rarch_main_msg_queue_pushf(1, 90, true,
|
||||
"Decompression of %s failed.", path_basename(output_path));
|
||||
}
|
||||
rarch_task_push_decompress(output_path, dir_path, NULL,
|
||||
cb_decompressed, (void*)(uintptr_t)transf->type_hash);
|
||||
}
|
||||
#else
|
||||
if (transf->type_hash == CB_CORE_UPDATER_DOWNLOAD)
|
||||
@ -477,8 +462,6 @@ void cb_generic_download(void *task_data, void *user_data, const char *err)
|
||||
finish:
|
||||
if (err)
|
||||
{
|
||||
rarch_main_msg_queue_pushf(1, 90, true, "Download failed.");
|
||||
|
||||
RARCH_ERR("Download of '%s' failed: %s\n",
|
||||
(transf ? transf->path: "unknown"), err);
|
||||
}
|
||||
|
@ -101,9 +101,7 @@
|
||||
#define MSG_SCANNING 0x4c547516U
|
||||
#define MSG_SCANNING_OF_DIRECTORY_FINISHED 0x399632a7U
|
||||
|
||||
#define MSG_DOWNLOAD_COMPLETE 0x4b9c4f75U
|
||||
#define MSG_COULD_NOT_PROCESS_ZIP_FILE 0xc18c89bbU
|
||||
#define MSG_DOWNLOAD_PROGRESS 0x35ed9411U
|
||||
|
||||
#define MSG_LOADED_STATE_FROM_SLOT 0xadb48582U
|
||||
|
||||
@ -153,6 +151,10 @@
|
||||
|
||||
#define MSG_GOT_INVALID_DISK_INDEX 0xb138dd76U
|
||||
|
||||
#define MSG_TASK_FAILED 0xb23ed64aU
|
||||
#define MSG_DOWNLOADING 0x465305dbU
|
||||
#define MSG_EXTRACTING 0x25a4c19eU
|
||||
|
||||
const char *msg_hash_to_str(uint32_t hash);
|
||||
|
||||
const char *msg_hash_to_str_fr(uint32_t hash);
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
#include "tasks.h"
|
||||
#include "../verbosity.h"
|
||||
#include "../msg_hash.h"
|
||||
|
||||
typedef struct {
|
||||
char *source_file;
|
||||
@ -115,6 +116,7 @@ bool rarch_task_push_decompress(const char *source_file, const char *target_dir,
|
||||
{
|
||||
decompress_state_t *s;
|
||||
rarch_task_t *t;
|
||||
char tmp[PATH_MAX_LENGTH];
|
||||
|
||||
if (!target_dir || !target_dir[0] || !source_file || !source_file[0])
|
||||
{
|
||||
@ -148,6 +150,9 @@ bool rarch_task_push_decompress(const char *source_file, const char *target_dir,
|
||||
t->callback = cb;
|
||||
t->user_data = user_data;
|
||||
|
||||
snprintf(tmp, sizeof(tmp), "%s '%s'", msg_hash_to_str(MSG_EXTRACTING), path_basename(source_file));
|
||||
t->title = strdup(tmp);
|
||||
|
||||
rarch_task_push(t);
|
||||
|
||||
return true;
|
||||
|
@ -224,7 +224,7 @@ bool rarch_task_push_http_transfer(const char *url, const char *type, rarch_task
|
||||
t->user_data = user_data;
|
||||
t->progress = -1;
|
||||
|
||||
snprintf(tmp, sizeof(tmp), "Downloading '%s'", path_basename(url));
|
||||
snprintf(tmp, sizeof(tmp), "%s '%s'", msg_hash_to_str(MSG_DOWNLOADING), path_basename(url));
|
||||
t->title = strdup(tmp);
|
||||
|
||||
rarch_task_push(t);
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include "../general.h"
|
||||
#include "../verbosity.h"
|
||||
#include "../msg_hash.h"
|
||||
#include "tasks.h"
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
@ -77,7 +78,8 @@ static void push_task_progress(rarch_task_t *task)
|
||||
if (task->finished)
|
||||
{
|
||||
if (task->error)
|
||||
rarch_main_msg_queue_pushf(1, 60, true, "Failed: %s", task->title);
|
||||
rarch_main_msg_queue_pushf(1, 60, true, "%s: %s",
|
||||
msg_hash_to_str(MSG_TASK_FAILED), task->title);
|
||||
else
|
||||
rarch_main_msg_queue_pushf(1, 60, true, "100%%: %s", task->title);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user