Преглед изворни кода

u-a: Inline alternative status description into translatable string

This makes it possible to correctly translate the string.

Required-by: #766311
Guillem Jover пре 11 година
родитељ
комит
26a5f85e7b
2 измењених фајлова са 8 додато и 3 уклоњено
  1. 2 0
      debian/changelog
  2. 6 3
      utils/update-alternatives.c

+ 2 - 0
debian/changelog

@@ -12,6 +12,8 @@ dpkg (1.17.20) UNRELEASED; urgency=low
   * Allow detached upstream signatures for upstream orig.tar files in the
     .dsc file. Suggested by Daniel Kahn Gillmor <dkg@fifthhorseman.net>.
     Closes: #759478
+  * Inline alternative status description into translatable string in
+    update-alternatives. Required-by: #766311
 
   [ Updated programs translations ]
   * German (Sven Joachim).

+ 6 - 3
utils/update-alternatives.c

@@ -2331,9 +2331,12 @@ alternative_update(struct alternative *a,
 	    (!current_choice || strcmp(new_choice, current_choice) != 0)) {
 		log_msg("link group %s updated to point to %s", a->master_name,
 		        new_choice);
-		info(_("using %s to provide %s (%s) in %s"), new_choice,
-		     a->master_link, a->master_name,
-		     alternative_status_describe(a->status));
+		if (a->status == ALT_ST_AUTO)
+			info(_("using %s to provide %s (%s) in auto mode"),
+			     new_choice, a->master_link, a->master_name);
+		else
+			info(_("using %s to provide %s (%s) in manual mode"),
+			     new_choice, a->master_link, a->master_name);
 		debug("prepare_install(%s)", new_choice);
 		alternative_prepare_install(a, new_choice);
 	} else if ((reason = alternative_needs_update(a))) {