Hi there,

I've got a webrev here which adds gnu-gettext to the pkg5 developer package, moves .mo files into pkg:/package/pkg and fixes a bunch of i18n/l10n problems that have built up over the years, adding checks for those now as part of the build.

7185135 i18n messages should use parameterized values
7188804 pkg5 should depend on gnu-gettext
7194773 pkg.mo should move to pkg:/package/pkg

https://cr.opensolaris.org/action/browse/pkg/timf/l10n-cleanup/

Right now, the only thing i18n_check() in setup.py does, is look for parameterized gettext messages that don't use dictionaries if there's more than one argument, causing the build to fail if it finds any, for example:

_("this %s is the %s %s") % (animal, colour, animal)

is bad, because translators can't change the order of the arguments. Better is:

_("this %(animal)s is the %(colour)s %(animal)s") % \
    {"animal": animal, "colour": colour}

but we could add other i18n checks I guess if we felt the need.

Comments welcome?

        cheers,
                        tim
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to