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

Re: localised rpm -qi



On Wed, Jan 23, 2002 at 03:56:41PM +0100, Tomas Zellerin wrote:
> Hello,
> 
> is it possible to have more descriptions etc. in a rpm package, one for
> each (suported) locale, so that rpm -qi[p] outputs the proper one,
> similarily to the way gettext does it? If so, please point me to proper RTFM. 

You can add locale specific text to a spec file by using
	
	Summary(L1):
	Group(L1):
	%description -l L1

where L1 is a locale

However, be forewarned:

On a Red Hat system (possibly others), if the specspo package is installed,
summary/group/description are read from specspo msgstr's, not from the
package. No Red Hat package has any locale specific text in packages
any more.

The specspo mechanism does a 2 level lookup using dgettext, first to
do the string mapping from a known token (assuming package "foo" group tag)

	msgid "foo(Group)"
	msgstr "the usual C locale text for Group:"

then finally to get the locale specific msgstr

	msgid "the usual C locale text for Group:"
	msgstr "the final locale text for Group:"

The locations for "locale collections" (dunno what to call this, kinda
like i18n domains) is configured with the macro %_i18ndomains, a
colon seperated set of directory names. For example, the file
/etc/rpm/macros.specspo contains
	%_i18ndomains   redhat-dist
which directs the summary/group/description lookup mechanism to
	/usr/share/locale/cs/LC_MESSAGES/redhat-dist.mo
	etc.
The en_US locale is used (abused?) to do the 1st level lookup above, the
2nd level lookup is then performed as usual.

HTH

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@jbj.org	(jbj@redhat.com)
Chapel Hill, NC





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