To: vim_dev@googlegroups.com Subject: Patch 8.2.1032 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1032 Problem: Error message for declaring a variable cannot be translated. Solution: Enclose in _(). Make environment variable a separate message. Files: src/globals.h, src/vim9compile.c *** ../vim-8.2.1031/src/globals.h 2020-06-21 15:52:55.810451610 +0200 --- src/globals.h 2020-06-21 20:24:25.067049410 +0200 *************** *** 1788,1794 **** EXTERN char e_lock_unlock[] INIT(= N_("E940: Cannot lock or unlock variable %s")); EXTERN char e_const_req_value[] INIT(= N_("E1021: const requires a value")); EXTERN char e_type_req[] INIT(= N_("E1022: type or initialization required")); ! EXTERN char e_declare_var[] INIT(= N_("E1016: Cannot declare a%s variable: %s")); #endif #if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS) EXTERN char e_alloc_color[] INIT(= N_("E254: Cannot allocate color %s")); --- 1788,1795 ---- EXTERN char e_lock_unlock[] INIT(= N_("E940: Cannot lock or unlock variable %s")); EXTERN char e_const_req_value[] INIT(= N_("E1021: const requires a value")); EXTERN char e_type_req[] INIT(= N_("E1022: type or initialization required")); ! EXTERN char e_declare_var[] INIT(= N_("E1016: Cannot declare a %s variable: %s")); ! EXTERN char e_declare_env_var[] INIT(= N_("E1016: Cannot declare an environment variable: %s")); #endif #if defined(FEAT_GUI) || defined(FEAT_TERMGUICOLORS) EXTERN char e_alloc_color[] INIT(= N_("E254: Cannot allocate color %s")); *** ../vim-8.2.1031/src/vim9compile.c 2020-06-21 16:58:09.743688170 +0200 --- src/vim9compile.c 2020-06-21 20:23:38.559182632 +0200 *************** *** 4679,4690 **** switch (*name) { ! case 'g': scope = " global"; break; ! case 'b': scope = " buffer"; break; ! case 'w': scope = " window"; break; ! case 't': scope = " tab"; break; ! case 'v': scope = " v:"; break; ! case '$': scope = "n environment"; break; } semsg(_(e_declare_var), scope, name); } --- 4679,4691 ---- switch (*name) { ! case 'g': scope = _("global"); break; ! case 'b': scope = _("buffer"); break; ! case 'w': scope = _("window"); break; ! case 't': scope = _("tab"); break; ! case 'v': scope = "v:"; break; ! case '$': semsg(_(e_declare_env_var), name); return; ! default: return; } semsg(_(e_declare_var), scope, name); } *** ../vim-8.2.1031/src/version.c 2020-06-21 20:06:50.970050457 +0200 --- src/version.c 2020-06-21 20:38:11.268679728 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 1032, /**/ -- John: When I'm playing tennis with friends I always get carried away George: You hurt your foot each time? /// 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 ///