Re: multilang questions

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

 




On Jan 26, 2006, at 5:42 AM, Egmont Koblinger wrote:

Hi folks,

Very short intro: I've already sent some messages to rpm-devel, but this time I have a user question so I subscribed to this list too. I'm working
for the Hungarian Linux distribution called UHU-Linux. Currently we're
trying to migrate from our current package manager to rpm. Hence I'll
probably have many questions. To begin with, here's a question-set about
handling multiple languages.

I've already seen "Summary(lang)" and "%description -l lang" in some spec files, and they work just as I expect: queries show the version according to my locale settings, converting UTF-8 used in the .spec file into my current
charset and so on... Fine.


I also wanted to say:
 Vendor:     UHU-Linux Ltd.
 Vendor(hu): UHU-Linux Kft.
but rpm didn't allow it.


Yep. Different data type. The Vendor: tag is type RPM_STRING_TYPE, not RPM_I18N_STRING.

I haven't tried, but for some other fields it might also make sense to have lang-specific values. E.g. "URL(hu):" could directly point to the Hungarian homepage, while "URL:" points to an English one. In theory, "% changelog -l hu" could also make sense, but I don't think it is worth it to translate
changelogs :)


Changing Url: to be locale specific makes little sense to me, mostly because the lifetime of a package is often longer than the lifetime of a URL, i.e. the data in the package is likely to be incorrect or irrelevant months or years after being built. True for locale independent
URL's.

What are exactly the fields that can have multi-language values?


Only Summary/Description/Group are of type RPM_I18N_STRING.


I tried to perform a query: --qf "%{summary(hu)}" but it didn't work either. Is it possible to query for multiple languages in one invocation of rpm (so
without having to re-run rpm with a different LANG for each language)?


One locale per query.

Is it possible to query the list of languages for which a particular field
is translated, or to query all these translations themselves?


Not possible in general for Summary/Description/Group because the text that is presented
is often outside of packages.

This will show what languages have been included inside the package:
	rpm -qp --qf '[%{headeri18ntable}\n]' foo*.rpm

The specspo mechanism is far more flexible than RPM_I18N_STRING because
the text can be updated and corrected months and years later without rebuilding
the package.

hth

73 de Jeff

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux