On Thursday 05 May 2022 13:30:39 Gaurav Kumar wrote:
> In SLES 15 SP3, I tried to do the same, merging all po files for a
> translated language and creating the package-translations-$lang.mo files.
> Now in SLES 15 SP3 during installation, if I change the language I am not
> getting the translated description for the patterns.
>
> I would really appreciate it if you could help us understand how to
> localize our patterns and package descriptions.
Hi Gaurav.
Translated package descriptions and summaries have to be provided in the
repositories metadata. Zypp is just consuming those data, so I can try to
explain where zypp expects them to be. But we're not involved in building the
repositories, so I can't tell which tools are used to provide the data there.
That's something the build service might be able to answer. They actually
create the repos.
At the server side the metadata reside in a directory named 'repodata' below
the
repositories baseURL. Among other files the 'repodata' directory contains:
(actual filename may be prefixed by a hash)
primary.xml.gz Common package metadata
suseinfo.xml.gz (optional)SUSE specific extension to the package metadata
susedata.LANG.xml.gz (optional)Localized package summary, description,...
Typical entires in a susedata.LANG.xml.gz (e.g. from a susedata.de.xml) loklike
this:
<package pkgid="752e...dc0" name="aaa_base" arch="x86_64">
<version epoch="0" ver="84.87+git20180409.04c9dae" rel="3.57.1"/>
<summary lang="de">openSUSE Basispaket</summary>
<description lang="de">Dieses Paket installiert diverse wichtige
Konfigurationsdateien und zentrale Skripte.</description>
</package>
So the first thing to check is whether localized data are provided at the
server
side at all.
The locales that should be supported by the system can be set in YAST during
installation. After installation they can be queried by using the `zypper
locales` command (changed by addlocale/removelocale).
If zypp refreshes repo metadata, it downloads only the susedata.LANG files for
the requested locales to /var/cache/zypp/raw/REPOALIAS/repodata.
So translations may be unavailable on the system because either the locales
settings do not include the language, or - after a change - the repodata have
not yet been refreshed (to fetch the new susedata.LANG files).
--
cu,
Michael Andres
+------------------------------------------------------------------+
Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4
+------------------------------------------------------------------+
Michael Andres (he/him/his), Engineering & Innovation, [email protected]
+------------------------------------------------------------------+
SUSE Software Solutions Germany GmbH, Maxfeldstr. 5, 90409 Nürnberg,
Germany, (HRB 36809, AG Nürnberg) Geschäftsführer: Ivo Totev
+------------------------------------------------------------------+