kryskool / cefpython

Automatically exported from code.google.com/p/cefpython
0 stars 1 forks source link

The default en-US locale pak file fails to load on Mac #163

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
There is an error: "locale.file_path empty". The Resources/en-US.lproj/ 
directory is missing. On Windows and Linux there is an "en-US.pak" file.

The solution was to set the --locale_pak=Resources/en.lproj/locale.pak flag.

Now after looking at the CEF sources I see that it should be fixed by setting 
the --lang=en flag or using ApplicationSettings#locale_(string) option.

I am wondering if this error might have something to do with the fact that 
we're not using the directory structures like the one found in cefclient.app. 
CEF libraries are in the "Chromium Embedded Framework.framework" directory with 
Libraries/Resources subdirectories. I've put all libraries/executables in a 
single directory to make it consistent with how it's done on Windows and Linux. 
Also to avoid possible issues with app packagers like pyinstaller.

Original issue reported on code.google.com by czarek.t...@gmail.com on 14 Jan 2015 at 8:11

GoogleCodeExporter commented 9 years ago
The corresponding issue reported on the CEF Forum: 
http://www.magpcss.org/ceforum/viewtopic.php?f=6&t=12569

Original comment by czarek.t...@gmail.com on 14 Jan 2015 at 8:22

GoogleCodeExporter commented 9 years ago

Original comment by czarek.t...@gmail.com on 14 Jan 2015 at 8:23

GoogleCodeExporter commented 9 years ago
Marshall responded:

    Chromium code makes assumptions about the app bundle structure to find locale 
    files. If you don't have the expected structure then it fails.

TODO: let's get rid of the --locale_pak flag and use ApplicationSettings.lang 
option instead. Set the "en" lang by default in cefpython.Initialize(). Remove 
the --locale_pak switch from wxpython.py and chromectrl.py.

Original comment by czarek.t...@gmail.com on 14 Jan 2015 at 5:46