2

I need to package proprietary program for Russian local market.
To build RPM package, i used this guide: https://stackoverflow.com/a/1165200/1794089

So, i need to translate RPM package description to Russian, i.e. localize them. I'm googled that method: https://www.redhat.com/archives/rpm-list/2004-January/msg00062.html

But it not work: in Fedora 21 x64 software installation center still show package summary/description in English - while system locale is ru_RU.UTF-8.

What am i doing wrong?

SPEC file fragment:

...
Summary: Test
Summary(ru): Тест
...
License: Proprietary
...

%description
 Test application

%description -l ru
 Тестовое приложение
Community
  • 1
  • 1
eraxillan
  • 1,552
  • 1
  • 19
  • 40

1 Answers1

1

The link (https://www.redhat.com/archives/rpm-list/2004-January/msg00062.html) you posted mentions specspo: specspo is a look aside cache for the group/description/summary tags that is in gettext PO format to simplify translating large scale distro-wide translations of package metadata.

Short answer: If specspo is installed, then group/summary/description tags in the package are not used.

Jeff Johnson
  • 2,310
  • 13
  • 23
  • Okay, but is there any documentaion about `specspo`? I'm unable to google smth like tutorial/example of this :( – eraxillan Jun 26 '15 at 08:59
  • Documentation of what? The RPM piece of the puzzle is a 2 level lookup – Jeff Johnson Jun 26 '15 at 17:56
  • Documentation of what? The RPM piece of the puzzle is a 2 level look aside lookup, first using package metadata to get the msgid (from the unused "en_US" locale, then using the retrieved msgid to find the localized msgstr ro return from headerGet. How to manage the specspo translation process is a distro, not an rpm, functionality. – Jeff Johnson Jun 26 '15 at 18:05
  • The code that does the look aside retrieval for group/summary/description can be found by grep'ing for "en_US" in rpm sources. The distro translation process is far more complex. – Jeff Johnson Jun 26 '15 at 18:12
  • Hint: Uninstall the specspo package and rpm will use the tags in the header, not the look aside cache retrieved values. – Jeff Johnson Jun 26 '15 at 18:14
  • Documentaion about `specspo` usage from scratch. Also, i'm never used `gettext` at all, so all this stuff is hard to understand for me :/ Okay, i will read `rpm` sources to understand how it find localized description string... – eraxillan Jun 27 '15 at 18:39
  • Yes the translation process is hard to understand, though conceptually simple. Basically PO files are (key, val) pairs called (msgid,msgstr). get text is passed a msgid and returns the msgstr (from the appropriate locale file). – Jeff Johnson Jun 27 '15 at 20:32
  • All that rpm is doing is a 2 level lookup: so msgid= gettext(pkgname) in the en_US locale, and then msgstr = get text(msgid) in the appropriate locale, for each of group/summary/description tags. – Jeff Johnson Jun 27 '15 at 20:34
  • For a proprietary packaging outside of the Fedora distro, erasing the specspo package and using tags from the package is likely going to be the only (and imperfect) choice permitted. – Jeff Johnson Jun 27 '15 at 20:36