[gnome-games/wip/exalm/strings: 3/3] ui: Rename savestates to snapshots



commit 4abee01bd782721ad9a9a470c99a82cb546c8bfe
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Sat Jan 25 22:28:40 2020 +0500

    ui: Rename savestates to snapshots
    
    Only change user-facing strings for now, as changing all references
    would cause a name clash unless we change current "snapshot".

 data/ui/display-header-bar.ui                      |  2 +-
 data/ui/savestates-list.ui                         |  2 +-
 data/ui/shortcuts-window.ui                        |  6 +++---
 plugins/nintendo-ds/src/nintendo-ds-savestate.vala |  2 +-
 src/core/savestate.vala                            | 12 ++++++------
 src/retro/retro-runner.vala                        | 11 +++++------
 src/ui/display-view.vala                           |  2 +-
 src/ui/savestate-listbox-row.vala                  |  2 +-
 src/ui/savestates-list.vala                        |  6 +++---
 9 files changed, 22 insertions(+), 23 deletions(-)
---
diff --git a/data/ui/display-header-bar.ui b/data/ui/display-header-bar.ui
index 969ad3ec..c9846b64 100644
--- a/data/ui/display-header-bar.ui
+++ b/data/ui/display-header-bar.ui
@@ -185,7 +185,7 @@
         <child>
           <object class="GtkModelButton" id="savestates_menu_button">
             <property name="visible">True</property>
-            <property name="text" translatable="yes">_Savestates</property>
+            <property name="text" translatable="yes">_Snapshots</property>
             <signal name="clicked" handler="on_secondary_menu_savestates_clicked"/>
           </object>
         </child>
diff --git a/data/ui/savestates-list.ui b/data/ui/savestates-list.ui
index f8593768..7a5db8c2 100644
--- a/data/ui/savestates-list.ui
+++ b/data/ui/savestates-list.ui
@@ -60,7 +60,7 @@
                                 <property name="margin-top">3</property>
                                 <property name="margin-bottom">3</property>
                                 <property name="margin-end">3</property>
-                                <property name="label" translatable="yes">Create new savestate</property>
+                                <property name="label" translatable="yes">Create new snapshot</property>
                                 <property name="wrap">True</property>
                                 <style>
                                   <class name="savestate-name"/>
diff --git a/data/ui/shortcuts-window.ui b/data/ui/shortcuts-window.ui
index a3c6a92a..60f3b043 100644
--- a/data/ui/shortcuts-window.ui
+++ b/data/ui/shortcuts-window.ui
@@ -95,21 +95,21 @@
             <child>
               <object class="GtkShortcutsShortcut">
                 <property name="visible">True</property>
-                <property name="title" translatable="yes" context="shortcut window">Create new 
savestate</property>
+                <property name="title" translatable="yes" context="shortcut window">Create new 
snapshot</property>
                 <property name="accelerator">&lt;ctrl&gt;S F2</property>
               </object>
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
                 <property name="visible">True</property>
-                <property name="title" translatable="yes" context="shortcut window">Load the latest 
savestate</property>
+                <property name="title" translatable="yes" context="shortcut window">Load the latest 
snapshot</property>
                 <property name="accelerator">&lt;ctrl&gt;D F3</property>
               </object>
             </child>
             <child>
               <object class="GtkShortcutsShortcut">
                 <property name="visible">True</property>
-                <property name="title" translatable="yes" context="shortcut window">Show 
savestates</property>
+                <property name="title" translatable="yes" context="shortcut window">Show snapshots</property>
                 <property name="accelerator">&lt;ctrl&gt;A F4</property>
               </object>
             </child>
diff --git a/plugins/nintendo-ds/src/nintendo-ds-savestate.vala 
b/plugins/nintendo-ds/src/nintendo-ds-savestate.vala
index 9c82888d..a3241a21 100644
--- a/plugins/nintendo-ds/src/nintendo-ds-savestate.vala
+++ b/plugins/nintendo-ds/src/nintendo-ds-savestate.vala
@@ -14,7 +14,7 @@ public class Games.NintendoDsSavestate : Savestate {
                        screen_layout = NintendoDsLayout.from_value (layout_value);
                }
                catch (KeyFileError e) {
-                       critical ("Failed to get Nintendo DS metadata from metadata file for savestate at %s: 
%s", path, e.message);
+                       critical ("Failed to get Nintendo DS metadata from metadata file for snapshot at %s: 
%s", path, e.message);
                        return;
                }
        }
diff --git a/src/core/savestate.vala b/src/core/savestate.vala
index 192a85a1..581b5646 100644
--- a/src/core/savestate.vala
+++ b/src/core/savestate.vala
@@ -34,7 +34,7 @@ public class Games.Savestate : Object {
                                return metadata.get_string ("Metadata", "Name");
                }
                catch (KeyFileError e) {
-                       critical ("Failed to get name from metadata file for savestate at %s: %s", path, 
e.message);
+                       critical ("Failed to get name from metadata file for snapshot at %s: %s", path, 
e.message);
                        return null;
                }
        }
@@ -49,7 +49,7 @@ public class Games.Savestate : Object {
                        metadata.save_to_file (metadata_file_path);
                }
                catch (Error e) {
-                       critical ("Failed to set name in metadata file for savestate at %s: %s", path, 
e.message);
+                       critical ("Failed to set name in metadata file for snapshot at %s: %s", path, 
e.message);
                }
        }
 
@@ -62,7 +62,7 @@ public class Games.Savestate : Object {
                        return new DateTime.from_iso8601 (creation_date_str, new TimeZone.local ());
                }
                catch (Error e) {
-                       critical ("Failed to get creation date from metadata file for savestate at %s: %s", 
path, e.message);
+                       critical ("Failed to get creation date from metadata file for snapshot at %s: %s", 
path, e.message);
                        return null;
                }
        }
@@ -127,7 +127,7 @@ public class Games.Savestate : Object {
                var media_path = Path.build_filename (path, "media");
 
                if (!FileUtils.test (media_path, FileTest.EXISTS))
-                       throw new FileError.ACCES ("Savestate at %s does not contain media file", path);
+                       throw new FileError.ACCES ("Snapshot at %s does not contain media file", path);
 
                string contents;
                FileUtils.get_contents (media_path, out contents);
@@ -222,7 +222,7 @@ public class Games.Savestate : Object {
                        return metadata.get_boolean ("Metadata", "Automatic");
                }
                catch (Error e) {
-                       critical ("Failed to get Automatic field from metadata file for savestate at %s: %s", 
path, e.message);
+                       critical ("Failed to get Automatic field from metadata file for snapshot at %s: %s", 
path, e.message);
                        return false;
                }
        }
@@ -236,7 +236,7 @@ public class Games.Savestate : Object {
                        FileOperations.delete_files (savestate_dir, {});
                }
                catch (Error e) {
-                       warning ("Failed to delete savestate at %s: %s", path, e.message);
+                       warning ("Failed to delete snapshot at %s: %s", path, e.message);
                }
        }
 
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index 7ece6be0..ee0eea56 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -214,9 +214,8 @@ public class Games.RetroRunner : Object, Runner {
        }
 
        public Savestate[] get_savestates () {
-               if (game_savestates == null) {
-                       critical ("RetroRunner hasn't loaded savestates. Call try_init_phase_one()");
-               }
+               if (game_savestates == null)
+                       critical ("RetroRunner hasn't loaded snapshots. Call try_init_phase_one()");
 
                return game_savestates;
        }
@@ -462,7 +461,7 @@ public class Games.RetroRunner : Object, Runner {
                        return create_savestate (is_automatic);
                }
                catch (Error e) {
-                       critical ("RetroRunner failed to create savestate: %s", e.message);
+                       critical ("Failed to create snapshot: %s", e.message);
 
                        return null;
                }
@@ -615,7 +614,7 @@ public class Games.RetroRunner : Object, Runner {
 
        private string create_new_savestate_name () throws Error {
                var list = new List<int>();
-               var regex = new Regex (_("New savestate %s").printf ("([1-9]\\d*)"));
+               var regex = new Regex (_("New snapshot %s").printf ("([1-9]\\d*)"));
 
                foreach (var savestate in game_savestates) {
                        if (savestate.is_automatic ())
@@ -641,7 +640,7 @@ public class Games.RetroRunner : Object, Runner {
                                break;
                }
 
-               return _("New savestate %s").printf (next_number.to_string ());
+               return _("New snapshot %s").printf (next_number.to_string ());
        }
 
        // Decide if there are too many automatic savestates and delete the
diff --git a/src/ui/display-view.vala b/src/ui/display-view.vala
index b718e707..43b334b1 100644
--- a/src/ui/display-view.vala
+++ b/src/ui/display-view.vala
@@ -193,7 +193,7 @@ private class Games.DisplayView : Object, UiView {
                        box.runner.load_previewed_savestate ();
                }
                catch (Error e) {
-                       warning ("Failed to load savestate: %s", e.message);
+                       warning ("Failed to load snapshot: %s", e.message);
                }
 
                box.runner.resume ();
diff --git a/src/ui/savestate-listbox-row.vala b/src/ui/savestate-listbox-row.vala
index 17b64508..f1846b5e 100644
--- a/src/ui/savestate-listbox-row.vala
+++ b/src/ui/savestate-listbox-row.vala
@@ -76,7 +76,7 @@ private class Games.SavestateListBoxRow : Gtk.ListBoxRow {
                                                                    false);
                }
                catch (Error e) {
-                       warning ("Failed to load savestate thumbnail: %s", e.message);
+                       warning ("Failed to load snapshot thumbnail: %s", e.message);
                }
        }
 
diff --git a/src/ui/savestates-list.vala b/src/ui/savestates-list.vala
index 192dfe19..927e3894 100644
--- a/src/ui/savestates-list.vala
+++ b/src/ui/savestates-list.vala
@@ -111,7 +111,7 @@ private class Games.SavestatesList : Gtk.Box {
        private void on_load_clicked () {
                if (!try_runner_load_previewed_savestate ()) {
                        // TODO: Here we could show a dialog with one button like
-                       // "Failed to load savestate [Ok]"
+                       // "Failed to load snapshot [Ok]"
                }
 
                state.is_revealed = false;
@@ -122,7 +122,7 @@ private class Games.SavestatesList : Gtk.Box {
                        _runner.load_previewed_savestate ();
                }
                catch (Error e) {
-                       critical ("Failed to load savestate: %s", e.message);
+                       critical ("Failed to load snapshot: %s", e.message);
 
                        return false;
                }
@@ -244,7 +244,7 @@ private class Games.SavestatesList : Gtk.Box {
                        if (savestate.get_name () == entry_text) {
                                rename_entry.get_style_context ().add_class ("error");
                                rename_popover_btn.sensitive = false;
-                               rename_error_label.label = _("A savestate with this name already exists");
+                               rename_error_label.label = _("A snapshot with this name already exists");
 
                                return false;
                        }


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