mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-10 08:03:04 -04:00
FS13774 - Translate units in file operation splash messages
'MiB' and 'KiB' were hardcoded; use LANG_MEBIBYTE/KIBIBYTE instead. Change-Id: I456521a222e213379f929e4d1113e084f87a3ac4
This commit is contained in:
parent
7c00a059ff
commit
3629a765d2
1 changed files with 8 additions and 4 deletions
|
|
@ -97,19 +97,23 @@ static bool poll_cancel_action(int operation, struct file_op_params *param)
|
||||||
{
|
{
|
||||||
int total_shft = (int) (param->total_size >> 15);
|
int total_shft = (int) (param->total_size >> 15);
|
||||||
int current_shft = (int) (param->processed_size >> 15);
|
int current_shft = (int) (param->processed_size >> 15);
|
||||||
|
const char *unit_str = str(LANG_MEBIBYTE);
|
||||||
splash_progress(current_shft, total_shft,
|
splash_progress(current_shft, total_shft,
|
||||||
"%s %s (%d MiB)\n%d MiB",
|
"%s %s (%d %s)\n%d %s",
|
||||||
op_str, param->toplevel_name,
|
op_str, param->toplevel_name,
|
||||||
total_shft >> 5, current_shft >> 5);
|
total_shft >> 5, unit_str,
|
||||||
|
current_shft >> 5, unit_str);
|
||||||
}
|
}
|
||||||
else if (param->total_size >= 1024)
|
else if (param->total_size >= 1024)
|
||||||
{
|
{
|
||||||
int total_kib = (int) (param->total_size >> 10);
|
int total_kib = (int) (param->total_size >> 10);
|
||||||
int current_kib = (int) (param->processed_size >> 10);
|
int current_kib = (int) (param->processed_size >> 10);
|
||||||
|
const char *unit_str = str(LANG_KIBIBYTE);
|
||||||
splash_progress(current_kib, total_kib,
|
splash_progress(current_kib, total_kib,
|
||||||
"%s %s (%d KiB)\n%d KiB",
|
"%s %s (%d %s)\n%d %s",
|
||||||
op_str, param->toplevel_name,
|
op_str, param->toplevel_name,
|
||||||
total_kib, current_kib);
|
total_kib, unit_str,
|
||||||
|
current_kib, unit_str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ACTION_STD_CANCEL == get_action(CONTEXT_STD, TIMEOUT_NOBLOCK);
|
return ACTION_STD_CANCEL == get_action(CONTEXT_STD, TIMEOUT_NOBLOCK);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue