[Openvas-commits] r1572 - in trunk/openvas-client: . nessus

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Oct 20 09:15:05 CEST 2008


Author: felix
Date: 2008-10-20 09:15:03 +0200 (Mon, 20 Oct 2008)
New Revision: 1572

Modified:
   trunk/openvas-client/ChangeLog
   trunk/openvas-client/nessus/comm.c
Log:
* nessus/commc.c (fetch_new_plugins, fetch_new_plugins): Changed strings
displayed to the user in case of new plugins, to allow easier
translations.

M    openvas-client/nessus/comm.c
M    openvas-client/ChangeLog


Modified: trunk/openvas-client/ChangeLog
===================================================================
--- trunk/openvas-client/ChangeLog	2008-10-20 06:53:57 UTC (rev 1571)
+++ trunk/openvas-client/ChangeLog	2008-10-20 07:15:03 UTC (rev 1572)
@@ -1,3 +1,9 @@
+2008-10-20  Felix Wolfsteller <felix.wolfsteller at intevation.de>
+
+	* nessus/commc.c (fetch_new_plugins, fetch_new_plugins): Changed strings
+	displayed to the user in case of new plugins, to allow easier
+	translations.
+
 2008-10-17  Michael Wiegand <michael.wiegand at intevation.de>
 
 	* nessus/xml_output_ng.c (xml_results_result_ports): Changed backend

Modified: trunk/openvas-client/nessus/comm.c
===================================================================
--- trunk/openvas-client/nessus/comm.c	2008-10-20 06:53:57 UTC (rev 1571)
+++ trunk/openvas-client/nessus/comm.c	2008-10-20 07:15:03 UTC (rev 1572)
@@ -1092,16 +1092,27 @@
     }
   }
   
- /* Show the user the number of new plugins, if any. Also indicate whether 
-  * they have been enabled (auto_enable_new_plugins option in server_prefs)  */
+  /* Show the user the number of new plugins, if any. Also indicate whether 
+   * they have been enabled (auto_enable_new_plugins option in context prefs).
+   * For easier translation 4 strings (auto_enable*number) */
   if(n_new_plugins > 0)
-  {
+    {
     int auto_enabled = prefs_get_int(context, "auto_enable_new_plugins");
-    show_info(_("Found and %s %d new %s."),
-                (auto_enabled)?_("enabled"):_("disabled"),
-                n_new_plugins,
-                (n_new_plugins == 1) ? _("plugin"):_("plugins"));
-  }
+    if(n_new_plugins == 1)
+      {
+      if(auto_enabled)
+        show_info(_("Found and enabled one new plugin."));
+      else
+        show_info(_("Found and disabled one new plugin."));
+      }
+    else /* more than one, use linguistic plural*/
+      {
+      if(auto_enabled)
+        show_info(_("Found and enabled %d new plugins."), n_new_plugins);
+      else
+        show_info(_("Found and disabled %d new plugins."), n_new_plugins);
+      }
+    }
 
   return 0;
 }
@@ -1285,15 +1296,26 @@
     context_force_plugin_prefs_redraw(context);
   }
   
- /* Show the user the number of new plugins, if any. Also indicate whether 
-  * they have been enabled (auto_enable_new_plugins option in server_prefs)  */
+  /* Show the user the number of new plugins, if any. Also indicate whether 
+   * they have been enabled (auto_enable_new_plugins option in context prefs).
+   * For easier translation 4 strings (auto_enable*number) */
   if(n_new_plugins > 0)
     {
     int auto_enabled = prefs_get_int(context, "auto_enable_new_plugins");
-    show_info(_("Found and %s %d new %s."),
-                (auto_enabled)?_("enabled"):_("disabled"),
-                n_new_plugins,
-                (n_new_plugins == 1) ? _("plugin"):_("plugins"));
+    if(n_new_plugins == 1)
+      {
+      if(auto_enabled)
+        show_info(_("Found and enabled one new plugin."));
+      else
+        show_info(_("Found and disabled one new plugin."));
+      }
+    else /* more than one, use linguistic plural*/
+      {
+      if(auto_enabled)
+        show_info(_("Found and enabled %d new plugins."), n_new_plugins);
+      else
+        show_info(_("Found and disabled %d new plugins."), n_new_plugins);
+      }
     }
 
  fail:



More information about the Openvas-commits mailing list