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

Dmitry V. Levin =?iso-8859-1?q?ldv_=CE=C1_alt-linux=2Eorg?=
Ср Янв 23 19:05:21 MSK 2002


JFYI

----- 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
	
	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

_______________________________________________
Rpm-list mailing list
Rpm-list на redhat.com
https://listman.redhat.com/mailman/listinfo/rpm-list

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

Regards,
	Dmitry

+-------------------------------------------------------------------------+
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.
----------- следующая часть -----------
Было удалено вложение не в текстовом формате...
Имя     : =?iso-8859-1?q?=CF=D4=D3=D5=D4=D3=D4=D7=D5=C5=D4?=
Тип     : application/pgp-signature
Размер  : 232 байтов
Описание: =?iso-8859-1?q?=CF=D4=D3=D5=D4=D3=D4=D7=D5=C5=D4?=
Url     : <http://lists.altlinux.org/pipermail/devel/attachments/20020123/18a284c1/attachment-0001.bin>


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