mcs-manager dialog too wide
Danny Milosavljevic
danny.milosavljevic at liwest.at
Mon Apr 3 21:22:04 CEST 2006
Hi,
Am Sonntag, den 02.04.2006, 11:09 -0300 schrieb Adriano Winter Bess:
> On Sun, Apr 02, 2006 at 02:58:27PM +0900, Daichi Kawahata wrote:
> > Yes I've noticed that too, it's defined by the most longest
> > strings among the translated strings, and in current Japanese
> > translation, it's far from 1:(1+?$B"e5)/2 as well
> > (xfce-mcs-manager.jpg).
>
> Japanese still looks great in comparison with pt_BR:
>
> http://www.das.ufsc.br/~adrianob/xfce-mcs-manager-pt_BR.jpg
>
> > As you've tried, I think a manually line-breaking may work if
> > that goes together with the centering, a GTK+ issue?
>
> Yes, that was my first attempt to fix it, but according to Brian (and I agree
> with him too) it's not the best thing to do.
>
> > In my opinion, I don't prefer force-wrapping, because unlike
> > Latin/Germanic languages, there's no `white space' punctuation
> > in between words in some languages. Invalidly wrapped in a word
> > must be worse in appearance.
>
> The idea of "force wrapping" doesn't mean wrapping something that doesn't have
> white space between words. AFAIK, GTK+ won't wrap labels without white space
> between words at all. The problem is that if you set line wrap on a GtkLabel (as
> xfce-mcs-manager indeed does):
>
> gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
>
> than you must also set the maximum width, otherwise line wrapping never takes
> place:
>
> gtk_widget_set_size_request (label, MAX_WIDTH, -1);
Doesn't
gtk_label_set_max_width_chars ()
work? That would take font size into consideration...
>
> > > You definitely should NOT be putting newlines in the translated
> > > text (actually, I think gettext will barf on this since the number
> > > of newlines in msgid and msgstr don't match).
> >
> > AFAIK, that happens only at leading/trailing new-line,
> >
> > `msgid' and `msgstr' entries do not both begin with '\n'
> > `msgid' and `msgstr' entries do not both end with '\n'
> >
> > therefore,
> >
> > msgid ""
> > "This is a really long line to put into the button, we should wrap this string by all means"
> > msgstr ""
> > "This is a really long line\n"
> > "to put into the button,\n"
> > "we should wrap this string\n"
> > "by all means"
> >
> > is no problem at all, rather it's one of well-known workarounds.
>
> One of the problems I've found with the above is that sometimes the same
> translated string is used for both the label in the xfce-mcs-manager dialog and
> the plugin main dialog title shown in the window manager (noticeably this
> happens with the Window Manager Tweaks plugin). Then if I use a newline, it
> appears in the window manager title, which is really weird.
Maybe we could have xfmn replace \n by space in the title? Still
hacky ;)
> I guess it would
> need context translation. Anyway, chaos arises ;)
>
> Regards,
> Adriano
cheers,
Danny
More information about the Xfce4-dev
mailing list