if (item_class == null) {
item_class = MediaItem.AUDIO_CLASS;
- warning (_("Failed to detect UPnP class for '%s'," +
- " assuming it's '%s'"),
+ warning (_("Failed to detect UPnP class for '%s', assuming '%s'"),
file.get_uri (),
item_class);
}
out duration)) {
class_guessed = MediaItem.VIDEO_CLASS;
} else {
- warning(_("There's no codec inside and file" +
- " is no image: %s"),
+ warning(_("File '%s' is of unknown format/type."),
file.get_uri ());
return null;
}
this.harvest (file, parent_container);
} catch (Rygel.DatabaseError error) {
- warning (_("Error while getting parent container for " +
- "filesystem event: %s"),
+ warning (_("Error fetching object '%s' from database: %s"),
+ id,
error.message);
}
break;
}
else {
throw new MediathekAsxPlaylistError.NETWORK_ERROR (
- _("Could not download playlist: " +
- ", error code was %u (%s)"),
+ _("Playlist download failed: %u (%s)"),
message.status_code,
Soup.status_get_phrase (
message.status_code));
}
if (feeds.size == 0) {
- message (_("Could not get RSS items from configuration," +
- " using defaults"));
+ message (_("Could not get RSS from configuration, using defaults"));
feeds.add (508);
}
}
}
else {
- throw new MediathekVideoItemError.XML_PARSE_ERROR (
- _("Invalid or no namespace" +
- " on group node"));
+ var msg = _("Invalid or no namespace on group node");
+
+ throw new MediathekVideoItemError.XML_PARSE_ERROR (msg);
}
break;
default:
}
if (title == null) {
- throw new MediathekVideoItemError.XML_PARSE_ERROR (_("Could not " +
- "find title"));
+ throw new MediathekVideoItemError.XML_PARSE_ERROR (
+ _("Could not find title"));
}
if (asx == null) {
- throw new MediathekVideoItemError.XML_PARSE_ERROR (_("Could not " +
- "find uris"));
+ throw new MediathekVideoItemError.XML_PARSE_ERROR (
+ _("Could not find URIs"));
}
video_item = new MediathekVideoItem (parent, title);
try {
plugin_factory = new TrackerPluginFactory (loader);
} catch (DBus.Error err) {
- warning (_("Failed to start Tracker service: ") +
- err.message +
- _(". Tracker plugin disabled."));
+ warning (_("Failed to start Tracker service: %s. Plugin disabled.") +
+ err.message);
}
}
debug (_("Using database file %s"), db_file);
var rc = Sqlite.Database.open (db_file, out this.db);
if (rc != Sqlite.OK) {
- throw new DatabaseError.IO_ERROR (_("Failed to open database: " +
- "%d (%s)"),
- rc,
- db.errmsg ());
+ throw new DatabaseError.IO_ERROR (
+ _("Failed to open database: %d (%s)"),
+ rc,
+ db.errmsg ());
}
this.db.exec ("PRAGMA cache_size = 32768");
(uint) 0);
if (request_name_result != DBus.RequestNameReply.PRIMARY_OWNER) {
- warning (_("Failed to start D-Bus service," +
- " name '%s' already taken"),
+ warning ("Failed to start D-Bus service name '%s' already taken",
RYGEL_SERVICE);
} else {
conn.register_object (RYGEL_PATH, this);
throws Error {
Element element = ElementFactory.make (factoryname, name);
if (element == null) {
- throw new GstError.MISSING_PLUGIN (_("Required element factory" +
- " %s missing"),
- factoryname);
+ throw new GstError.MISSING_PLUGIN (
+ _("Required element %s missing"),
+ factoryname);
}
return element;
request.msg.response_headers.append ("contentFeatures.dlna.org",
tokens[3]);
} catch (Error err) {
- warning (_("Received request for 'contentFeatures.dlna.org' but " +
- "failed to provide the value in response headers"));
+ warning ("Received request for 'contentFeatures.dlna.org' but " +
+ "failed to provide the value in response headers");
}
// Handle Samsung DLNA TV proprietary subtitle headers
this.cancellable);
} else {
if (item.uris.size == 0) {
- throw new HTTPRequestError.NOT_FOUND (_("Requested item '%s' " +
- "didn't provide a URI"),
- item.id);
+ throw new HTTPRequestError.NOT_FOUND (
+ _("Item '%s' didn't provide a URI"),
+ item.id);
}
return new SeekableResponse (request.server,
});
this.didl_parser.parse_didl (this.elements);
if (this.didl_item == null) {
- throw new ItemCreatorError.PARSE (
- _("Failed to find any item in " +
- "DIDL-Lite from client: '%s'"),
- this.elements);
+ var message = _("No items in DIDL-Lite from client: '%s'");
+
+ throw new ItemCreatorError.PARSE (message, this.elements);
}
this.item = new MediaItem (didl_item.id,
dynamic Element sink = ElementFactory.make ("fakesink", SINK_NAME);
if (sink == null) {
- throw new GstError.MISSING_PLUGIN (_("Required plugin " +
- "'fakesink' missing"));
+ throw new GstError.MISSING_PLUGIN (_("Plugin 'fakesink' missing"));
}
sink.signal_handoffs = true;
} catch (Error err) {
this.levels = DEFAULT_LEVELS;
- warning (_("Failed to get log level from" +
- " configuration sources: %s"),
+ warning (_("Failed to get log level from configuration: %s"),
err.message);
}
throws DatabaseError, MediaDBError {
var object = get_object (item_id);
if (object != null && !(object is MediaItem)) {
- throw new MediaDBError.INVALID_TYPE (_("Object with id %s is not" +
- " a MediaItem"),
+ throw new MediaDBError.INVALID_TYPE (_("Object %s is not an item"),
item_id);
}
}
if (unavailable) {
- throw new ConfigurationError.NO_VALUE_SET (_("No value available" +
- " for '%s/enabled'"),
- section);
+ throw new ConfigurationError.NO_VALUE_SET (
+ _("No value set for '%s/enabled'"),
+ section);
}
return val;
}
if (val == null) {
- throw new ConfigurationError.NO_VALUE_SET (_("No value available" +
- " for '%s/enabled'"),
- section);
+ throw new ConfigurationError.NO_VALUE_SET (
+ _("No value set for '%s/enabled'"),
+ section);
}
return val;
if (factory != null) {
debug (_("Using playbin"));
} else {
- critical (_("Could not find any playbin. " +
- "Please check your gstreamer setup"));
+ critical (_("Could not find any playbin. ") +
+ _("Please check your gstreamer setup"));
return null;
}
}
this.file_queue.peek_head ().get_uri ());
this.playbin.set_state (State.NULL);
+ var message = _("Pipeline stuck while reading file info");
this.error (file_queue.peek_head (),
- new IOChannelError.FAILED (_("Pipeline stuck while" +
- " reading file info")));
+ new IOChannelError.FAILED (message));
this.file_queue.pop_head ();
extract_next ();
return false;
encoder.link (this.muxer);
if (new_pad.link (enc_pad) != PadLinkReturn.OK) {
- GstUtils.post_error (this,
- new GstError.LINK (_("Failed to link pad" +
- " %s to %s"),
- new_pad.name,
- enc_pad.name));
- return;
+ var error = new GstError.LINK (_("Failed to link pad %s to %s"),
+ new_pad.name,
+ enc_pad.name);
+ GstUtils.post_error (this, error);
}
}
}
}
if (new_pad.link (enc_pad) != PadLinkReturn.OK) {
- GstUtils.post_error (this,
- new GstError.LINK (_("Failed to link pad" +
- "%s to %s"),
- new_pad.name,
- enc_pad.name));
+ var error = new GstError.LINK (_("Failed to link pad %s to %s"),
+ new_pad.name,
+ enc_pad.name);
+ GstUtils.post_error (this, error);
+
return;
}
}
void* function;
if (!module.symbol("module_init", out function)) {
- warning (_("Failed to find entry point function 'module_init'" +
- " in module loaded from path '%s': %s"),
+ warning (_("Failed to find entry point function '%s' in '%s': %s"),
+ "module_init",
file_path,
Module.error ());
res = doc.doc.dump (f);
if (f == null || res == -1) {
- string message = _("Failed to write modified description" +
- " to %s.\n").printf (desc_path);
+ var message = _("Failed to write modified description to %s");
- throw new IOError.FAILED (message);
+ throw new IOError.FAILED (message, desc_path);
}
}
out this.total_matches,
this.cancellable);
if (results.size == 0) {
- throw new ContentDirectoryError.CANT_PROCESS (
- _("No objects found that could " +
- "satisfy given search criteria."));
+ var message = _("No object satisfies given search criteria.");
+
+ throw new ContentDirectoryError.CANT_PROCESS (message);
}
this.number_returned = results.size;
file = File.new_for_path (dir);
if (!file.query_exists (null)) {
- throw new ThumbnailerError.NO_DIR (_("Failed to find " +
- "thumbnails directory."));
+ var message = _("Failed to find thumbnails directory.");
+
+ throw new ThumbnailerError.NO_DIR (message);
} else {
this.template.mime_type = "image/png";
this.template.dlna_profile = "PNG_TN";
var val = this.key_file.get_string (section, key);
if (val == null || val == "") {
- throw new ConfigurationError.NO_VALUE_SET (_("No value available" +
- " for '%s'"),
- key);
+ throw new ConfigurationError.NO_VALUE_SET (
+ _("No value available for '%s'"),
+ key);
}
return val;
int val = this.key_file.get_integer (section, key);
if (val == 0 || val < min || val > max) {
- throw new ConfigurationError.VALUE_OUT_OF_RANGE (_("Value of '%s'" +
- " out of range"),
- key);
+ throw new ConfigurationError.VALUE_OUT_OF_RANGE (
+ _("Value of '%s' out of range"),
+ key);
}
return val;
}
if (new_pad.link (enc_pad) != PadLinkReturn.OK) {
- GstUtils.post_error (this,
- new GstError.LINK (_("Failed to link pad" +
- " %s to %s"),
- new_pad.name,
- enc_pad.name));
+ var error = new GstError.LINK (_("Failed to link pad %s to %s"),
+ new_pad.name,
+ enc_pad.name);
+ GstUtils.post_error (this, error);
+
return;
}
}
encoder.link (this.muxer);
if (new_pad.link (enc_pad) != PadLinkReturn.OK) {
- GstUtils.post_error (this,
- new GstError.LINK (_("Failed to link pad" +
- " %s to %s"),
- new_pad.name,
- enc_pad.name));
- return;
+ var error = new GstError.LINK (_("Failed to link pad %s to %s"),
+ new_pad.name,
+ enc_pad.name);
+ GstUtils.post_error (this, error);
}
}
}
res = doc.doc.dump (f);
if (f == null || res == -1) {
- throw new IOError.FAILED (_("Failed to write modified" +
- " description to %s."),
- desc_path);
+ var message = _("Failed to write modified description to %s.");
+ throw new IOError.FAILED (message, desc_path);
}
}
}