[gnome-subtitles] Fix #91 Some strings are displayed untranslated



commit 582405ff3b19251700243a988395c7d9cb27119f
Author: Pedro Castro <pedro gnomesubtitles org>
Date:   Tue May 28 21:45:02 2019 +0100

    Fix #91 Some strings are displayed untranslated
    
    Some strings are displayed in their untranslated form: Start, End,
    Duration, Text Translation

 src/GnomeSubtitles/Core/Base.cs                  | 4 +++-
 src/GnomeSubtitles/Execution/ExecutionContext.cs | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/GnomeSubtitles/Core/Base.cs b/src/GnomeSubtitles/Core/Base.cs
index 5b5b9c2..8c66d5b 100644
--- a/src/GnomeSubtitles/Core/Base.cs
+++ b/src/GnomeSubtitles/Core/Base.cs
@@ -274,6 +274,9 @@ public class Base {
 
                executionContext = newExecutionContext;
                executionContext.InitApplication();
+               
+               Catalog.Init(ExecutionContext.TranslationDomain, ExecutionContext.LocaleDir);
+               
 
                /* Initialize Command manager */
                commandManager = new CommandManager();
@@ -293,7 +296,6 @@ public class Base {
                /* Initialize the GUI */
                ui = new MainUi(handlers);
                clipboards.WatchPrimaryChanges = true;
-               Catalog.Init(ExecutionContext.TranslationDomain, ExecutionContext.LocaleDir);
 
                EmitInitFinishedEvent();
        }
diff --git a/src/GnomeSubtitles/Execution/ExecutionContext.cs 
b/src/GnomeSubtitles/Execution/ExecutionContext.cs
index 27e0d7d..e0c268e 100644
--- a/src/GnomeSubtitles/Execution/ExecutionContext.cs
+++ b/src/GnomeSubtitles/Execution/ExecutionContext.cs
@@ -46,6 +46,7 @@ public class ExecutionContext {
 
        private void SetDynamicVariables () {
                this.localeDir = System.AppDomain.CurrentDomain.BaseDirectory + "../../share/locale";
+               //this.localeDir = "/usr/share/locale"; //for testing
 
                /* Handle platform */
                switch (Environment.OSVersion.Platform) {


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