[pacman-dev] [PATCH 03/15] split "Packages (%zd):" message

Simon Gomizelj simongmzlj at gmail.com
Wed Mar 6 12:51:44 EST 2013


Basically all translation messages that need colouring but _also_ happen
to be format strings need to be split up.

This makes it easy to conditionally embed colour codes into the output
at runtime.

Signed-off-by: Simon Gomizelj <simongmzlj at gmail.com>
---
 src/pacman/util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/pacman/util.c b/src/pacman/util.c
index 182450b..90892af 100644
--- a/src/pacman/util.c
+++ b/src/pacman/util.c
@@ -871,7 +871,7 @@ static void _display_targets(alpm_list_t *targets, int verbose)
 	}
 
 	/* print to screen */
-	pm_asprintf(&str, _("Packages (%zd):"), alpm_list_count(targets));
+	pm_asprintf(&str, "%s (%zd):", _("Packages"), alpm_list_count(targets));
 	printf("\n");
 
 	cols = getcols(fileno(stdout));
-- 
1.8.1.5



More information about the pacman-dev mailing list