Tony Mechelynck wrote: > On 24/01/09 12:25, Bram Moolenaar wrote: >> >> Dominique Pelle wrote: > > [...] >>> >>> 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: > > [...] >> >> Even though these messages have the same text, they are still different >> errors. In a try/catch you can use the error number to distinguish >> them. >> > > Also, their different error numbers refer to different places in the help, > with more or less different explanations. > > Bram: If the Vim code tries to translate "E123: Some error", will it try > "Some error" if nothing starting "E123" is found? If it does, we could use a > single translate string for two or more error merssages, and the error > number would still be there. > > > Best regards, > Tony.
Gettext is not going to do "smart" things a such as trying to translate "Some error" if "E123: Some error" is not found. And that's fine since gettext is not part of Vim and it should not try to second guess (KISS principle). The explanation about catching different errors even though the text is identical made sense of course. I did not think about it earlier. -- Dominique --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
