[pacman-dev] [PATCH] hooks: warn if reassignment overwrites previous setting
Eli Schwartz
eschwartz93 at gmail.com
Tue Jan 3 15:17:23 UTC 2017
On 01/02/2017 10:19 AM, Stefan Klinger wrote:
> + if(t->type != 0) {
> + warning(_("hook %s line %d: overwriting previous definition of Type\n"), file, line);
> + }
...
> + if(hook->when != 0) {
> + warning(_("hook %s line %d: overwriting previous definition of When\n"), file, line);
> + }
...
> + if(hook->desc != NULL) {
> + warning(_("hook %s line %d: overwriting previous definition of Description\n"), file, line);
> + }
...
> + if(hook->cmd != NULL) {
> + warning(_("hook %s line %d: overwriting previous definition of Exec\n"), file, line);
> + }
Look at all the times error is used. ;) You should be formatting the
warning with the definition type as well.
This allows a single translation to be used for all four.
--
Eli Schwartz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20170103/ddeafd82/attachment.asc>
More information about the pacman-dev
mailing list