[rygel] i18n: Several string and comment fixes
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] i18n: Several string and comment fixes
- Date: Sat, 13 Apr 2013 12:02:36 +0000 (UTC)
commit e937ea4d5d4de621b2e361dcf4629ff1ef9c424a
Author: Jens Georg <jensg openismus com>
Date: Sat Apr 13 14:02:13 2013 +0200
i18n: Several string and comment fixes
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=695593
src/librygel-core/rygel-meta-config.vala | 18 ++++----
src/librygel-renderer/rygel-media-renderer.vala | 2 +-
src/librygel-server/rygel-http-post.vala | 2 +-
src/librygel-server/rygel-media-server.vala | 2 +-
src/librygel-server/rygel-object-creator.vala | 48 +++++++++-------------
src/librygel-server/rygel-reference-creator.vala | 6 +--
.../rygel-tracker-category-all-container.vala | 4 +-
src/plugins/tracker/rygel-tracker-plugin.vala | 3 +-
src/rygel/rygel-user-config.vala | 3 +-
9 files changed, 37 insertions(+), 51 deletions(-)
---
diff --git a/src/librygel-core/rygel-meta-config.vala b/src/librygel-core/rygel-meta-config.vala
index 1ea67b7..88d07e8 100644
--- a/src/librygel-core/rygel-meta-config.vala
+++ b/src/librygel-core/rygel-meta-config.vala
@@ -219,7 +219,7 @@ public class Rygel.MetaConfig : GLib.Object, Configuration {
}
if (unavailable) {
- throw new ConfigurationError.NO_VALUE_SET ("No value available");
+ throw new ConfigurationError.NO_VALUE_SET (_("No value available"));
}
return val;
@@ -238,7 +238,7 @@ public class Rygel.MetaConfig : GLib.Object, Configuration {
}
if (unavailable) {
- throw new ConfigurationError.NO_VALUE_SET ("No value available");
+ throw new ConfigurationError.NO_VALUE_SET (_("No value available"));
}
return val;
@@ -257,7 +257,7 @@ public class Rygel.MetaConfig : GLib.Object, Configuration {
}
if (unavailable) {
- throw new ConfigurationError.NO_VALUE_SET ("No value available");
+ throw new ConfigurationError.NO_VALUE_SET (_("No value available"));
}
return val;
@@ -320,9 +320,9 @@ public class Rygel.MetaConfig : GLib.Object, Configuration {
}
if (unavailable) {
- throw new ConfigurationError.NO_VALUE_SET
- (_("No value set for '%s/enabled'"),
- section);
+ // translators: "enabled" is part of the config key and must not be translated
+ var msg = _("No value set for '%s/enabled'");
+ throw new ConfigurationError.NO_VALUE_SET (msg, section);
}
return val;
@@ -339,9 +339,9 @@ public class Rygel.MetaConfig : GLib.Object, Configuration {
}
if (val == null) {
- throw new ConfigurationError.NO_VALUE_SET
- (_("No value set for '%s/title'"),
- section);
+ // translators: "title" is part of the config key and must not be translated
+ var msg = _("No value set for '%s/title'");
+ throw new ConfigurationError.NO_VALUE_SET (msg, section);
}
return val;
diff --git a/src/librygel-renderer/rygel-media-renderer.vala b/src/librygel-renderer/rygel-media-renderer.vala
index 3e1fbb9..fb2b492 100644
--- a/src/librygel-renderer/rygel-media-renderer.vala
+++ b/src/librygel-renderer/rygel-media-renderer.vala
@@ -24,7 +24,7 @@ internal class Plugin : Rygel.MediaRendererPlugin {
public Plugin (Rygel.MediaPlayer player,
Rygel.PluginCapabilities capabilities) {
- base ("LibRygelRenderer", _("LibRygelRenderer"), null, capabilities);
+ base ("LibRygelRenderer", "LibRygelRenderer", null, capabilities);
this.player = player;
}
diff --git a/src/librygel-server/rygel-http-post.vala b/src/librygel-server/rygel-http-post.vala
index 7a0a34d..0e5e96c 100644
--- a/src/librygel-server/rygel-http-post.vala
+++ b/src/librygel-server/rygel-http-post.vala
@@ -173,7 +173,7 @@ internal class Rygel.HTTPPost : HTTPRequest {
this.server.pause_message (this.msg);
debug ("Waiting for update signal from container '%s' after pushing" +
- " content to its child item '%s'..",
+ " content to its child item '%s'…",
this.object.parent.id,
this.object.id);
diff --git a/src/librygel-server/rygel-media-server.vala b/src/librygel-server/rygel-media-server.vala
index 87da331..1a38719 100644
--- a/src/librygel-server/rygel-media-server.vala
+++ b/src/librygel-server/rygel-media-server.vala
@@ -22,7 +22,7 @@
internal class Plugin : Rygel.MediaServerPlugin {
public Plugin (Rygel.MediaContainer root_container,
Rygel.PluginCapabilities capabilities) {
- base (root_container, _("LibRygelServer"), null, capabilities);
+ base (root_container, "LibRygelServer", null, capabilities);
}
}
diff --git a/src/librygel-server/rygel-object-creator.vala b/src/librygel-server/rygel-object-creator.vala
index 09dad92..72eceb0 100644
--- a/src/librygel-server/rygel-object-creator.vala
+++ b/src/librygel-server/rygel-object-creator.vala
@@ -216,23 +216,20 @@ internal class Rygel.ObjectCreator: GLib.Object, Rygel.StateMachine {
}
if (this.didl_object == null) {
- // FIXME: Change to object after string freeze
- var message = _("No items in DIDL-Lite from client: '%s'");
+ var message = _("No objects in DIDL-Lite from client: '%s'");
throw new ContentDirectoryError.BAD_METADATA
(message, this.elements);
}
if (didl_object.id == null || didl_object.id != "") {
- throw new ContentDirectoryError.BAD_METADATA
- ("@id must be set to \"\" in " +
- "CreateItem");
+ var msg = _("@id must be set to \"\" in CreateObject call");
+ throw new ContentDirectoryError.BAD_METADATA (msg);
}
if (didl_object.title == null) {
- throw new ContentDirectoryError.BAD_METADATA
- ("dc:title must be set in " +
- "CreateItem");
+ var msg = _("dc:title must not be empty in CreateObject call");
+ throw new ContentDirectoryError.BAD_METADATA (msg);
}
// FIXME: Is this check really necessary? 7.3.118.4 passes without it.
@@ -242,21 +239,20 @@ internal class Rygel.ObjectCreator: GLib.Object, Rygel.StateMachine {
(OCMFlags.UPLOAD |
OCMFlags.CREATE_CONTAINER |
OCMFlags.UPLOAD_DESTROYABLE)) != 0)) {
- throw new ContentDirectoryError.BAD_METADATA
- ("Flags that must not be set " +
- "were found in 'dlnaManaged'");
+ var msg = _("Flags that must not be set were found in 'dlnaManaged'");
+ throw new ContentDirectoryError.BAD_METADATA (msg);
}
if (didl_object.upnp_class == null ||
didl_object.upnp_class == "" ||
!didl_object.upnp_class.has_prefix ("object")) {
throw new ContentDirectoryError.BAD_METADATA
- ("Invalid upnp:class given ");
+ (_("Invalid upnp:class given in CreateObject"));
}
if (didl_object.restricted) {
throw new ContentDirectoryError.INVALID_ARGS
- ("Cannot create restricted item");
+ (_("Cannot create restricted item"));
}
}
@@ -320,9 +316,8 @@ internal class Rygel.ObjectCreator: GLib.Object, Rygel.StateMachine {
}
if (upnp_class == "object") {
- // FIXME: Mark translatable.
throw new ContentDirectoryError.BAD_METADATA
- ("'%s' UPnP class unsupported",
+ (_("UPnP class '%s' not supported"),
this.didl_object.upnp_class);
}
@@ -457,9 +452,9 @@ internal class Rygel.ObjectCreator: GLib.Object, Rygel.StateMachine {
if (info != null) {
if (info.dlna_profile != null) {
if (!this.is_profile_valid (info.dlna_profile)) {
- // FIXME: Missing translation
+ var msg = _("DLNA profile '%s' not supported");
throw new ContentDirectoryError.BAD_METADATA
- ("'%s' DLNA profile unsupported",
+ (msg,
info.dlna_profile);
}
@@ -515,7 +510,7 @@ internal class Rygel.ObjectCreator: GLib.Object, Rygel.StateMachine {
out month,
out day) != 3) {
throw new ContentDirectoryError.BAD_METADATA
- ("Invalid date format: %s",
+ (_("Invalid date format: %s"),
didl_item.date);
}
@@ -523,9 +518,8 @@ internal class Rygel.ObjectCreator: GLib.Object, Rygel.StateMachine {
date.set_dmy ((DateDay) day, (DateMonth) month, (DateYear) year);
if (!date.valid ()) {
- // FIXME: Add translation.
throw new ContentDirectoryError.BAD_METADATA
- ("Invalid date: %s",
+ (_("Invalid date: %s"),
didl_item.date);
}
@@ -557,10 +551,8 @@ internal class Rygel.ObjectCreator: GLib.Object, Rygel.StateMachine {
container.upnp_class = upnp_class;
return container;
default:
- throw new ContentDirectoryError.BAD_METADATA
- ("Creation of item of class '%s' " +
- "not supported.",
- upnp_class);
+ var msg = _("Cannot create object of class '%s': Not supported");
+ throw new ContentDirectoryError.BAD_METADATA (msg, upnp_class);
}
}
@@ -647,7 +639,7 @@ internal class Rygel.ObjectCreator: GLib.Object, Rygel.StateMachine {
* @param container to watch
*/
private async void wait_for_object (WritableContainer container) {
- debug ("Waiting for new object to appear under container '%s'..",
+ debug ("Waiting for new object to appear under container '%s'…",
container.id);
MediaObject object = null;
@@ -657,10 +649,8 @@ internal class Rygel.ObjectCreator: GLib.Object, Rygel.StateMachine {
object = yield container.find_object (this.object.id,
this.cancellable);
} catch (Error error) {
- warning ("Error from container '%s' on trying to find newly " +
- "added child object '%s' in it",
- container.id,
- this.object.id);
+ var msg = _("Error from container '%s' on trying to find the newly added child object '%s'
in it: %s");
+ warning (msg, container.id, this.object.id, error.message);
}
if (object == null) {
diff --git a/src/librygel-server/rygel-reference-creator.vala
b/src/librygel-server/rygel-reference-creator.vala
index 65fd1e8..3079f04 100644
--- a/src/librygel-server/rygel-reference-creator.vala
+++ b/src/librygel-server/rygel-reference-creator.vala
@@ -46,15 +46,13 @@ internal class Rygel.ReferenceCreator : GLib.Object, Rygel.StateMachine {
"ObjectID",
typeof (string), out this.object_id);
if (this.container_id == null) {
- // FIXME: Add translation
throw new ContentDirectoryError.INVALID_ARGS
- (("'ContainerID' agument missing."));
+ (_("'ContainerID' agument missing."));
}
if (this.object_id == null) {
- // FIXME: Add translation
throw new ContentDirectoryError.INVALID_ARGS
- (("'ObjectID' argument missing."));
+ (_("'ObjectID' argument missing."));
}
}
diff --git a/src/plugins/tracker/rygel-tracker-category-all-container.vala
b/src/plugins/tracker/rygel-tracker-category-all-container.vala
index 6c51cf6..3b1392e 100644
--- a/src/plugins/tracker/rygel-tracker-category-all-container.vala
+++ b/src/plugins/tracker/rygel-tracker-category-all-container.vala
@@ -74,7 +74,7 @@ public class Rygel.Tracker.CategoryAllContainer : SearchContainer,
DBusSignalFlags.NONE,
this.on_graph_updated);
} catch (Error error) {
- critical (_("Could not subscribe to tracker signals: %s"),
+ critical (_("Could not subscribe to Tracker signals: %s"),
error.message);
}
@@ -92,7 +92,7 @@ public class Rygel.Tracker.CategoryAllContainer : SearchContainer,
public async void add_container (MediaContainer container,
Cancellable? cancellable) throws Error {
- throw new WritableContainerError.NOT_IMPLEMENTED ("Not supported");
+ throw new WritableContainerError.NOT_IMPLEMENTED (_("Not supported"));
}
public async void remove_item (string id, Cancellable? cancellable)
diff --git a/src/plugins/tracker/rygel-tracker-plugin.vala b/src/plugins/tracker/rygel-tracker-plugin.vala
index c5c88c9..d413079 100644
--- a/src/plugins/tracker/rygel-tracker-plugin.vala
+++ b/src/plugins/tracker/rygel-tracker-plugin.vala
@@ -28,9 +28,8 @@ public class Rygel.Tracker.Plugin : Rygel.MediaServerPlugin {
private static RootContainer root;
public Plugin () {
- // @REALNAME@ is substituted for user's real name and it
- // doesn't need translation.
if (root == null) {
+ // translators: @REALNAME@ is substituted for user's real name and it doesn't need translation.
root = new RootContainer (_("@REALNAME@'s media"));
}
diff --git a/src/rygel/rygel-user-config.vala b/src/rygel/rygel-user-config.vala
index 352b4b1..1b113cd 100644
--- a/src/rygel/rygel-user-config.vala
+++ b/src/rygel/rygel-user-config.vala
@@ -236,8 +236,7 @@ public class Rygel.UserConfig : GLib.Object, Configuration {
debug ("Loaded user configuration from file '%s'", local_path);
} catch (Error error) {
- /// TRANSLATORS: First %s is the file's path, second is the error
- // message
+ // TRANSLATORS: First %s is the file's path, second is the error message
warning (_("Failed to load user configuration from file '%s': %s"),
local_path,
error.message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]