[PackageKit-commit] packagekit: Branch 'master'

Richard Hughes hughsient at kemper.freedesktop.org
Sat Jan 31 03:50:46 PST 2009


 client/pk-console.c                     |   50 ++++++++++++++++++++++++--------
 client/pk-generate-pack.c               |    4 ++
 client/pk-monitor.c                     |    1 
 contrib/browser-plugin/src/contents.cpp |    2 -
 src/pk-main.c                           |   14 ++++++++
 5 files changed, 58 insertions(+), 13 deletions(-)

New commits:
commit 3395d0be6a4eca4c82d5db9aab43067507c3fe7f
Author: Richard Hughes <richard at hughsie.com>
Date:   Sat Jan 31 11:49:45 2009 +0000

    trivial: add another truckload of translator comments

diff --git a/client/pk-console.c b/client/pk-console.c
index e1732ab..fef0a17 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -313,6 +313,7 @@ pk_console_category_cb (PkClient *client, const PkCategoryObj *obj, gpointer use
 		/* TRANSLATORS: this is the parent group */
 		g_print (" %s: %s\n", _("Parent"), obj->parent_id);
 	}
+	/* TRANSLATORS: this is the name of the parent group */
 	g_print (" %s: %s\n", _("Name"), obj->name);
 	if (!egg_strzero (obj->summary)) {
 		/* TRANSLATORS: this is the summary of the group */
@@ -335,31 +336,54 @@ pk_console_update_detail_cb (PkClient *client, const PkUpdateDetailObj *detail,
 		g_print ("\n");
 	/* TRANSLATORS: this is a header for the package that can be updated */
 	g_print ("%s\n", _("Details about the update:"));
+	/* TRANSLATORS: details about the update, package name and version */
 	g_print (" %s: '%s-%s.%s'\n", _("Package"), detail->id->name, detail->id->version, detail->id->arch);
-	if (!egg_strzero (detail->updates))
+	if (!egg_strzero (detail->updates)) {
+		/* TRANSLATORS: details about the update, any packages that this update updates */
 		g_print (" %s: %s\n", _("Updates"), detail->updates);
-	if (!egg_strzero (detail->obsoletes))
+	}
+	if (!egg_strzero (detail->obsoletes)) {
+		/* TRANSLATORS: details about the update, any packages that this update obsoletes */
 		g_print (" %s: %s\n", _("Obsoletes"), detail->obsoletes);
-	if (!egg_strzero (detail->vendor_url))
+	}
+	if (!egg_strzero (detail->vendor_url)) {
+		/* TRANSLATORS: details about the update, the vendor URLs */
 		g_print (" %s: %s\n", _("Vendor"), detail->vendor_url);
-	if (!egg_strzero (detail->bugzilla_url))
+	}
+	if (!egg_strzero (detail->bugzilla_url)) {
+		/* TRANSLATORS: details about the update, the bugzilla URLs */
 		g_print (" %s: %s\n", _("Bugzilla"), detail->bugzilla_url);
-	if (!egg_strzero (detail->cve_url))
+	}
+	if (!egg_strzero (detail->cve_url)) {
+		/* TRANSLATORS: details about the update, the CVE URLs */
 		g_print (" %s: %s\n", _("CVE"), detail->cve_url);
-	if (detail->restart != PK_RESTART_ENUM_NONE)
+	}
+	if (detail->restart != PK_RESTART_ENUM_NONE) {
+		/* TRANSLATORS: details about the update, if the package requires a restart */
 		g_print (" %s: %s\n", _("Restart"), pk_restart_enum_to_text (detail->restart));
-	if (!egg_strzero (detail->update_text))
+	}
+	if (!egg_strzero (detail->update_text)) {
+		/* TRANSLATORS: details about the update, any description of the update */
 		g_print (" %s: %s\n", _("Update text"), detail->update_text);
-	if (!egg_strzero (detail->changelog))
+	}
+	if (!egg_strzero (detail->changelog)) {
+		/* TRANSLATORS: details about the update, the changelog for the package */
 		g_print (" %s: %s\n", _("Changes"), detail->changelog);
-	if (detail->state != PK_UPDATE_STATE_ENUM_UNKNOWN)
+	}
+	if (detail->state != PK_UPDATE_STATE_ENUM_UNKNOWN) {
+		/* TRANSLATORS: details about the update, the ongoing state of the update */
 		g_print (" %s: %s\n", _("State"), pk_update_state_enum_to_text (detail->state));
+	}
 	issued = pk_iso8601_from_date (detail->issued);
-	if (!egg_strzero (issued))
+	if (!egg_strzero (issued)) {
+		/* TRANSLATORS: details about the update, date the update was issued */
 		g_print (" %s: %s\n", _("Issued"), issued);
+	}
 	updated = pk_iso8601_from_date (detail->updated);
-	if (!egg_strzero (updated))
+	if (!egg_strzero (updated)) {
+		/* TRANSLATORS: details about the update, date the update was updated */
 		g_print (" %s: %s\n", _("Updated"), updated);
+	}
 	g_free (issued);
 	g_free (updated);
 }
@@ -1631,7 +1655,9 @@ pk_console_get_summary (void)
 	string = g_string_new ("");
 
 	/* TRANSLATORS: This is the header to the --help menu */
-	g_string_append_printf (string, "%s\n\n%s\n", _("PackageKit Console Interface"), _("Subcommands:"));
+	g_string_append_printf (string, "%s\n\n%s\n", _("PackageKit Console Interface"),
+				/* these are commands we can use with pkcon */
+				_("Subcommands:"));
 
 	/* always */
 	g_string_append_printf (string, "  %s\n", "get-actions");
diff --git a/client/pk-generate-pack.c b/client/pk-generate-pack.c
index 01a5f69..345cb44 100644
--- a/client/pk-generate-pack.c
+++ b/client/pk-generate-pack.c
@@ -184,12 +184,16 @@ main (int argc, char *argv[])
 		{ "verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose,
 			_("Show extra debugging information"), NULL },
 		{ "with-package-list", 'l', 0, G_OPTION_ARG_STRING, &package_list,
+			/* TRANSLATORS: we can exclude certain packages (glibc) when we know they'll exist on the target */
 			_("Set the file name of dependencies to be excluded"), NULL},
 		{ "output", 'o', 0, G_OPTION_ARG_STRING, &directory,
+			/* TRANSLATORS: the output location */
 			_("The output file or directory (the current directory is used if ommitted)"), NULL},
 		{ "package", 'p', 0, G_OPTION_ARG_STRING, &package,
+			/* TRANSLATORS: put a list of packages in the pack */
 			_("The package to be put into the service pack"), NULL},
 		{ "updates", 'u', 0, G_OPTION_ARG_NONE, &updates,
+			/* TRANSLATORS: put all pending updates in the pack */
 			_("Put all updates available in the service pack"), NULL},
 		{ NULL}
 	};
diff --git a/client/pk-monitor.c b/client/pk-monitor.c
index 16a31c6..c111644 100644
--- a/client/pk-monitor.c
+++ b/client/pk-monitor.c
@@ -129,6 +129,7 @@ main (int argc, char *argv[])
 	g_type_init ();
 
 	context = g_option_context_new (NULL);
+	/* TRANSLATORS: this is a program that monitors PackageKit */
 	g_option_context_set_summary (context, _("PackageKit Monitor"));
 	g_option_context_add_main_entries (context, options, NULL);
 	g_option_context_parse (context, &argc, &argv, NULL);
diff --git a/contrib/browser-plugin/src/contents.cpp b/contrib/browser-plugin/src/contents.cpp
index 39a3515..f42b931 100644
--- a/contrib/browser-plugin/src/contents.cpp
+++ b/contrib/browser-plugin/src/contents.cpp
@@ -318,9 +318,9 @@ PkpContents::ensureLayout(cairo_t *cr, PangoFontDescription *font_desc, guint32
 				append_markup(markup, _("Run version %s now"), mInstalledVersion.c_str());
 				append_markup(markup, "</span>");
 			} else {
-				/* TRANSLATORS: run the application now */
 				append_markup(markup,
 				              "\n<span color='#%06x' underline='single'>%s</span>",
+					      /* TRANSLATORS: run the application now */
 					      _("Run now"), link_color >> 8);
 		        }
 		}
diff --git a/src/pk-main.c b/src/pk-main.c
index b6a3a5b..144d191 100644
--- a/src/pk-main.c
+++ b/src/pk-main.c
@@ -83,9 +83,13 @@ pk_object_register (DBusGConnection *connection, GObject *object, GError **error
 		egg_warning ("RequestName failed!");
 		g_clear_error (error);
 		message = g_strdup_printf ("%s\n%s\n* %s\n* %s '%s'\n",
+					   /* TRANSLATORS: failed due to DBus security */
 					   _("Startup failed due to security policies on this machine."),
+					   /* TRANSLATORS: only two ways this can fail... */
 					   _("This can happen for two reasons:"),
+					   /* TRANSLATORS: only allowed to be owned by root */
 					   _("The correct user is not launching the executable (usually root)"),
+					   /* TRANSLATORS: or we are installed in a prefix */
 					   _("The org.freedesktop.PackageKit.conf file is not "
 					     "installed in the system directory:"),
 					     "/etc/dbus-1/system.d");
@@ -185,18 +189,25 @@ main (int argc, char *argv[])
 
 	const GOptionEntry options[] = {
 		{ "backend", '\0', 0, G_OPTION_ARG_STRING, &backend_name,
+		  /* TRANSLATORS: a backend is the system package tool, e.g. yum, apt */
 		  _("Packaging backend to use, e.g. dummy"), NULL },
 		{ "daemonize", '\0', 0, G_OPTION_ARG_NONE, &use_daemon,
+		  /* TRANSLATORS: if we should run in the background */
 		  _("Daemonize and detach from the terminal"), NULL },
 		{ "verbose", '\0', 0, G_OPTION_ARG_NONE, &verbose,
+		  /* TRANSLATORS: if we should show debugging data */
 		  _("Show extra debugging information"), NULL },
 		{ "disable-timer", '\0', 0, G_OPTION_ARG_NONE, &disable_timer,
+		  /* TRANSLATORS: if we should not monitor how long we are inactive for */
 		  _("Disable the idle timer"), NULL },
 		{ "version", '\0', 0, G_OPTION_ARG_NONE, &version,
+		  /* TRANSLATORS: show version */
 		  _("Show version and exit"), NULL },
 		{ "timed-exit", '\0', 0, G_OPTION_ARG_NONE, &timed_exit,
+		  /* TRANSLATORS: exit after we've started up, used for user profiling */
 		  _("Exit after a small delay"), NULL },
 		{ "immediate-exit", '\0', 0, G_OPTION_ARG_NONE, &immediate_exit,
+		  /* TRANSLATORS: exit straight away, used for automatic profiling */
 		  _("Exit after the engine has loaded"), NULL },
 		{ NULL}
 	};
@@ -211,6 +222,7 @@ main (int argc, char *argv[])
 	dbus_g_thread_init ();
 	g_type_init ();
 
+	/* TRANSLATORS: describing the service that is running */
 	context = g_option_context_new (_("PackageKit service"));
 	g_option_context_add_main_entries (context, options, NULL);
 	g_option_context_parse (context, &argc, &argv, NULL);
@@ -247,6 +259,7 @@ main (int argc, char *argv[])
 	/* check dbus connections, exit if not valid */
 	system_connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
 	if (error) {
+		/* TRANSLATORS: fatal error, dbus is not running */
 		g_print ("%s: %s\n", _("Cannot connect to the system bus"), error->message);
 		g_error_free (error);
 		goto exit_program;
@@ -296,6 +309,7 @@ main (int argc, char *argv[])
 	engine = pk_engine_new ();
 
 	if (!pk_object_register (system_connection, G_OBJECT (engine), &error)) {
+		/* TRANSLATORS: cannot register on system bus, unknown reason */
 		g_print (_("Error trying to start: %s\n"), error->message);
 		g_error_free (error);
 		goto out;


More information about the PackageKit-commit mailing list