To: vim_dev@googlegroups.com Subject: Patch 7.4.1186 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1186 Problem: Error messages for security context are hard to translate. Solution: Use one string with %s. (Ken Takata) Files: src/os_unix.c *** ../vim-7.4.1185/src/os_unix.c 2016-01-24 20:36:18.866082348 +0100 --- src/os_unix.c 2016-01-27 20:36:59.563374795 +0100 *************** *** 2822,2831 **** ret = setxattr((char*)to_file, name, buffer, (size_t)size, 0); if (ret < 0) { ! MSG_PUTS(_("Could not set security context ")); ! MSG_PUTS(name); ! MSG_PUTS(_(" for ")); ! msg_outtrans(to_file); msg_putchar('\n'); } } --- 2822,2831 ---- ret = setxattr((char*)to_file, name, buffer, (size_t)size, 0); if (ret < 0) { ! vim_snprintf((char *)IObuff, IOSIZE, ! _("Could not set security context %s for %s"), ! name, to_file); ! msg_outtrans(IObuff); msg_putchar('\n'); } } *************** *** 2842,2852 **** case ERANGE: default: /* no enough size OR unexpected error */ ! MSG_PUTS(_("Could not get security context ")); ! MSG_PUTS(name); ! MSG_PUTS(_(" for ")); ! msg_outtrans(from_file); ! MSG_PUTS(_(". Removing it!\n")); /* FALLTHROUGH to remove the attribute */ case ENODATA: --- 2842,2852 ---- case ERANGE: default: /* no enough size OR unexpected error */ ! vim_snprintf((char *)IObuff, IOSIZE, ! _("Could not get security context %s for %s. Removing it!"), ! name, from_file); ! msg_puts(IObuff); ! msg_putchar('\n'); /* FALLTHROUGH to remove the attribute */ case ENODATA: *** ../vim-7.4.1185/src/version.c 2016-01-27 11:07:43.552848235 +0100 --- src/version.c 2016-01-27 20:37:44.014912248 +0100 *************** *** 748,749 **** --- 748,751 ---- { /* Add new patch number below this line */ + /**/ + 1186, /**/ -- hundred-and-one symptoms of being an internet addict: 52. You ask a plumber how much it would cost to replace the chair in front of your computer with a toilet. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///