ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] [jbj@JBJ.ORG: Re: localised rpm -qi]
@ 2002-01-23 16:05 Dmitry V. Levin
  0 siblings, 0 replies; only message in thread
From: Dmitry V. Levin @ 2002-01-23 16:05 UTC (permalink / raw)
  To: devel

[-- Attachment #1: Type: text/plain, Size: 2372 bytes --]

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.

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-01-23 16:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-23 16:05 [devel] [jbj@JBJ.ORG: Re: localised rpm -qi] Dmitry V. Levin

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git