[systemd-devel] Journal Message Catalog

Michal Vyskocil mvyskocil at suse.cz
Fri Feb 15 02:23:04 PST 2013

On Thu, Feb 14, 2013 at 10:46:34PM +0100, Lennart Poettering wrote:
> On Thu, 14.02.13 15:21, Keith Robertson (kroberts at redhat.com) wrote:
> > 
> > On 02/14/2013 03:14 PM, Lennart Poettering wrote:
> > >Note that you may have multiple catalog files and you can distribute the
> > >translations among multiple files. This leaves full flexibility to the
> > >projects which want to provide message catalog entries. For example,
> > >they could create individual files:
> > >
> > >/usr/lib/systemd/catalog/foobar.catalog
> > >/usr/lib/systemd/catalog/foobar-de_DE.catalog
> > >/usr/lib/systemd/catalog/foobar-fr_FR.catalog
> > If a project follows the pattern described in [1] do they still need
> > to suffix every message ID therein with '-de_DE' or, can systemd
> > discover the locale from the catalog name (ie.
> > foobar-de_DE.catalog)?
> Hmm, interesting idea...
> We could extend the msg catalog compiler to look at the filename for the
> "default" implied language if the message ids are not suffixed... But if
> we do that, we probably should use "." as separator so that:

What about to store localized catalogs in gettext-style subdirs instead?
So the de_DE/foobar.catalog and maybe even C/foobar.catalog for C and
en_US locale? If nothing it will make operations like readdir or glob
a bit faster and users are typically interested in one (+ C as a backup) locale

> foobar.catalog → language is C if not explicitly suffixed in the file
> foobar.de_DE.catalog → language is de_DE if not explicitly suffixed in the file
> and so on. That should be a good solution for your usecase, right?

so either

foobar.catalog -> C



where C can be a link to en_US.

Michal Vyskocil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20130215/9a50cfd2/attachment.pgp>

More information about the systemd-devel mailing list