Re: [PATCH 36/38] vfs: Add a sample program for the new mount API [ver #10]

Pavel Machek
2018-07-30T18:16:41Z

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

On Mon 2018-07-30 11:08:42, Matthew Wilcox wrote:
> On Mon, Jul 30, 2018 at 04:31:04PM +0200, Pavel Machek wrote:
> > Well, I guess errors should have numbers, and catalog explaining what
> > error means what. That way userspace can translate, and it is what we
> > do with errno.
> >
> > I believe numbers are best. If you hate numbers, you can still use
> > strings, as long as you can enumerate them in docs (but it will be
> > strange design).
>
> Have you looked at how gettext() works? It uses the english text as
> a search string and replaces it with the localised string. This is
> a very common design!

Yes, and it needs ("foo %s %d", "bar", 3) as base. Not ("foo bar 3").

Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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