core: Canonicalize error descriptions
authorJens Georg <mail@jensge.org>
Sun, 12 Aug 2012 18:14:56 +0000 (20:14 +0200)
committerJens Georg <mail@jensge.org>
Sun, 12 Aug 2012 18:15:00 +0000 (20:15 +0200)
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=681452

src/librygel-renderer/rygel-av-transport.vala
src/librygel-renderer/rygel-rendering-control.vala

index 5f346fe..3f5e676 100644 (file)
@@ -212,7 +212,7 @@ internal class Rygel.AVTransport : Service {
         action.get ("InstanceID", typeof (string), out instance_id_string);
         if (instance_id_string == null ||
             !int64.try_parse (instance_id_string, out instance_id)) {
-            action.return_error (402, _("Invalid Args"));
+            action.return_error (402, _("Invalid argument"));
 
             return false;
         }
@@ -523,7 +523,7 @@ internal class Rygel.AVTransport : Service {
             debug ("Seeking to %s.", target);
 
             if (!this.player.seek (GstUtils.time_from_string (target))) {
-                action.return_error (710, _("Seek failed"));
+                action.return_error (710, _("Seek mode not supported"));
 
                 return;
             }
index 35ebce8..0c5e759 100644 (file)
@@ -120,7 +120,7 @@ internal class Rygel.RenderingControl : Service {
         action.get ("InstanceID", typeof (string), out instance_id_string);
         if (instance_id_string == null ||
             !int64.try_parse (instance_id_string, out instance_id)) {
-            action.return_error (402, _("Invalid Args"));
+            action.return_error (402, _("Invalid argument"));
 
             return false;
         }
@@ -207,7 +207,7 @@ internal class Rygel.RenderingControl : Service {
         string mute_str;
         action.get ("DesiredMute", typeof (string), out mute_str);
         if (mute_str.has_prefix ("-")) {
-            action.return_error (501, _("ActionFailed"));
+            action.return_error (501, _("Action Failed"));
 
             return;
         }
@@ -249,7 +249,7 @@ internal class Rygel.RenderingControl : Service {
         string volume_str;
         action.get ("DesiredVolume", typeof (string), out volume_str);
         if ("." in volume_str || "," in volume_str) {
-            action.return_error (501, _("ActionFailed"));
+            action.return_error (501, _("Action Failed"));
 
             return;
         }