mono / monodevelop

MonoDevelop is a cross platform .NET IDE
http://www.monodevelop.com
2.82k stars 1.01k forks source link

GTK warning at startup about unsupported locale #4430

Open mhutch opened 6 years ago

mhutch commented 6 years ago

At startup, GTK logs an error that the current locale is not supported

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 
  at MonoDevelop.Components.IdeTheme.InitializeGtk (System.String progname, System.String[]& args) [0x00110] in /Users/mikayla/code/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Components/IdeTheme.cs:95 
  at MonoDevelop.Ide.IdeStartup.Run (MonoDevelop.Ide.MonoDevelopOptions options) [0x00156] in /Users/mikayla/code/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs:117 
  at MonoDevelop.Ide.IdeStartup.Main (System.String[] args, MonoDevelop.Ide.Extensions.IdeCustomizer customizer) [0x000c4] in /Users/mikayla/code/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide/IdeStartup.cs:622 
  at MonoDevelop.Startup.MonoDevelopMain.Main (System.String[] args) [0x00001] in /Users/mikayla/code/monodevelop/main/src/core/MonoDevelop.Startup/MonoDevelop.Startup/MonoDevelopMain.cs:39 

VS bug #594227

Therzok commented 6 years ago

The thing is, we do this: https://github.com/mono/monodevelop/blob/master/main/build/MacOSX/monostub.mm#L255-L273

Not sure if we initialize gettext before or after Gtk is initialized. https://github.com/mono/monodevelop/blob/master/main/src/core/MonoDevelop.Core/MonoDevelop.Core/Gettext.cs#L66

mhutch commented 6 years ago

Still seeing this on master

Therzok commented 6 years ago

How are you launching MonoDevelop?

mhutch commented 6 years ago

make run

Therzok commented 6 years ago

@mhutch In GettextCatalog.SetLocale what is the locale?

mhutch commented 6 years ago

@Therzok 'en'. Wonder whether it needs to resolve to en-us.

Therzok commented 6 years ago

It should, yes.