On Thu, May 12, 2016 at 08:49:03AM +0200, Lukas Ocilka wrote: > # The problem > > We often inform users in dialogs (e.g. warning pop-up, labels) about > some current situation which contains a generated text based on, for > instance, lists of disks or network interfaces. In many cases, the > length of these lists/strings is unknown when we write the text in our > code. Moreover, translations can change it quite a lot. Depending on the > selected UI type, we might or might not fit.
> # Solution > > Basically something like `fold`, but implemented in Ruby without calling > shell. Maybe in Yast::String, maybe even as a Yast built-in (fold, wrap, > wrap_at). > What are your thoughts about it? If you tell me that we already have it, > the better :) We just should start using it. Yes, we should have something like that. I even created a feature request many years ago but it was rejected several times. But the implementation should be in the UI since only that knows the font metric. Also when resizing dialogs the Ruby code is not rerun. And we have to remember that there are languages not using spaces for line-wrap, e.g. Japanese. Maybe other languages also need special handling. ciao Arvin -- Arvin Schnell, <[email protected]> Senior Software Engineer, Research & Development SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: [email protected] To contact the owner, e-mail: [email protected]
