Allow translations to load from build dir

This commit is contained in:
Jon Evans 2021-02-12 22:38:02 -05:00
parent 1bb3135888
commit 884de1f932
1 changed files with 8 additions and 0 deletions

View File

@ -767,6 +767,14 @@ void PGM_BASE::SetLanguagePath()
wxLocale::AddCatalogLookupPathPrefix( fn.GetPath() );
}
}
if( wxGetEnv( wxT( "KICAD_RUN_FROM_BUILD_DIR" ), nullptr ) )
{
wxFileName fn( Pgm().GetExecutablePath() );
fn.RemoveLastDir();
fn.AppendDir( "translation" );
wxLocale::AddCatalogLookupPathPrefix( fn.GetPath() );
}
}