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,