[gnome-games] Stop translating exception messages



commit 99aa7c42015dc6f5965f40753419f62c15b915ac
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Thu Apr 2 02:55:46 2020 +0500

    Stop translating exception messages
    
    They are never displayed in the UI. At most they are dumped into stdout,
    and in that case they are better untranslated.

 plugins/desktop/src/desktop-plugin.vala         | 16 ++++++++--------
 plugins/dreamcast/src/dreamcast-header.vala     |  2 +-
 plugins/game-cube/src/game-cube-header.vala     |  2 +-
 plugins/love/src/love-package.vala              |  4 ++--
 plugins/mame/src/mame-game-uri-adapter.vala     |  2 +-
 plugins/playstation/src/playstation-header.vala |  4 ++--
 plugins/sega-cd/src/sega-cd-header.vala         |  4 ++--
 plugins/sega-cd/src/sega-cd-plugin.vala         |  6 +++---
 plugins/sega-saturn/src/sega-saturn-header.vala |  2 +-
 plugins/sega-saturn/src/sega-saturn-plugin.vala |  8 ++++----
 plugins/steam/src/steam-registry.vala           |  8 ++++----
 plugins/virtual-boy/src/virtual-boy-header.vala | 12 ++++++------
 plugins/wii/src/wii-header.vala                 |  8 ++++----
 src/command/command-runner.vala                 |  4 ++--
 src/core/media-set/media-set.vala               |  2 +-
 src/core/plugin-registrar.vala                  |  6 +++---
 src/gameinfo/gameinfo-doc.vala                  | 10 +++++-----
 src/retro/retro-core-source.vala                | 10 +++++-----
 src/retro/retro-runner.vala                     |  2 +-
 src/utils/cue-sheet/cue-sheet.vala              | 20 ++++++++++----------
 20 files changed, 66 insertions(+), 66 deletions(-)
---
diff --git a/plugins/desktop/src/desktop-plugin.vala b/plugins/desktop/src/desktop-plugin.vala
index 38b6da36..93f824c8 100644
--- a/plugins/desktop/src/desktop-plugin.vala
+++ b/plugins/desktop/src/desktop-plugin.vala
@@ -80,7 +80,7 @@ private class Games.DesktopPlugin : Object, Plugin {
                string[] args;
                var command = app_info.get_commandline ();
                if (!Shell.parse_argv (command, out args))
-                       throw new CommandError.INVALID_COMMAND (_("Invalid command “%s”."), command);
+                       throw new CommandError.INVALID_COMMAND ("Invalid command “%s”.", command);
 
                return new CommandRunner (args);
        }
@@ -89,13 +89,13 @@ private class Games.DesktopPlugin : Object, Plugin {
                var file = uri.to_file ();
 
                if (!file.query_exists ())
-                       throw new IOError.NOT_FOUND (_("Tracker listed file not found: “%s”."), uri.to_string 
());
+                       throw new IOError.NOT_FOUND ("Tracker listed file not found: “%s”.", uri.to_string 
());
 
                var path = file.get_path ();
                var app_info = new DesktopAppInfo.from_filename (path);
 
                if (app_info == null)
-                       throw new DesktopError.INVALID_APPINFO (_("Couldn’t parse desktop entry “%s”."), 
path);
+                       throw new DesktopError.INVALID_APPINFO ("Couldn’t parse desktop entry “%s”.", path);
 
                check_displayability (app_info);
                check_categories (app_info);
@@ -105,10 +105,10 @@ private class Games.DesktopPlugin : Object, Plugin {
 
        private static void check_displayability (DesktopAppInfo app_info) throws Error {
                if (app_info.get_nodisplay ())
-                       throw new DesktopError.BLACKLISTED_GAME (_("“%s” shouldn’t be displayed."), 
app_info.filename);
+                       throw new DesktopError.BLACKLISTED_GAME ("“%s” shouldn’t be displayed.", 
app_info.filename);
 
                if (app_info.get_is_hidden ())
-                       throw new DesktopError.BLACKLISTED_GAME (_("“%s” is hidden."), app_info.filename);
+                       throw new DesktopError.BLACKLISTED_GAME ("“%s” is hidden.", app_info.filename);
        }
 
        private static void check_categories (DesktopAppInfo app_info) throws Error {
@@ -117,7 +117,7 @@ private class Games.DesktopPlugin : Object, Plugin {
 
                foreach (var category in get_categories_black_list ())
                        if (category in categories)
-                               throw new DesktopError.BLACKLISTED_GAME (_("“%s” has blacklisted category 
“%s”."), app_info.filename, category);
+                               throw new DesktopError.BLACKLISTED_GAME ("“%s” has blacklisted category 
“%s”.", app_info.filename, category);
        }
 
        private static void check_executable (DesktopAppInfo app_info) throws Error {
@@ -126,14 +126,14 @@ private class Games.DesktopPlugin : Object, Plugin {
                foreach (var executable in get_executable_black_list ())
                        if (app_executable == executable ||
                            app_executable.has_suffix ("/" + executable))
-                               throw new DesktopError.BLACKLISTED_GAME (_("“%s” has blacklisted executable 
“%s”."), app_info.filename, executable);
+                               throw new DesktopError.BLACKLISTED_GAME ("“%s” has blacklisted executable 
“%s”.", app_info.filename, executable);
        }
 
        private static void check_base_name (File file) throws Error {
                var base_name = file.get_basename ();
 
                if (base_name in get_base_name_black_list ())
-                       throw new DesktopError.BLACKLISTED_GAME (_("“%s” is blacklisted."), file.get_path ());
+                       throw new DesktopError.BLACKLISTED_GAME ("“%s” is blacklisted.", file.get_path ());
        }
 
        private static string[] categories_black_list;
diff --git a/plugins/dreamcast/src/dreamcast-header.vala b/plugins/dreamcast/src/dreamcast-header.vala
index 708879c8..672eda11 100644
--- a/plugins/dreamcast/src/dreamcast-header.vala
+++ b/plugins/dreamcast/src/dreamcast-header.vala
@@ -51,7 +51,7 @@ private class Games.DreamcastHeader : Object {
                                header_offset = offset;
 
                if (header_offset == null)
-                       throw new DreamcastError.INVALID_HEADER (_("The file doesn’t have a Dreamcast 
header."));
+                       throw new DreamcastError.INVALID_HEADER ("The file doesn’t have a Dreamcast header.");
 
                return header_offset;
        }
diff --git a/plugins/game-cube/src/game-cube-header.vala b/plugins/game-cube/src/game-cube-header.vala
index 58f3dd48..59e19883 100644
--- a/plugins/game-cube/src/game-cube-header.vala
+++ b/plugins/game-cube/src/game-cube-header.vala
@@ -17,7 +17,7 @@ private class Games.GameCubeHeader : Object {
        public void check_validity () throws Error {
                var stream = new StringInputStream (file);
                if (!stream.has_string (MAGIC_OFFSET, MAGIC_VALUE))
-                       throw new GameCubeError.INVALID_HEADER (_("The file doesn’t have a Game Cube 
header."));
+                       throw new GameCubeError.INVALID_HEADER ("The file doesn’t have a Game Cube header.");
        }
 
        public string get_game_id () throws Error {
diff --git a/plugins/love/src/love-package.vala b/plugins/love/src/love-package.vala
index ab484346..2ce53f26 100644
--- a/plugins/love/src/love-package.vala
+++ b/plugins/love/src/love-package.vala
@@ -10,11 +10,11 @@ private class Games.LovePackage : Object {
                this.uri = uri;
 
                if (!contains_file ("main.lua"))
-                       throw new LoveError.INVALID_PACKAGE (_("This doesn’t represent a valid LÖVE package: 
“%s”."), uri.to_string ());
+                       throw new LoveError.INVALID_PACKAGE ("This doesn’t represent a valid LÖVE package: 
“%s”.", uri.to_string ());
 
                var config_file = get_file_string ("conf.lua");
                if (config_file == null)
-                       throw new LoveError.INVALID_PACKAGE (_("This doesn’t represent a valid LÖVE package: 
“%s”."), uri.to_string ());
+                       throw new LoveError.INVALID_PACKAGE ("This doesn’t represent a valid LÖVE package: 
“%s”.", uri.to_string ());
 
                var regex = /^\s*[^\s]+\.([^\s\.]+)\s*=\s*(.+?)\s*$/;
 
diff --git a/plugins/mame/src/mame-game-uri-adapter.vala b/plugins/mame/src/mame-game-uri-adapter.vala
index 59583c57..e89bbe69 100644
--- a/plugins/mame/src/mame-game-uri-adapter.vala
+++ b/plugins/mame/src/mame-game-uri-adapter.vala
@@ -15,7 +15,7 @@ private class Games.MameGameUriAdapter : GameUriAdapter, Object {
                game_id = /\.zip$/.replace (game_id, game_id.length, 0, "");
 
                if (!supported_games.contains (game_id))
-                       throw new MameError.INVALID_GAME_ID (_("Invalid MAME game id “%s” for “%s”."), 
game_id, uri.to_string ());
+                       throw new MameError.INVALID_GAME_ID ("Invalid MAME game id “%s” for “%s”.", game_id, 
uri.to_string ());
 
                var uid_string = @"mame-$game_id".down ();
                var uid = new Uid (uid_string);
diff --git a/plugins/playstation/src/playstation-header.vala b/plugins/playstation/src/playstation-header.vala
index 42c0fd7c..03667fd5 100644
--- a/plugins/playstation/src/playstation-header.vala
+++ b/plugins/playstation/src/playstation-header.vala
@@ -24,7 +24,7 @@ private class Games.PlayStationHeader : Object {
                string label;
                string exe;
                if (!get_playstation_info (file.get_path (), out label, out exe, null))
-                       throw new PlayStationError.INVALID_HEADER (_("Not a PlayStation disc: “%s”."), 
file.get_uri ());
+                       throw new PlayStationError.INVALID_HEADER ("Not a PlayStation disc: “%s”.", 
file.get_uri ());
 
                _disc_id = parse_id_from_exe (exe);
                if (_disc_id != null)
@@ -34,7 +34,7 @@ private class Games.PlayStationHeader : Object {
                if (_disc_id != null)
                        return;
 
-               throw new PlayStationError.INVALID_HEADER (_("Invalid PlayStation header: disc ID not found 
in “%s”."), file.get_uri ());
+               throw new PlayStationError.INVALID_HEADER ("Invalid PlayStation header: disc ID not found in 
“%s”.", file.get_uri ());
        }
 
        private string? parse_id_from_exe (string exe) throws Error {
diff --git a/plugins/sega-cd/src/sega-cd-header.vala b/plugins/sega-cd/src/sega-cd-header.vala
index aeefe94a..9d75ae4d 100644
--- a/plugins/sega-cd/src/sega-cd-header.vala
+++ b/plugins/sega-cd/src/sega-cd-header.vala
@@ -41,7 +41,7 @@ private class Games.SegaCDHeader : Object {
 
        public void check_validity () throws Error {
                if (system == SegaCDSystem.INVALID)
-                       throw new SegaCDError.INVALID_HEADER (_("The file doesn’t have a Genesis/Sega 
32X/Sega CD/Sega Pico header."));
+                       throw new SegaCDError.INVALID_HEADER ("The file doesn’t have a Genesis/Sega 32X/Sega 
CD/Sega Pico header.");
        }
 
        public size_t get_offset () throws Error {
@@ -60,7 +60,7 @@ private class Games.SegaCDHeader : Object {
                        }
                }
 
-                       throw new SegaCDError.INVALID_HEADER (_("The file doesn’t have a Genesis/Sega 
32X/Sega CD/Sega Pico header."));
+                       throw new SegaCDError.INVALID_HEADER ("The file doesn’t have a Genesis/Sega 32X/Sega 
CD/Sega Pico header.");
        }
 
        private SegaCDSystem parse_system () throws Error {
diff --git a/plugins/sega-cd/src/sega-cd-plugin.vala b/plugins/sega-cd/src/sega-cd-plugin.vala
index 34b06531..b25329a8 100644
--- a/plugins/sega-cd/src/sega-cd-plugin.vala
+++ b/plugins/sega-cd/src/sega-cd-plugin.vala
@@ -96,16 +96,16 @@ private class Games.SegaCDPlugin : Object, Plugin {
 
        private static File get_binary_file (CueSheet cue) throws Error {
                if (cue.tracks_number == 0)
-                       throw new SegaCDError.INVALID_CUE_SHEET (_("The file “%s” doesn’t have a track."), 
cue.file.get_uri ());
+                       throw new SegaCDError.INVALID_CUE_SHEET ("The file “%s” doesn’t have a track.", 
cue.file.get_uri ());
 
                var track = cue.get_track (0);
                var file = track.file;
 
                if (file.file_format != CueSheetFileFormat.BINARY && file.file_format != 
CueSheetFileFormat.UNKNOWN)
-                       throw new SegaCDError.INVALID_CUE_SHEET (_("The file “%s” doesn’t have a valid binary 
file format."), cue.file.get_uri ());
+                       throw new SegaCDError.INVALID_CUE_SHEET ("The file “%s” doesn’t have a valid binary 
file format.", cue.file.get_uri ());
 
                if (!track.track_mode.is_mode1 ())
-                       throw new SegaCDError.INVALID_CUE_SHEET (_("The file “%s” doesn’t have a valid track 
mode for track %d."), cue.file.get_uri (), track.track_number);
+                       throw new SegaCDError.INVALID_CUE_SHEET ("The file “%s” doesn’t have a valid track 
mode for track %d.", cue.file.get_uri (), track.track_number);
 
                var header = new SegaCDHeader (file.file);
                header.check_validity ();
diff --git a/plugins/sega-saturn/src/sega-saturn-header.vala b/plugins/sega-saturn/src/sega-saturn-header.vala
index d791b97e..76cce52a 100644
--- a/plugins/sega-saturn/src/sega-saturn-header.vala
+++ b/plugins/sega-saturn/src/sega-saturn-header.vala
@@ -51,7 +51,7 @@ private class Games.SegaSaturnHeader : Object {
                                header_offset = offset;
 
                if (header_offset == null)
-                       throw new SegaSaturnError.INVALID_HEADER (_("The file doesn’t have a Sega Saturn 
header."));
+                       throw new SegaSaturnError.INVALID_HEADER ("The file doesn’t have a Sega Saturn 
header.");
 
                return header_offset;
        }
diff --git a/plugins/sega-saturn/src/sega-saturn-plugin.vala b/plugins/sega-saturn/src/sega-saturn-plugin.vala
index 302ad7bc..4895db2a 100644
--- a/plugins/sega-saturn/src/sega-saturn-plugin.vala
+++ b/plugins/sega-saturn/src/sega-saturn-plugin.vala
@@ -85,20 +85,20 @@ private class Games.SegaSaturnPlugin : Object, Plugin {
 
        private static File get_binary_file (CueSheet cue) throws Error {
                if (cue.tracks_number == 0)
-                       throw new SegaSaturnError.INVALID_CUE_SHEET (_("The file “%s” doesn’t have a 
track."), cue.file.get_uri ());
+                       throw new SegaSaturnError.INVALID_CUE_SHEET ("The file “%s” doesn’t have a track.", 
cue.file.get_uri ());
 
                var track = cue.get_track (0);
                var file = track.file;
 
                if (file.file_format != CueSheetFileFormat.BINARY && file.file_format != 
CueSheetFileFormat.UNKNOWN)
-                       throw new SegaSaturnError.INVALID_CUE_SHEET (_("The file “%s” doesn’t have a valid 
binary file format."), cue.file.get_uri ());
+                       throw new SegaSaturnError.INVALID_CUE_SHEET ("The file “%s” doesn’t have a valid 
binary file format.", cue.file.get_uri ());
 
                if (!track.track_mode.is_mode1 ())
-                       throw new SegaSaturnError.INVALID_CUE_SHEET (_("The file “%s” doesn’t have a valid 
track mode for track %d."), cue.file.get_uri (), track.track_number);
+                       throw new SegaSaturnError.INVALID_CUE_SHEET ("The file “%s” doesn’t have a valid 
track mode for track %d.", cue.file.get_uri (), track.track_number);
 
                var file_info = file.file.query_info ("*", FileQueryInfoFlags.NONE);
                if (file_info.get_content_type () != SEGA_SATURN_MIME_TYPE)
-                       throw new SegaSaturnError.INVALID_FILE_TYPE (_("The file “%s” doesn’t have a valid 
Sega Saturn binary file."), cue.file.get_uri ());
+                       throw new SegaSaturnError.INVALID_FILE_TYPE ("The file “%s” doesn’t have a valid Sega 
Saturn binary file.", cue.file.get_uri ());
 
                return file.file;
        }
diff --git a/plugins/steam/src/steam-registry.vala b/plugins/steam/src/steam-registry.vala
index 7ae9db4d..2b6bd5de 100644
--- a/plugins/steam/src/steam-registry.vala
+++ b/plugins/steam/src/steam-registry.vala
@@ -65,7 +65,7 @@ private class Games.SteamRegistry {
                var file = File.new_for_path (appmanifest_path);
 
                if (!file.query_exists ())
-                       throw new IOError.NOT_FOUND (_("File “%s” doesn’t exist."), file.get_path ());
+                       throw new IOError.NOT_FOUND ("File “%s” doesn’t exist.", file.get_path ());
 
                var dis = new DataInputStream (file.read ());
 
@@ -93,7 +93,7 @@ private class Games.SteamRegistry {
 
                while (index < tokens.length) {
                        if (tokens[index] == "{")
-                               throw new SteamRegistryError.UNEXPECTED_TOKEN (_("Unexpected token '{'."));
+                               throw new SteamRegistryError.UNEXPECTED_TOKEN ("Unexpected token '{'.");
 
                        if (tokens[index] == "}") {
                                index++;
@@ -107,10 +107,10 @@ private class Games.SteamRegistry {
                        index++;
 
                        if (index >= tokens.length)
-                               throw new SteamRegistryError.UNEXPECTED_END (_("Unexpected end of tokens."));
+                               throw new SteamRegistryError.UNEXPECTED_END ("Unexpected end of tokens.");
 
                        if (tokens[index] == "}")
-                               throw new SteamRegistryError.UNEXPECTED_TOKEN (_("Unexpected token '}'."));
+                               throw new SteamRegistryError.UNEXPECTED_TOKEN ("Unexpected token '}'.");
 
                        if (tokens[index] == "{") {
                                index++;
diff --git a/plugins/virtual-boy/src/virtual-boy-header.vala b/plugins/virtual-boy/src/virtual-boy-header.vala
index 9751a517..1a14499c 100644
--- a/plugins/virtual-boy/src/virtual-boy-header.vala
+++ b/plugins/virtual-boy/src/virtual-boy-header.vala
@@ -17,13 +17,13 @@ private class Games.VirtualBoyHeader : Object {
                ssize_t read = 0;
 
                if (size < MAGIC_OFFSET)
-                       throw new VirtualBoyError.INVALID_FILE (_("The file is too short."));
+                       throw new VirtualBoyError.INVALID_FILE ("The file is too short.");
 
                try {
                        stream.seek (size - MAGIC_OFFSET, SeekType.SET);
                }
                catch (Error e) {
-                       throw new VirtualBoyError.INVALID_SIZE (_("Invalid Virtual Boy ROM header size: %s"), 
e.message);
+                       throw new VirtualBoyError.INVALID_SIZE ("Invalid Virtual Boy ROM header size: %s", 
e.message);
                }
 
                var buffer = new uint8[MAGIC_VALUE.length];
@@ -35,11 +35,11 @@ private class Games.VirtualBoyHeader : Object {
                }
 
                if (read < MAGIC_VALUE.length)
-                       throw new VirtualBoyError.INVALID_SIZE (_("Invalid Virtual Boy ROM header size."));
+                       throw new VirtualBoyError.INVALID_SIZE ("Invalid Virtual Boy ROM header size.");
 
                for (var i = 0; i < MAGIC_VALUE.length; i++)
                        if (buffer[i] != MAGIC_VALUE[i])
-                               throw new VirtualBoyError.INVALID_HEADER (_("The file doesn’t have a Virtual 
Boy ROM header."));
+                               throw new VirtualBoyError.INVALID_HEADER ("The file doesn’t have a Virtual 
Boy ROM header.");
        }
 
        private int64 get_file_size () throws VirtualBoyError {
@@ -48,7 +48,7 @@ private class Games.VirtualBoyHeader : Object {
                        return info.get_size ();
                }
                catch (Error e) {
-                       throw new VirtualBoyError.CANT_READ_FILE (_("Couldn’t get file size: %s"), e.message);
+                       throw new VirtualBoyError.CANT_READ_FILE ("Couldn’t get file size: %s", e.message);
                }
        }
 
@@ -57,7 +57,7 @@ private class Games.VirtualBoyHeader : Object {
                        return file.read ();
                }
                catch (Error e) {
-                       throw new VirtualBoyError.CANT_READ_FILE (_("Couldn’t read file: %s"), e.message);
+                       throw new VirtualBoyError.CANT_READ_FILE ("Couldn’t read file: %s", e.message);
                }
        }
 }
diff --git a/plugins/wii/src/wii-header.vala b/plugins/wii/src/wii-header.vala
index cf1c1fa5..4439bc57 100644
--- a/plugins/wii/src/wii-header.vala
+++ b/plugins/wii/src/wii-header.vala
@@ -17,7 +17,7 @@ private class Games.WiiHeader : Object {
                        stream.seek (MAGIC_OFFSET, SeekType.SET);
                }
                catch (Error e) {
-                       throw new WiiError.INVALID_SIZE (_("Invalid Wii header size: %s"), e.message);
+                       throw new WiiError.INVALID_SIZE ("Invalid Wii header size: %s", e.message);
                }
 
                var buffer = new uint8[MAGIC_VALUE.length];
@@ -30,7 +30,7 @@ private class Games.WiiHeader : Object {
 
                var magic = (string) buffer;
                if (magic != MAGIC_VALUE)
-                       throw new WiiError.INVALID_HEADER (_("The file doesn’t have a Wii header."));
+                       throw new WiiError.INVALID_HEADER ("The file doesn’t have a Wii header.");
        }
 
        public string get_game_id () throws WiiError {
@@ -41,7 +41,7 @@ private class Games.WiiHeader : Object {
                        stream.read (buffer);
                }
                catch (Error e) {
-                       throw new WiiError.INVALID_HEADER (_("The file doesn’t have a Wii header."));
+                       throw new WiiError.INVALID_HEADER ("The file doesn’t have a Wii header.");
                }
 
                return (string) buffer;
@@ -52,7 +52,7 @@ private class Games.WiiHeader : Object {
                        return file.read ();
                }
                catch (Error e) {
-                       throw new WiiError.CANT_READ_FILE (_("Couldn’t read file: %s"), e.message);
+                       throw new WiiError.CANT_READ_FILE ("Couldn’t read file: %s", e.message);
                }
        }
 }
diff --git a/src/command/command-runner.vala b/src/command/command-runner.vala
index 7a2857b2..6fb1d473 100644
--- a/src/command/command-runner.vala
+++ b/src/command/command-runner.vala
@@ -34,7 +34,7 @@ public class Games.CommandRunner : Object, Runner {
 
        public void prepare () throws RunnerError {
                if (args.length <= 0)
-                       throw new RunnerError.INVALID_GAME (_("The game doesn’t have a valid command."));
+                       throw new RunnerError.INVALID_GAME ("The game doesn’t have a valid command.");
        }
 
        public Gtk.Widget get_display () {
@@ -75,7 +75,7 @@ public class Games.CommandRunner : Object, Runner {
                        var result = Process.spawn_async (
                                working_directory, command, envp, flags, child_setup, out pid);
                        if (!result)
-                               throw new CommandError.EXECUTION_FAILED (_("Couldn’t run “%s”: execution 
failed."), args[0]);
+                               throw new CommandError.EXECUTION_FAILED ("Couldn’t run “%s”: execution 
failed.", args[0]);
                }
                catch (SpawnError e) {
                        warning ("%s\n", e.message);
diff --git a/src/core/media-set/media-set.vala b/src/core/media-set/media-set.vala
index f9931dcb..0088d3d3 100644
--- a/src/core/media-set/media-set.vala
+++ b/src/core/media-set/media-set.vala
@@ -42,7 +42,7 @@ public class Games.MediaSet : Object {
 
        public Media get_media (uint index) throws Error {
                if (index >= medias.length)
-                       throw new MediaSetError.NOT_A_MEDIA (_("Invalid media index %u."), index);
+                       throw new MediaSetError.NOT_A_MEDIA ("Invalid media index %u.", index);
 
                return medias[index];
        }
diff --git a/src/core/plugin-registrar.vala b/src/core/plugin-registrar.vala
index c8ca7d0b..3984dd4b 100644
--- a/src/core/plugin-registrar.vala
+++ b/src/core/plugin-registrar.vala
@@ -24,7 +24,7 @@ private class Games.PluginRegistrar : TypeModule {
                        description = keyfile.get_string ("Plugin", "Description");
                }
                catch (Error e) {
-                       throw new PluginError.INVALID_PLUGIN_DESCRIPTOR (_("Invalid plugin descriptor: %s"), 
e.message);
+                       throw new PluginError.INVALID_PLUGIN_DESCRIPTOR ("Invalid plugin descriptor: %s", 
e.message);
                }
 
                loaded = false;
@@ -45,11 +45,11 @@ private class Games.PluginRegistrar : TypeModule {
 
                var object = Object.new (type);
                if (object == null)
-                       throw new PluginError.NOT_A_PLUGIN (_("Couldn’t create a new instance of plugin in 
“%s”."), module_path);
+                       throw new PluginError.NOT_A_PLUGIN ("Couldn’t create a new instance of plugin in 
“%s”.", module_path);
 
                var plugin = object as Plugin;
                if (plugin == null)
-                       throw new PluginError.NOT_A_PLUGIN (_("Couldn’t create a new instance of plugin in 
“%s”."), module_path);
+                       throw new PluginError.NOT_A_PLUGIN ("Couldn’t create a new instance of plugin in 
“%s”.", module_path);
 
                return plugin;
        }
diff --git a/src/gameinfo/gameinfo-doc.vala b/src/gameinfo/gameinfo-doc.vala
index df10a146..6c8e3132 100644
--- a/src/gameinfo/gameinfo-doc.vala
+++ b/src/gameinfo/gameinfo-doc.vala
@@ -12,7 +12,7 @@ public class Games.GameinfoDoc : Object {
 
                var title = xml_doc.get_content (expr);
                if (title == null)
-                       throw new GameinfoError.DISC_NOT_FOUND (_("No game title found for disc ID “%s”."), 
disc_id);
+                       throw new GameinfoError.DISC_NOT_FOUND ("No game title found for disc ID “%s”.", 
disc_id);
 
                return title;
        }
@@ -28,7 +28,7 @@ public class Games.GameinfoDoc : Object {
 
                var title = xml_doc.get_content (expr);
                if (title == null)
-                       throw new GameinfoError.DISC_NOT_FOUND (_("No disc title found for disc ID “%s”."), 
disc_id);
+                       throw new GameinfoError.DISC_NOT_FOUND ("No disc title found for disc ID “%s”.", 
disc_id);
 
                return title;
        }
@@ -38,7 +38,7 @@ public class Games.GameinfoDoc : Object {
 
                var title = xml_doc.get_content (expr);
                if (title == null)
-                       throw new GameinfoError.DISC_NOT_FOUND (_("No disc set ID found for disc ID “%s”."), 
disc_id);
+                       throw new GameinfoError.DISC_NOT_FOUND ("No disc set ID found for disc ID “%s”.", 
disc_id);
 
                return title;
        }
@@ -46,7 +46,7 @@ public class Games.GameinfoDoc : Object {
        public int get_disc_set_index_for_disc_id (string disc_id) throws Error {
                var test_expr = "/gameinfo/games/game/discs/disc[@id = \"" + disc_id + "\"]";
                if (xml_doc.count_nodes (test_expr) == 0)
-                       throw new GameinfoError.DISC_NOT_FOUND (_("No disc found for disc ID “%s”."), 
disc_id);
+                       throw new GameinfoError.DISC_NOT_FOUND ("No disc found for disc ID “%s”.", disc_id);
 
                var expr = "/gameinfo/games/game/discs/disc[@id = \"" + disc_id + 
"\"]/preceding-sibling::disc";
 
@@ -56,7 +56,7 @@ public class Games.GameinfoDoc : Object {
        public int get_disc_set_size_for_disc_id (string disc_id) throws Error {
                var test_expr = "/gameinfo/games/game/discs/disc[@id = \"" + disc_id + "\"]";
                if (xml_doc.count_nodes (test_expr) == 0)
-                       throw new GameinfoError.DISC_NOT_FOUND (_("No disc found for disc ID “%s”."), 
disc_id);
+                       throw new GameinfoError.DISC_NOT_FOUND ("No disc found for disc ID “%s”.", disc_id);
 
                var expr = "/gameinfo/games/game/discs[disc[@id = \"" + disc_id + "\"]]/disc";
 
diff --git a/src/retro/retro-core-source.vala b/src/retro/retro-core-source.vala
index cc0ad491..fbd0c279 100644
--- a/src/retro/retro-core-source.vala
+++ b/src/retro/retro-core-source.vala
@@ -26,7 +26,7 @@ public class Games.RetroCoreSource : Object {
                if (module_file == null) {
                        var mime_types = platform.get_mime_types ();
 
-                       throw new RetroError.MODULE_NOT_FOUND (_("No module found for platform “%s” and MIME 
types [ “%s” ]."), platform.get_id (), string.joinv (_("”, “"), mime_types));
+                       throw new RetroError.MODULE_NOT_FOUND ("No module found for platform “%s” and MIME 
types [ “%s” ].", platform.get_id (), string.joinv ("”, “", mime_types));
                }
 
                return module_file.get_path ();
@@ -40,7 +40,7 @@ public class Games.RetroCoreSource : Object {
                if (core_descriptor == null) {
                        var mime_types = platform.get_mime_types ();
 
-                       throw new RetroError.MODULE_NOT_FOUND (_("No module found for platform “%s” and MIME 
types [ “%s” ]."), platform_id, string.joinv (_("”, “"), mime_types));
+                       throw new RetroError.MODULE_NOT_FOUND ("No module found for platform “%s” and MIME 
types [ “%s” ].", platform_id, string.joinv ("”, “", mime_types));
                }
 
                if (core_descriptor.has_firmwares (platform_id))
@@ -67,7 +67,7 @@ public class Games.RetroCoreSource : Object {
                var firmware_path = core_descriptor.get_firmware_path (firmware);
                var firmware_file = firmware_dir.get_child (firmware_path);
                if (!firmware_file.query_exists ())
-                       throw new RetroError.FIRMWARE_NOT_FOUND (_("This game requires the %s firmware file 
to run."), firmware_file.get_path ());
+                       throw new RetroError.FIRMWARE_NOT_FOUND ("This game requires the %s firmware file to 
run.", firmware_file.get_path ());
 
                var has_md5 = core_descriptor.has_firmware_md5 (firmware);
                var has_sha512 = core_descriptor.has_firmware_sha512 (firmware);
@@ -84,13 +84,13 @@ public class Games.RetroCoreSource : Object {
                if (has_md5) {
                        var md5 = core_descriptor.get_firmware_md5 (firmware);
                        if (Checksum.compute_for_bytes (ChecksumType.MD5, bytes) != md5)
-                               throw new RetroError.FIRMWARE_NOT_FOUND (_("This game requires the %s 
firmware file with a MD5 fingerprint of %s to run."), firmware_file.get_path (), md5);
+                               throw new RetroError.FIRMWARE_NOT_FOUND ("This game requires the %s firmware 
file with a MD5 fingerprint of %s to run.", firmware_file.get_path (), md5);
                }
 
                if (has_sha512) {
                        var sha512 = core_descriptor.get_firmware_sha512 (firmware);
                        if (Checksum.compute_for_bytes (ChecksumType.SHA512, bytes) != sha512)
-                               throw new RetroError.FIRMWARE_NOT_FOUND (_("This game requires the %s 
firmware file with a SHA-512 fingerprint of %s to run."), firmware_file.get_path (), sha512);
+                               throw new RetroError.FIRMWARE_NOT_FOUND ("This game requires the %s firmware 
file with a SHA-512 fingerprint of %s to run.", firmware_file.get_path (), sha512);
                }
        }
 
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index f247fa54..7a7cad29 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -154,7 +154,7 @@ public class Games.RetroRunner : Object, Runner {
                if (core_descriptor != null) {
                        var module_file = core_descriptor.get_module_file ();
                        if (module_file == null)
-                               throw new RetroError.MODULE_NOT_FOUND (_("No module found for “%s”."), 
core_descriptor.get_name ());
+                               throw new RetroError.MODULE_NOT_FOUND ("No module found for “%s”.", 
core_descriptor.get_name ());
 
                        module_path = module_file.get_path ();
                }
diff --git a/src/utils/cue-sheet/cue-sheet.vala b/src/utils/cue-sheet/cue-sheet.vala
index 3326491b..576cc16b 100644
--- a/src/utils/cue-sheet/cue-sheet.vala
+++ b/src/utils/cue-sheet/cue-sheet.vala
@@ -22,7 +22,7 @@ public class Games.CueSheet : Object {
 
        public CueSheetTrackNode get_track (uint i) throws Error {
                if (i >= tracks.length)
-                       throw new CueSheetError.NOT_A_TRACK (_("“%s” doesn’t have a track for index %u."), 
file.get_uri (), i);
+                       throw new CueSheetError.NOT_A_TRACK ("“%s” doesn’t have a track for index %u.", 
file.get_uri (), i);
 
                return tracks[i];
        }
@@ -111,14 +111,14 @@ public class Games.CueSheet : Object {
 
                var file_format = CueSheetFileFormat.parse_string (file_format_string);
                if (file_format == CueSheetFileFormat.INVALID)
-                       throw new CueSheetError.INVALID_FILE_FORMAT (_("%s:%lu: Invalid file format %s, 
expected a valid file format or none."), file.get_basename (), line, file_format_string);
+                       throw new CueSheetError.INVALID_FILE_FORMAT ("%s:%lu: Invalid file format %s, 
expected a valid file format or none.", file.get_basename (), line, file_format_string);
 
                return new CueSheetFileNode (child_file, file_format);
        }
 
        private CueSheetTrackNode parse_track_line (ref string[] tokens, ref size_t i, size_t line, 
CueSheetFileNode? parent_file) throws CueSheetError {
                if (parent_file == null)
-                       throw new CueSheetError.UNEXPECTED_TOKEN (_("%s:%lu: Unexpected token TRACK before a 
FILE token."), file.get_basename (), line);
+                       throw new CueSheetError.UNEXPECTED_TOKEN ("%s:%lu: Unexpected token TRACK before a 
FILE token.", file.get_basename (), line);
 
                is_token ("TRACK", ref tokens, ref i, line);
                var track_number_string = get_token (ref tokens, ref i, line);
@@ -127,31 +127,31 @@ public class Games.CueSheet : Object {
 
                var track_number = int.parse (track_number_string);
                if (track_number < 1 || track_number > 99)
-                       throw new CueSheetError.INVALID_TRACK_NUMBER (_("%s:%lu: Invalid track number %s, 
expected a number in the 1-99 range."), file.get_basename (), line, track_number_string);
+                       throw new CueSheetError.INVALID_TRACK_NUMBER ("%s:%lu: Invalid track number %s, 
expected a number in the 1-99 range.", file.get_basename (), line, track_number_string);
 
                var track_mode = CueSheetTrackMode.parse_string (track_mode_string);
                if (track_mode == CueSheetTrackMode.INVALID)
-                       throw new CueSheetError.INVALID_TRACK_MODE (_("%s:%lu: Invalid track mode %s, 
expected a valid track mode."), file.get_basename (), line, track_mode_string);
+                       throw new CueSheetError.INVALID_TRACK_MODE ("%s:%lu: Invalid track mode %s, expected 
a valid track mode.", file.get_basename (), line, track_mode_string);
 
                return new CueSheetTrackNode (parent_file, track_number, track_mode);
        }
 
        private void is_token (string expected_token, ref string[] tokens, ref size_t i, size_t line) throws 
CueSheetError {
                if (i >= tokens.length)
-                       throw new CueSheetError.UNEXPECTED_EOF (_("%s:%lu: Unexpected end of file, expected 
%s."), file.get_basename (), line, expected_token);
+                       throw new CueSheetError.UNEXPECTED_EOF ("%s:%lu: Unexpected end of file, expected 
%s.", file.get_basename (), line, expected_token);
 
                if (tokens[i] == NEW_LINE)
-                       throw new CueSheetError.UNEXPECTED_TOKEN (_("%s:%lu: Unexpected token %s, expected 
%s."), file.get_basename (), line, tokens[i], expected_token);
+                       throw new CueSheetError.UNEXPECTED_TOKEN ("%s:%lu: Unexpected token %s, expected 
%s.", file.get_basename (), line, tokens[i], expected_token);
 
                i++;
        }
 
        private string get_token (ref string[] tokens, ref size_t i, size_t line) throws CueSheetError {
                if (i >= tokens.length)
-                       throw new CueSheetError.UNEXPECTED_EOF (_("%s:%lu: Unexpected end of file, expected a 
token."), file.get_basename (), line);
+                       throw new CueSheetError.UNEXPECTED_EOF ("%s:%lu: Unexpected end of file, expected a 
token.", file.get_basename (), line);
 
                if (tokens[i] == NEW_LINE)
-                       throw new CueSheetError.UNEXPECTED_EOL (_("%s:%lu: Unexpected end of line, expected a 
token."), file.get_basename (), line);
+                       throw new CueSheetError.UNEXPECTED_EOL ("%s:%lu: Unexpected end of line, expected a 
token.", file.get_basename (), line);
 
                var token = tokens[i];
                i++;
@@ -174,7 +174,7 @@ public class Games.CueSheet : Object {
 
        private void is_end_of_line (ref string[] tokens, ref size_t i, size_t line) throws CueSheetError {
                if (i < tokens.length && tokens[i] != NEW_LINE)
-                       throw new CueSheetError.UNEXPECTED_TOKEN (_("%s:%lu: Unexpected token %s, expected 
end of line."), file.get_basename (), line, tokens[i]);
+                       throw new CueSheetError.UNEXPECTED_TOKEN ("%s:%lu: Unexpected token %s, expected end 
of line.", file.get_basename (), line, tokens[i]);
 
                i++;
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]