Skip to content

Commit

Permalink
[Fixed] Locale issues
Browse files Browse the repository at this point in the history
- When `en` isn't installed
- And using other locale
- For KiCad 7/8
  • Loading branch information
set-soft committed Oct 8, 2024
1 parent 5ef9004 commit 463aea7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/eeschema_do
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,8 @@ if __name__ == '__main__':
# Configure KiCad in a deterministic way
#
# Force english + UTF-8
os.environ['LANG'] = get_en_locale(logger)
# Note: KiCad 6 needs a valid locale here, 7 doesn't
os.environ['LANG'] = 'en' if cfg.ki7 else get_en_locale(logger)
# Ensure we have a config dir
check_kicad_config_dir(cfg)
# Make sure the user has sym-lib-table
Expand Down
5 changes: 3 additions & 2 deletions src/pcbnew_do
Original file line number Diff line number Diff line change
Expand Up @@ -1690,8 +1690,9 @@ if __name__ == '__main__': # noqa: C901
logger.debug('Print -> '+cfg.print_dlg_name)

# Force english + UTF-8
en_locale = get_en_locale(logger)
os.environ['LC_ALL'] = en_locale
# Note: KiCad 6 needs a valid locale, C uses english
# KiCad 7 doesn't need a valid locale 'en' is fine, C uses what LANG says
os.environ['LC_ALL'] = 'en' if cfg.ki7 else get_en_locale(logger)
# Force english for GTK dialogs
os.environ['LANGUAGE'] = 'en'
# Force Mesa software rendering (otherwise, the 3D viewer may crash)
Expand Down

0 comments on commit 463aea7

Please sign in to comment.