Mailinglist Archive: yast-devel (61 mails)

< Previous Next >
[yast-devel] Idea: Dynamic Folding of Translated Texts

I've just got an idea and wanted to know your opinion. This came to my
mind when evaluating (which might not be
accessible for some of you, thus explaining below).

# 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.

# Example

You are trying to create subvolume {new_subvolume_name} which would be
shadowed by subvolume {old_subvolume_name} and thus might not produce
the desired effect. Continue despite the fact that we have warned you?

In bad the example above, subvolumes can be short, but they can be also
very long. Some languages will use very long translation, some other
ones a shorter one.

# 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,

We could, for instance, get inspired here
but I'd like to see some safe defaults depending on the selected UI or
even UI capabilities such as number of columns in ncurses.

What are your thoughts about it? If you tell me that we already have it,
the better :) We just should start using it.



Lukas Ocilka, Systems Management (Yast) Team Leader
SLE Department, SUSE Linux
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >