[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [RFC] Support column alignment in (multi)select debconf questions



Jérémy Bobbio wrote:
> Attached is a patch adding a new capability to cdebconf named "align",
> following Anton's proposal [1] and as discussed during the september IRC
> meeting [2].

I've given this patch a try, and it looks really good!

I agree with Otavio that using a tab as column separator is not a good
idea, but for a completely different reason.
I can imagine you'd have a case where you'd want a string including
columns to be translated. If you use a tab, this is almost guaranteed to
result in broken translations (tab is likely to get replaced with spaces).

I'd really like to see an example of a case where you have info on some
lines that spans multiple columns.
That could be another reason to use some different separator: you could
then also define some code that instructs the frontend to span a specific
number of columns, making the whole idea a lot more flexible.

+++ b/packages/localechooser/mktemplates.language
-                            (" " x (22 - length($name))).
-                           "- $translation";
+                           "\t- $translation";

I would suggest using "\t-\t" here, i.e. treating the separator as a
separate "column". I've tested this and it works fine (adds a bit of extra
spacing after the separator, but it looks good to me).

At first I had some doubts about the "-" separator for the graphical
frontend because I expected to see the columns to be already separated by
the gtk code (with a thin vertical line that could possibly be used to
resize the columns). As that is not the case, this is fine.
I don't really think we need resizable columns in debconf, but if that
would be a future option, using a hardcoded separator like this would
become a problem. Just something to be aware of.

Nice work!

Frans



Reply to: