[rygel] media-export: Translation and style fixes
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] media-export: Translation and style fixes
- Date: Sun, 5 Jul 2015 15:27:47 +0000 (UTC)
commit 59ca902f4e40e7ee064f14f0db07372e0f456e03
Author: Jens Georg <mail jensge org>
Date: Sun Jul 5 17:19:45 2015 +0200
media-export: Translation and style fixes
Signed-off-by: Jens Georg <mail jensge org>
.../rygel-media-export-harvesting-task.vala | 2 +-
.../rygel-media-export-item-factory.vala | 27 +++++++++++------
.../rygel-media-export-media-cache-upgrader.vala | 6 ++--
.../rygel-media-export-media-cache.vala | 31 ++++++++++---------
.../media-export/rygel-media-export-plugin.vala | 2 +-
5 files changed, 38 insertions(+), 30 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-harvesting-task.vala
b/src/plugins/media-export/rygel-media-export-harvesting-task.vala
index 9181813..3977b16 100644
--- a/src/plugins/media-export/rygel-media-export-harvesting-task.vala
+++ b/src/plugins/media-export/rygel-media-export-harvesting-task.vala
@@ -331,7 +331,7 @@ public class Rygel.MediaExport.HarvestingTask : Rygel.StateMachine,
// failed; there's not much to do here, just print the information and
// go to the next file
- warning ("Skipping %s; extraction completely failed: %s",
+ warning (_("Skipping URI %s; extraction completely failed: %s"),
file.get_uri (),
error.message);
diff --git a/src/plugins/media-export/rygel-media-export-item-factory.vala
b/src/plugins/media-export/rygel-media-export-item-factory.vala
index b6f73ed..6bf43f0 100644
--- a/src/plugins/media-export/rygel-media-export-item-factory.vala
+++ b/src/plugins/media-export/rygel-media-export-item-factory.vala
@@ -117,17 +117,24 @@ namespace Rygel.MediaExport.ItemFactory {
File file,
Variant v) {
if (!v.is_of_type (new VariantType ("(smvmvmvmvmvmv)"))) {
- warning ("Invalid meta-data serialisation, cannot process %s",
+ warning (_("Invalid meta-data serialisation, cannot process %s"),
v.get_type_string ());
return null;
}
- Variant? upnp_class, file_info, dlna_profile, info, video_info, audio_info, meta_data;
+ Variant? upnp_class,
+ file_info,
+ dlna_profile,
+ info,
+ video_info,
+ audio_info,
+ meta_data;
var it = v.iterator ();
if (it.n_children () != 7) {
- warning ("Invalid meta-data serialisation: exprected 7 children, got %d", (int) it.n_children
());
+ warning (_("Invalid meta-data serialisation: exprected 7 children, got %d"),
+ (int) it.n_children ());
return null;
}
@@ -219,7 +226,7 @@ namespace Rygel.MediaExport.ItemFactory {
private static void apply_meta_data (MediaFileItem item, Variant v) {
if (!v.is_of_type (new VariantType ("(msmsmsiii)"))) {
- warning ("Invalid meta-data serialisation of meta-data; %s",
+ warning (_("Invalid meta-data serialisation of meta-data; %s"),
v.get_type_string ());
return;
@@ -255,7 +262,7 @@ namespace Rygel.MediaExport.ItemFactory {
private static void apply_video_info (MediaFileItem item, Variant v) {
if (!v.is_of_type (new VariantType ("(iii)"))) {
- warning ("Invalid meta-data serialisation of video info; %s",
+ warning (_("Invalid meta-data serialisation of video info; %s"),
v.get_type_string ());
return;
@@ -274,7 +281,7 @@ namespace Rygel.MediaExport.ItemFactory {
private static void apply_audio_info (MediaFileItem item, Variant v) {
if (!v.is_of_type (new VariantType ("(ii)"))) {
- warning ("Invalid meta-data serialisation of audio info; %s",
+ warning (_("Invalid meta-data serialisation of audio info; %s"),
v.get_type_string ());
return;
@@ -292,7 +299,7 @@ namespace Rygel.MediaExport.ItemFactory {
private static void apply_info (MediaFileItem item, Variant v) {
if (!v.is_of_type (new VariantType ("(msmsi)"))) {
- warning ("Invalid meta-data serialisation of general info");
+ warning (_("Invalid meta-data serialisation of general info"));
}
var it = v.iterator ();
@@ -313,7 +320,7 @@ namespace Rygel.MediaExport.ItemFactory {
private static void apply_dlna_profile (MediaFileItem item, Variant v) {
if (!v.is_of_type (new VariantType ("(ss)"))) {
- warning ("Invalid meta-data serialisation of DLNA profile %s",
+ warning (_("Invalid meta-data serialisation of DLNA profile %s"),
v.get_type_string ());
return;
@@ -326,7 +333,7 @@ namespace Rygel.MediaExport.ItemFactory {
private static void apply_file_info (MediaFileItem item, Variant v) {
if (!v.is_of_type (new VariantType ("(sstt)"))) {
- warning ("Invalid meta-data serialisation of file info %s",
+ warning (_("Invalid meta-data serialisation of file info %s"),
v.get_type_string ());
return;
@@ -334,7 +341,7 @@ namespace Rygel.MediaExport.ItemFactory {
var it = v.iterator ();
if (it.n_children () != 4) {
- warning ("Invalid meta-data serialisation of file info");
+ warning (_("Invalid meta-data serialisation of file info"));
return;
}
diff --git a/src/plugins/media-export/rygel-media-export-media-cache-upgrader.vala
b/src/plugins/media-export/rygel-media-export-media-cache-upgrader.vala
index 5da5421..33d982e 100644
--- a/src/plugins/media-export/rygel-media-export-media-cache-upgrader.vala
+++ b/src/plugins/media-export/rygel-media-export-media-cache-upgrader.vala
@@ -64,8 +64,8 @@ internal class Rygel.MediaExport.MediaCacheUpgrader {
database.commit ();
} catch (Error error) {
database.rollback ();
- warning ("Failed to force reindex to fix database: " +
- error.message);
+ warning (_("Failed to force reindex to fix database: %s"),
+ error.message);
}
}
}
@@ -75,7 +75,7 @@ internal class Rygel.MediaExport.MediaCacheUpgrader {
this.database.exec (this.sql.make (SQLString.INDEX_COMMON));
this.database.analyze ();
} catch (Error error) {
- warning ("Failed to create indices: " +
+ warning (_("Failed to create indices: %s"),
error.message);
}
}
diff --git a/src/plugins/media-export/rygel-media-export-media-cache.vala
b/src/plugins/media-export/rygel-media-export-media-cache.vala
index d028760..af0afda 100644
--- a/src/plugins/media-export/rygel-media-export-media-cache.vala
+++ b/src/plugins/media-export/rygel-media-export-media-cache.vala
@@ -213,7 +213,7 @@ public class Rygel.MediaExport.MediaCache : Object {
return;
} catch (Error error) {
- warning ("Failed to get update ids: %s", error.message);
+ warning (_("Failed to get update ids: %s"), error.message);
}
}
@@ -394,8 +394,7 @@ public class Rygel.MediaExport.MediaCache : Object {
statement));
children.last ().parent_ref = parent;
} else {
- warning ("Inconsistent database: item %s " +
- "has no parent %s",
+ warning (_("Inconsistent database: item %s does not have parent %s"),
statement.column_text (DetailColumn.ID),
parent_id);
}
@@ -518,7 +517,7 @@ public class Rygel.MediaExport.MediaCache : Object {
return statement->column_text (0);
} catch (DatabaseError error) {
- warning ("Failed to get reset token");
+ warning (_("Failed to get reset token"));
return GUPnP.get_uuid ();
}
@@ -530,7 +529,8 @@ public class Rygel.MediaExport.MediaCache : Object {
this.db.exec ("UPDATE schema_info SET reset_token = ?", args);
} catch (DatabaseError error) {
- warning ("Failed to persist ServiceResetToken: %s", error.message);
+ warning (_("Failed to persist ServiceResetToken: %s"),
+ error.message);
}
}
@@ -539,7 +539,7 @@ public class Rygel.MediaExport.MediaCache : Object {
this.db.exec ("DELETE FROM object WHERE " +
"upnp_id LIKE 'virtual-parent:%'");
} catch (DatabaseError error) {
- warning ("Failed to drop virtual folders: %s", error.message);
+ warning (_("Failed to remove virtual folders: %s"), error.message);
}
}
@@ -553,7 +553,7 @@ public class Rygel.MediaExport.MediaCache : Object {
this.db.exec (this.sql.make (SQLString.MAKE_GUARDED), values);
} catch (DatabaseError error) {
- warning ("Failed to mark item %s as guarded (%d): %s",
+ warning (_("Failed to mark item %s as guarded (%d): %s"),
object.id,
guarded_val,
error.message);
@@ -618,7 +618,7 @@ public class Rygel.MediaExport.MediaCache : Object {
return this.query_value (SQLString.IS_GUARDED,
id_value) == 1;
} catch (DatabaseError error) {
- warning ("Failed to get whether item %s is guarded: %s",
+ warning (_("Failed to get whether item %s is guarded: %s"),
id,
error.message);
@@ -657,8 +657,7 @@ public class Rygel.MediaExport.MediaCache : Object {
} else if (old_version == current_version) {
upgrader.fix_schema ();
} else {
- warning ("The version \"%d\" of the detected database" +
- " is newer than our supported version \"%d\"",
+ warning (_("The version \"%d\" of the detected database is newer than our supported version
\"%d\""),
old_version,
current_version);
this.db = null;
@@ -682,13 +681,14 @@ public class Rygel.MediaExport.MediaCache : Object {
return;
}
} else {
- warning ("Incompatible schema... cannot proceed");
+ warning (_("Incompatible schema… cannot proceed"));
this.db = null;
return;
}
} catch (DatabaseError error) {
- warning ("Something weird going on: %s", error.message);
+ warning (_("Invalid database, cannot query sqlite_master table: %s"),
+ error.message);
this.db = null;
throw new MediaCacheError.GENERAL_ERROR ("Invalid database");
@@ -888,7 +888,7 @@ public class Rygel.MediaExport.MediaCache : Object {
return true;
} catch (Error err) {
- warning ("Failed to create schema: %s", err.message);
+ warning (_("Failed to create database schema: %s"), err.message);
db.rollback ();
}
@@ -1188,7 +1188,8 @@ public class Rygel.MediaExport.MediaCache : Object {
v = "%s%%".printf (exp.operand2);
break;
default:
- warning ("Unsupported op %d", exp.op);
+ debug (_("Unsupported search criteria op %d"), exp.op);
+
return null;
}
@@ -1236,7 +1237,7 @@ public class Rygel.MediaExport.MediaCache : Object {
field[0] == '-' ? "DESC" : "ASC");
column_builder.append (column);
} catch (Error error) {
- warning ("Skipping unsupported field: %s", field);
+ warning (_("Skipping unsupported sort field: %s"), field);
}
}
diff --git a/src/plugins/media-export/rygel-media-export-plugin.vala
b/src/plugins/media-export/rygel-media-export-plugin.vala
index db05fdc..12bd9b2 100644
--- a/src/plugins/media-export/rygel-media-export-plugin.vala
+++ b/src/plugins/media-export/rygel-media-export-plugin.vala
@@ -49,7 +49,7 @@ public void module_init (PluginLoader loader) {
loader.add_plugin (plugin);
} catch (Error error) {
- warning ("Failed to load %s: %s",
+ warning (_("Failed to load plugin %s: %s"),
MediaExport.Plugin.NAME,
error.message);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]