I noticed a few error messages which are not translated with gettext in eval.c.
For example, I do:
:lang fr_FR.UTF-8
:call filter(list)
I get an error message in English...
E116: Invalid arguments for function filter
... which I'd expect to be translated with gettext in French.
Attached patch fixes a couple of such error messages
which are not translated.
Notice also the FIXME comment in the attached patch: shouldn't
E118 and E740 error message be the same error message?
See how similar they are:
"E740: Too many arguments for function %s"
"E118: Too many arguments for function: %s"
I then entered the following command to see whether they
are other dupes in the translated messages and found
the following:
$ cd vim7/src/po
$ grep msgid fr.po | egrep '"E[0-9]+' |
sed s'/msgid "E[0-9]*://' |
sort | uniq -c |
perl -ane 'print if ($F[0] > 1)'
2 Cannot read from \"%s\""
2 Can't find file \"%s\" in path"
2 Can't open file \"%s\""
2 digit expected"
2 Missing quote: %s"
2 No such syntax cluster: %s"
2 Unknown option: %s"
3 Illegal argument: %s"
3 Missing colon"
3 Unknown function: %s"
msgid "E230: Cannot read from \"%s\""
msgid "E282: Cannot read from \"%s\""
msgid "E345: Can't find file \"%s\" in path"
msgid "E447: Can't find file \"%s\" in path"
msgid "E624: Can't open file \"%s\"
msgid "E456: Can't open file \"%s\""
msgid "E552: digit expected"
msgid "E548: digit expected"
msgid "E114: Missing quote: %s"
msgid "E115: Missing quote: %s"
msgid "E391: No such syntax cluster: %s"
msgid "E392: No such syntax cluster: %s"
msgid "E113: Unknown option: %s"
msgid "E355: Unknown option: %s"
msgid "E390: Illegal argument: %s"
msgid "E423: Illegal argument: %s"
msgid "E125: Illegal argument: %s"
msgid "E550: Missing colon"
msgid "E545: Missing colon"
msgid "E524: Missing colon"
msgid "E130: Unknown function: %s"
msgid "E117: Unknown function: %s"
msgid "E700: Unknown function: %s"
There are some other messages that are almost identical:
msgid "E152: Cannot open %s for writing"
msgid "E190: Cannot open \"%s\" for writing"
msgid "E484: Can't open file %s
msgid "E624: Can't open file \"%s\""
msgid "E456: Can't open file \"%s\""
Cheers
-- Dominique
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
Index: eval.c
===================================================================
RCS file: /cvsroot/vim/vim7/src/eval.c,v
retrieving revision 1.278
diff -c -r1.278 eval.c
*** eval.c 23 Dec 2008 22:52:58 -0000 1.278
--- eval.c 24 Jan 2009 07:19:16 -0000
***************
*** 7918,7926 ****
else if (!aborting())
{
if (argcount == MAX_FUNC_ARGS)
! emsg_funcname("E740: Too many arguments for function %s", name);
else
! emsg_funcname("E116: Invalid arguments for function %s", name);
}
while (--argcount >= 0)
--- 7918,7927 ----
else if (!aborting())
{
if (argcount == MAX_FUNC_ARGS)
! /* FIXME: or should e_toomanyarg be used here? */
! emsg_funcname(N_("E740: Too many arguments for function %s"), name);
else
! emsg_funcname(N_("E116: Invalid arguments for function %s"), name);
}
while (--argcount >= 0)
***************
*** 19867,19873 ****
}
}
else
! emsg_funcname("E123: Undefined function: %s", name);
}
goto ret_free;
}
--- 19868,19874 ----
}
}
else
! emsg_funcname(N_("E123: Undefined function: %s"), name);
}
goto ret_free;
}
***************
*** 20183,20189 ****
v = find_var(name, &ht);
if (v != NULL && v->di_tv.v_type == VAR_FUNC)
{
! emsg_funcname("E707: Function name conflicts with variable: %s",
name);
goto erret;
}
--- 20184,20190 ----
v = find_var(name, &ht);
if (v != NULL && v->di_tv.v_type == VAR_FUNC)
{
! emsg_funcname(N_("E707: Function name conflicts with variable: %s"),
name);
goto erret;
}
***************
*** 20198,20204 ****
}
if (fp->uf_calls > 0)
{
! emsg_funcname("E127: Cannot redefine function %s: It is in use",
name);
goto erret;
}
--- 20199,20205 ----
}
if (fp->uf_calls > 0)
{
! emsg_funcname(N_("E127: Cannot redefine function %s: It is in use"),
name);
goto erret;
}
***************
*** 21477,21483 ****
/*
* Return TRUE if items in "fc" do not have "copyID". That means they are not
! * referenced from anywyere.
*/
static int
can_free_funccal(fc, copyID)
--- 21478,21484 ----
/*
* Return TRUE if items in "fc" do not have "copyID". That means they are not
! * referenced from anywhere.
*/
static int
can_free_funccal(fc, copyID)