diff options
author | therzok <marius.ungureanu@xamarin.com> | 2018-04-03 22:58:10 +0300 |
---|---|---|
committer | Marius Ungureanu <teromario@yahoo.com> | 2018-04-04 10:52:12 +0300 |
commit | 95a19d02f4f5f1640fb36f8a37cfaad5e53754ec (patch) | |
tree | 84e3aa31976e544b02825ac04cd520cf3403e318 /main/src/core | |
parent | e0f55b4298e349bb5ca4eef6db3f7ed53b6a5848 (diff) |
[Ide] Fix Gtk warnings caused by unsupported locale
Fixes VSTS #594227 "GTK warning at startup about unsupported locale"
WARNING [2018-04-03 11:59:27Z]: Gtk-Warning: Locale not supported by C library.
Using the fallback 'C' locale.
Stack trace:
at Gtk.Application.gtk_init (System.Int32& , System.IntPtr& ) [0x00000] in <13dfc6c534074eb08a8f382a81e605d5>:0
at Gtk.Application.do_init (System.String progname, System.String[]& args, System.Boolean check) [0x0004d] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/gtk-sharp-None/gtk/Application.cs:102
at Gtk.Application.Init (System.String progname, System.String[]& args) [0x0000e] in /Users/builder/jenkins/workspace/build-package-osx-mono/2017-12/external/bockbuild/builds/gtk-sharp-None/gtk/Application.cs:131
Diffstat (limited to 'main/src/core')
-rw-r--r-- | main/src/core/MonoDevelop.Core/MonoDevelop.Core/Gettext.cs | 5 | ||||
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/Gettext.cs b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/Gettext.cs index 3d3d32c357..018be6afea 100644 --- a/main/src/core/MonoDevelop.Core/MonoDevelop.Core/Gettext.cs +++ b/main/src/core/MonoDevelop.Core/MonoDevelop.Core/Gettext.cs @@ -47,6 +47,11 @@ namespace MonoDevelop.Core const int LOCALE_CUSTOM_UNSPECIFIED = 4096;
+ public static void Initialize ()
+ {
+ // no-op, triggers static ctor.
+ }
+
static Dictionary<string, string> localeToCulture = new Dictionary<string, string> {
{ "cs", "cs-CZ" },
{ "de", "de-DE" },
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs index b3e22ab854..be6d282f6e 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs @@ -80,6 +80,7 @@ namespace MonoDevelop.Ide //ensure native libs initialized before we hit anything that p/invokes Platform.Initialize (); + GettextCatalog.Initialize (); LoggingService.LogInfo ("Operating System: {0}", SystemInformation.GetOperatingSystemDescription ()); |