On 10/03/2013 01:28 PM, Michael T. Pope wrote:
> I am struggling to get all the options displaying correctly and/or
> consistently.  AFAICT as of the last patch they are working (across
> preferences, difficulty, map options and game options), but without
> descriptions of the String/SelectOption[1] values.  Currently the values
> are looked up with Messages.message() which requires the base key
> (e.g. "model.option.buildOnNativeLand.always") where I would rather
> use the .name/.shortDescription form so as to be able to provide a
> tooltip.  I had this working a patch or two back, but only by breaking
> other options, which is a sign that I do not understand how this code
> is supposed to work.  For now the .shortDescription strings are still
> in FreeColMessages.properties but commented out.  How can this be made
> to work?
>
> [1] And while I am asking, is there are real useful difference between
> a StringOption-with-choices and a SelectOption?  ISTM the former
> should just become the latter.
>
> Cheers,
> Mike Pope
>


Well, the difference between the SelectOption and the StringOption is 
that the former wraps an integer, and the latter a string. Of course, if 
the code that actually uses that value can convert it as needed, they 
would be equivalent. The localization of option names is something of a 
technical debt. As far as I recall, it was already in place before the 
current scheme of ID + ".name", etc. was introduced. I see no reason not 
to change the option localization conventions, except that it would 
cause some churn for the translators.

I'm afraid I don't understand your question about the String or 
SelectOption values, though.


Regards

Michael


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk
_______________________________________________
Freecol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freecol-developers

Reply via email to