Просмотр исходного кода

u-a: Do not build strings from parts in alternative_check_install_args

This makes the work of translators harder.
Guillem Jover лет назад: 15
Родитель
Сommit
89973c5bb9
1 измененных файлов с 7 добавлено и 7 удалено
  1. 7 7
      utils/update-alternatives.c

+ 7 - 7
utils/update-alternatives.c

@@ -2147,15 +2147,15 @@ alternative_check_install_args(struct alternative *inst_alt,
 		found = alternative_map_find(alt_map_parent, sl->name);
 		if (found &&
 		    strcmp(found->master_name, inst_alt->master_name) != 0) {
-			char *msg;
-
 			if (strcmp(found->master_name, sl->name) == 0)
-				msg = _("it is a master alternative.");
+				error(_("alternative %s can't be slave of %s: "
+				        "it is a master alternative."),
+				      sl->name, inst_alt->master_name);
 			else
-				xasprintf(&msg, _("it is a slave of %s"),
-				          found->master_name);
-			error(_("alternative %s can't be slave of %s: %s"),
-			      sl->name, inst_alt->master_name, msg);
+				error(_("alternative %s can't be slave of %s: "
+				        "it is a slave of %s"),
+				      sl->name, inst_alt->master_name,
+				      found->master_name);
 		}
 
 		found = alternative_map_find(alt_map_links, sl->link);