On 8 Nov 14, at 12:15, Juha Manninen wrote: > On Fri, Nov 7, 2014 at 1:13 AM, Tomas Hajny <xhaj...@hajny.biz> wrote: > > If you mean that FPC itself should use a JSON file for generating the > > help, that doesn't sound like a good idea to me (see below). > > I think it is a good idea if only somebody implemented it. It is not a > trivial thing to implement of course. > It seems Dmitry is not working towards a patch either so very likely > this will never happen. > > Anyway, the JSON records and structure would contain info about FPC > targets, usefulnes in an external (Lazarus) GUI, type of selection > (single/multi select), links to section lists etc., all in a parser > friendly way. > A JSON parser in FPC itself would generated "fpc -h" and "fpc -i" > outputs when requested, but external programs (like Lazarus) could get > the JSON data with "fpc -hj" or something. > Yes, it is a good idea!
I don't think that it's a good idea because it would make translations more difficult than they are now and support for translations is the primary goal of the message files. Also, all message files would need to preserve the same metadata which should be added according to your suggestion, etc. However, FPC itself couldn't use this metadata directly anyway most likely, because it needs more logic for processing these options which probably wouldn't fit in the metadata anyway. From this point of view, storing the "metadata" in a separate file is probably a better option. We could add such "metadata" file (needed for Lazarus but possibly useful to other GUIs as well) to FPC and provide means for checking the consistency with the message file (similar to the msgdiff tool), of course - but that would need to be based on some external contribution. > --- > I have created issues > http://bugs.freepascal.org/view.php?id=27013 > and > http://bugs.freepascal.org/view.php?id=27014 > (as Tomas noticed.) Indeed. :-) I've already started looking at the second one. I may have a look at the first one as well if I find enough information about meaning of the missing options easily (otherwise I'll leave it to someone else knowing more about them). Tomas _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel