FS13774 - Translate units in file operation splash messages

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]>
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 3629a765d241359f7c2a0aa54d5e5950c1d723ce
Author: Solomon Peachy <[email protected]>
Date:   Sun Feb 8 20:02:38 2026 -0500

    FS13774 - Translate units in file operation splash messages
    
    'MiB' and 'KiB' were hardcoded; use LANG_MEBIBYTE/KIBIBYTE instead.
    
    Change-Id: I456521a222e213379f929e4d1113e084f87a3ac4

diff --git a/apps/fileop.c b/apps/fileop.c
index e24761be58..54c9b14f52 100644
--- a/apps/fileop.c
+++ b/apps/fileop.c
@@ -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 current_shft = (int) (param->processed_size >> 15);
+            const char *unit_str = str(LANG_MEBIBYTE);
             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,
-                            total_shft >> 5, current_shft >> 5);
+                            total_shft >> 5, unit_str,
+                            current_shft >> 5, unit_str);
         }
         else if (param->total_size >= 1024)
         {
             int total_kib = (int) (param->total_size >> 10);
             int current_kib = (int) (param->processed_size >> 10);
+            const char *unit_str = str(LANG_KIBIBYTE);
             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,
-                            total_kib, current_kib);
+                            total_kib, unit_str,
+                            current_kib, unit_str);
         }
     }
     return ACTION_STD_CANCEL == get_action(CONTEXT_STD, TIMEOUT_NOBLOCK);
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.