app: split sanity check into early/late stages, to fix gegl translation

The GEGL ops sanity check causes all ops to be initialized.  The
strings used by their properties will pick the translation selected
at the time of the check.  It must therefore run after language
intiailization, otherwise the selected translation would correspond
to the system locale, even if the user selected a different language
in the preferences.

Split the sanity check into early and late stages.  The early stage
is run before the call to app_run(), as it did before, while the
late stage is run during app_run(), after the configuration has been
loaded.  Currently, the GEGL ops check is the only late-stage check;
all other checks are performed during the early stage.
This commit is contained in:
Ell 2017-06-15 09:30:45 -04:00
parent 7bf04966d4
commit d37fb8aa5c
4 changed files with 97 additions and 57 deletions

View file

@ -536,7 +536,7 @@ main (int argc,
}
#endif
abort_message = sanity_check ();
abort_message = sanity_check_early ();
if (abort_message)
app_abort (no_interface, abort_message);