Use edition style on table columns
authorMichael Andres <ma@suse.de>
Wed, 12 Sep 2012 11:47:33 +0000 (13:47 +0200)
committerMichael Andres <ma@suse.de>
Wed, 12 Sep 2012 12:03:14 +0000 (14:03 +0200)
- Fixes issue#11

src/search.cc
src/update.cc

index ef9d6ef..b77efe6 100644 (file)
@@ -56,7 +56,7 @@ FillSearchTableSolvable::FillSearchTableSolvable(
       // translators: name (general header)
       << _("Name")
       // translators: package version (header)
-      << _("Version")
+      << table::EditionStyleSetter( *_table, _("Version") )
       // translators: package architecture (header)
       << _("Arch");
   }
@@ -70,7 +70,7 @@ FillSearchTableSolvable::FillSearchTableSolvable(
       // translators: type (general header)
       << _("Type")
       // translators: package version (header)
-      << _("Version")
+      << table::EditionStyleSetter( *_table, _("Version") )
       // translators: package architecture (header)
       << _("Arch")
       // translators: package's repository (header)
@@ -353,7 +353,7 @@ FillPatchesTable::FillPatchesTable( Table & table, zypp::TriBool inst_notinst )
     // translators: catalog (rug's word for repository) (header)
     << _("Catalog")
     << _("Name")
-    << _("Version")
+    << table::EditionStyleSetter( *_table, ("Version") )
     // translators: patch category (recommended, security)
     << _("Category")
     // translators: patch status (installed, uninstalled, needed)
@@ -476,7 +476,7 @@ static void list_pattern_table(Zypper & zypper)
 
   // translators: S for installed Status
   th << _("S");
-  th << _("Name") << _("Version");
+  th << _("Name") << table::EditionStyleSetter( tbl, _("Version") );
   if (!zypper.globalOpts().is_rug_compatible)
     th << _("Repository") << _("Dependency");
   tbl << th;
@@ -540,7 +540,7 @@ void list_packages(Zypper & zypper)
     th << _("Bundle");
   else
     th << _("Repository");
-  th << _("Name") << _("Version") << _("Arch");
+  th << _("Name") << table::EditionStyleSetter( tbl, _("Version") ) << _("Arch");
   tbl << th;
 
   bool installed_only = zypper.cOpts().count("installed-only");
@@ -657,7 +657,7 @@ static void list_product_table(Zypper & zypper)
   // product whereas simply Name is the official full name of the product.
   th << _("Internal Name");
   th << _("Name");
-  th << _("Version");
+  th << table::EditionStyleSetter( tbl, _("Version") );
   if (zypper.globalOpts().is_rug_compatible)
      // translators: product category (base/addon), the rug term
      th << _("Category");
index 977926d..0c6fdde 100755 (executable)
@@ -258,7 +258,7 @@ static bool list_patch_updates(Zypper & zypper)
   unsigned cols;
 
   th << (zypper.globalOpts().is_rug_compatible ? _("Catalog") : _("Repository"))
-     << _("Name") << _("Version") << _("Category")<< _("Status") << _("Summary");
+     << _("Name") << table::EditionStyleSetter( tbl, _("Version") ) << _("Category") << _("Status") << _("Summary");
   cols = 6;
   tbl << th;
   pm_tbl << th;
@@ -497,8 +497,8 @@ void list_updates(Zypper & zypper, const ResKindSet & kinds, bool best_effort)
     if (!best_effort)
     {
       if (*it == ResKind::package)
-        th << _("Current Version");
-      th << _("Available Version") << _("Arch");
+        th << table::EditionStyleSetter( tbl, _("Current Version") );
+      th << table::EditionStyleSetter( tbl, _("Available Version") ) << _("Arch");
     }
 
     tbl << th;
@@ -677,7 +677,7 @@ void list_patches_by_issue(Zypper & zypper)
   // look for matches in patch descriptions
   Table t1;
   TableHeader th1;
-  th1 << _("Name") << _("Version") << _("Category") << _("Summary");
+  th1 << _("Name") << table::EditionStyleSetter( t1, _("Version") ) << _("Category") << _("Summary");
   t1 << th1;
   if (!issuesstr.empty())
   {