[longomatch] Translate shortcuts descriptions correctly
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Translate shortcuts descriptions correctly
- Date: Mon, 27 Apr 2015 22:22:22 +0000 (UTC)
commit f2b9558c9b8dc0ea412246c38b8849b618b72b04
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Fri Apr 24 21:36:05 2015 +0200
Translate shortcuts descriptions correctly
LongoMatch.Core/Common/Hotkeys.cs | 10 +++++++---
LongoMatch.Services/CoreServices.cs | 2 ++
2 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/LongoMatch.Core/Common/Hotkeys.cs b/LongoMatch.Core/Common/Hotkeys.cs
index 100d573..7bf0f96 100644
--- a/LongoMatch.Core/Common/Hotkeys.cs
+++ b/LongoMatch.Core/Common/Hotkeys.cs
@@ -31,7 +31,8 @@ namespace LongoMatch.Core.Common
{
ActionsDescriptions = new Dictionary<KeyAction, string> ();
ActionsHotkeys = new Dictionary<KeyAction, HotKey> ();
- FillDefaults ();
+ FillActionsDescriptions ();
+ FillDefaultMappings ();
}
[JsonIgnore]
@@ -51,7 +52,7 @@ namespace LongoMatch.Core.Common
ActionsHotkeys [action] = key;
}
- void FillDefaults ()
+ public void FillActionsDescriptions ()
{
ActionsDescriptions [KeyAction.DeleteEvent] = Catalog.GetString ("Delete selected
event");
ActionsDescriptions [KeyAction.DrawFrame] = Catalog.GetString ("Draw frame");
@@ -80,7 +81,10 @@ namespace LongoMatch.Core.Common
ActionsDescriptions [KeyAction.TogglePlay] = Catalog.GetString ("Toggle playback");
ActionsDescriptions [KeyAction.ZoomIn] = Catalog.GetString ("Zoom timeline in");
ActionsDescriptions [KeyAction.ZoomOut] = Catalog.GetString ("Zoom timeline out");
-
+ }
+
+ void FillDefaultMappings ()
+ {
UpdateMapping (KeyAction.DeleteEvent, "<Shift_L>+d");
UpdateMapping (KeyAction.DrawFrame, "<Shift_L>+f");
UpdateMapping (KeyAction.EditEvent, "<Shift_L>+e");
diff --git a/LongoMatch.Services/CoreServices.cs b/LongoMatch.Services/CoreServices.cs
index 8455f09..61739d5 100644
--- a/LongoMatch.Services/CoreServices.cs
+++ b/LongoMatch.Services/CoreServices.cs
@@ -76,6 +76,8 @@ namespace LongoMatch.Services
}
InitTranslations ();
+ /* Fill up the descriptions again after initializing the translations */
+ Config.Hotkeys.FillActionsDescriptions ();
}
public static void InitTranslations ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]