Re: Q_()



Hello!

On Tue, 2005-10-04 at 15:36 +0200, Egmont Koblinger wrote:
> Hi,
> 
> There's been a discussion here a few months ago how to make the same English
> text translated differently in different contexts. It was important e.g. for
> the texts of the bottom bar whose translations have to fit in 6 characters.
> 
> It seems to me that this wasn't fully implemented.

Agreed.

> I don't know how that thread ended and I cannot find it now, but I found the
> Q_() and g_strip_context() functions in glib (what already we use anyway) so
> it seems to me that they're the best (and most standard) choice we could
> stick to.

mc uses gettext_ui(), which is equivalent to Q_.

> These functions/macros are only available from glib 2.4, so currently we
> would need to test for their presence and use an own implementation if older
> glib is being used, but this shouldn't be a problem, as implementing these
> functions is a trivial job, and as we know it from the flames of last week,
> there are some autoconf gurus also who can implement autodetection. :-)

I don't think autodetection is needed.  All that's needed is a
replacement Q_() implementation in src/glibcompat.c.

> I think that using such a standard interface (even if it's a new one and we
> need temporary hacks to support older glib) is a perfect way to go, and will
> be even much better if one day in the far-far future we can drop support for
> glib < 2.4.
> 
> If you like this idea, I can send patch to mc to introduce this feature,
> except for the autoconf part. But maybe autoconf magic isn't needed at all,
> since Q_() is a macro, a simple #ifdef Q_ will do it in mc's source.

Correct.

I've committed the Q_() support.  Fixing the translation is left for
you.

-- 
Regards,
Pavel Roskin




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