Re: [Doxygen-develop] new feature proposal: filter maps
Brought to you by:
dimitri
From: Francesco M. <f18...@ya...> - 2008-03-13 17:53:10
|
Oleg Batrashev ha scritto: > Hi, > >> However I think that it shouldn't be difficult to add to Doxygen a >> generic system which allows to override the default strings returned by >> the Translator-derived class selected for use. > I would move "resourece strings" and localization completely to text > conf files. It worked very well in my past experience with Java and > Python. however how do you take "decisions" in text conf files? some functions take boolean arguments and output different strings dependending on it... I was proposing something simpler only for project-specific filtering; changing all doxygen's Translator class implementations seems inefficient to me (doxygen would be slower since it needs to read the text conf file). > And compilation time translator files take is huge. I don't think this is a major problem... not many doxygen users compile it from sources I think (all major distro have it packaged) :) >> I.e. we could add an option, say "OUTPUT_FILTER", which allows the user >> to specify a text file to use as "filter map". >> Suppose I want in my project to have "Modules" label (returned by >> trModules() function) replaced by a "SomethingElse" label and the text >> returned by trGeneratedAutomatically(const char*s) replaced by >> "Generated for " + s + " by Doxygen". >> Then I could simply write in the "filter map": >> >> trModules=SomethingElse >> trGeneratedAutomatically=Generated for \1 by Doxygen ops; here I wanted to write trGeneratedAutomatically{1}=Generated for \1 by Doxygen actually. > Yes, in Python I would use something like > module=module > generatedAutomatically=Generated for %{project-name} by Doxygen hmmm, I think reusing the same ALIASes syntax would be simpler and more intuitive for the user... > So, you just need to tweak a resource (localization) file and pass it > to doxygen as a replacement to original. > > But it is quite an effort to reimplement. in fact... my approach seems easier to me. Thanks anyway for your suggestions :) Francesco |