Angus Leeming <[EMAIL PROTECTED]> writes:

| Lars Gullik Bjønnes wrote:
>> | So, let me ask why you think that users on such systems should have
>> | these messages output only in English?
>> 
>> but this is done after main has run so the package stuff should have
>> been able to finish by the time the help text is outputted
>
| What? Wrong!

If you put the package stuff a bit earlier...

>
| void LyX::priv_exec(int & argc, char * argv[])
| {
|     // Here's where we parse "lyx -help", etc
|     bool const want_gui = easyParse(argc, argv);

Make this never output anything, either returned object or bool tells
us what to do.


|     // Here's where the paths to the directories are ascertained.
|     // We need to easyParse() first because we might need
|     // "-sysdir foo -userdir bar"
|     lyx::support::init_package(argv[0], 
|                                cl_system_support,
|                                cl_user_support);
>
|     // Only now do we initialise gettext.
|     string const & locale_dir = package().locale_dir();
|     FileInfo fi(locale_dir);
|     if (fi.isOK() && fi.isDir()) {
|         // gettext_init(locale_dir);
|     }

      And then:

      if (easyParse.failed() || package.failed())
         LyX::usage();
        
Which can use the message class, since now the package stuff is
initialized.


|     // Finally we're in a position to output all messages
|     // that have been stored to date and have these messages
|     // displayed in <choose your language>.
|     lazy::messages().flush();

Then drop this and all code needed to make it work.

My point is that we can just move things around a bit, we don't need
elaborate classes to support something that only happens on a brief
spell upon startup.

-- 
        Lgb

Reply via email to