Ken Takata wrote:

> 2020年6月21日日曜日 22時53分37秒 UTC+9 Bram Moolenaar:
> >
> >
> > Patch 8.2.1028 
> > Problem:    Vim9: no error for declaring buffer, window, etc. variable. 
> > Solution:   Give an error.  Unify the error messages. 
> > Files:      src/evalvars.c, src/globals.h, src/vim9compile.c, 
> >             src/proto/vim9compile.pro, src/testdir/test_vim9_expr.vim, 
> >             src/testdir/test_vim9_script.vim 
> >
> >
> ! EXTERN char e_declare_var[]        INIT(= N_("E1016: Cannot declare a%s 
> > variable: %s")); 
> >
> 
> This is tricky.
>  
> 
> > +         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; 
> 
> These strings should be translatable.

I suppose that's consistent with other places where these words are
used.  It won't work for "an environment", I'll make that a separate
message.  Hopefully that is not needed for the other cases.

This message is only used once, but still defined in globals.h.
I'm wondering if we should either move a message like this to where it
is used, or put all messages together, and sort them on number.  One
disadvantage is that the context of the message may be less clear.

-- 
User:       I'm having problems with my text editor.
Help desk:  Which editor are you using?
User:       I don't know, but it's version VI (pronounced: 6).
Help desk:  Oh, then you should upgrade to version VIM (pronounced: 994).

 /// Bram Moolenaar -- [email protected] -- 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    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202006211838.05LIciB31218968%40masaka.moolenaar.net.

Raspunde prin e-mail lui