[devel] [jbj на JBJ.ORG: Re: localised rpm -qi]

Dmitry V. Levin ldv на alt-linux.org
Ср Янв 23 19:05:21 MSK 2002


----- Forwarded message from Jeff Johnson <jbj на JBJ.ORG> -----

Date: Wed, 23 Jan 2002 10:30:40 -0500
From: Jeff Johnson <jbj на JBJ.ORG>
To: rpm-list на redhat.com
Subject: 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
	%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
The en_US locale is used (abused?) to do the 1st level lookup above, the
2nd level lookup is then performed as usual.


73 de Jeff

Jeff Johnson	ARS N3NPQ
jbj на jbj.org	(jbj на redhat.com)
Chapel Hill, NC

Rpm-list mailing list
Rpm-list на redhat.com

----- End forwarded message -----


Dmitry V. Levin     mailto://ldv@alt-linux.org
ALT Linux Team      http://www.altlinux.com/
Fandra Project      http://www.fandra.org/
UNIX is user friendly. It's just very selective about who its friends are.
----------- следующая часть -----------
Было удалено вложение не в текстовом формате...
Имя     : отсутствует
Тип     : application/pgp-signature
Размер  : 232 байтов
Описание: отсутствует
Url     : http://lists.altlinux.org/pipermail/devel/attachments/20020123/18a284c1/attachment.bin 

Подробная информация о списке рассылки Devel