Hi,
> Gesendet: Sonntag, 27. November 2016 um 22:07 Uhr > Von: "Michael T. Pope" <mp...@computer.org> > An: freecol-developers@lists.sourceforge.net > Betreff: Re: [Freecol-developers] More Questions About #43 > > On Sun, 27 Nov 2016 15:21:55 -0500 > Dong Kim <dong...@andrew.cmu.edu> wrote: > > I had a few more questions about ticket #43. In order to display EU selling > > price, we are currently creating a new string to append > > to Messages.message(item.getLabel()), and were wondering if we would need > > to manually add Messages.key = value in all FreeColMessages.properties > > files in /data/strings, or just simply keep the appended string. > > FreeColMessages.properties is the master messages file. The translators > use that to make the internationalized versions thereof in > .../data/strings. Do not edit those, only the master messages file. > You should be careful to avoid any string manipulation on possibly translated messages! For example, you might think its ok to just add them together and it might then look like it was correct in English, but some other languages can have other sentence structures and the thing you appended at the end might need to be in the middle of the sentence in some other language or it would be wrong. I think, messages allow for parameters the translators can move around in the translated sentence to avoid such problems. There are some helper methods for doing that and you should be able to find examples in code and the message file. > > We also realized that this may lead to overlapping text or other unexpected > > formatting in the UI if the text becomes too long, especially if the text > > is in a button. Where should we look in the code to manage this? > > Hopefully wintertime can comment here. I try to keep away from UI issues. > Generally though, where the text gets too long it can often be simplified > by using a (small) image, particularly for goods. > Swing widgets have automatic resizing, but for some elements it got disabled somehow in the code or constraints placed. FreeCol code is not consistent in regards to that, so it depends on the parts you want to change. Easiest is to just try it out (and it should also look well/be compatible with activated --gui-scale commant line option). > > Would it > be possible to dynamically change the size of panels and buttons > > according > > to the length of the text, or at least preserve text wrapping, if not done > > so already? > > I doubt it will be possible or desirable to change sizes of existing > elements. IIRC FreeCol generally tries to have the full text for buttons > ready at the point of creation thus allowing the Java libraries to size > them suitably. > Yes, I'd try to avoid changing sizes, but some small adaptations might turn out necessary. You better avoid putting too much text inside a button, as that would look strange. Greetings, wintertime ------------------------------------------------------------------------------ _______________________________________________ Freecol-developers mailing list Freecol-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freecol-developers