wrong type or wrong size?

classic Classic list List threaded Threaded
5 messages Options
Shiqi Yu Shiqi Yu
Reply | Threaded
Open this post in threaded view
|

wrong type or wrong size?

Dear all,

I'm translating Scilab messages into Chinese, but some messages confused me, such as in GUI module:
MSG 69: %s: Wrong size for second input argument: 'on' or 'off' expected.
MSG 71: %s: Wrong type for second input argument: 'on' or 'off' expected.

The messages should be displayed when a user does not input 'on' or 'off'. It's a wrong type error and not a wrong type error.
So I think MSG 69 is incorrect.

There are also some other this kind of messages.
--
Shiqi Yu
Shenzhen Institute of Advanced Technology,
Chinese Academy of Sciences.
Homepage: http://yushiqi.cn
Shiqi Yu Shiqi Yu
Reply | Threaded
Open this post in threaded view
|

Re: wrong type or wrong size?

Another case:

GUI MSG 117:%s
: Wrong type for first input argument: Graphic handle expected.
GUI MSG 119: %s: Wrong size for first input argument: Graphic handle expected.

2008/5/24 Shiqi Yu <[hidden email]>:
Dear all,

I'm translating Scilab messages into Chinese, but some messages confused me, such as in GUI module:
MSG 69: %s: Wrong size for second input argument: 'on' or 'off' expected.
MSG 71: %s: Wrong type for second input argument: 'on' or 'off' expected.

The messages should be displayed when a user does not input 'on' or 'off'. It's a wrong type error and not a wrong type error.
So I think MSG 69 is incorrect.

There are also some other this kind of messages.
--
Shiqi Yu
Shenzhen Institute of Advanced Technology,
Chinese Academy of Sciences.
Homepage: http://yushiqi.cn



--
Shiqi Yu
Shenzhen Institute of Advanced Technology,
Chinese Academy of Sciences.
Homepage: http://yushiqi.cn
Sylvestre Ledru Sylvestre Ledru
Reply | Threaded
Open this post in threaded view
|

Re: wrong type or wrong size?

Hello Shiqi,

You just pointed out two mistakes. Just changed them and took the time
to update most of the string in this module. For example:
http://viewvc.scilab.org/bin/cgi/viewvc.cgi/trunk/scilab/modules/gui/sci_gateway/c/sci_toolbar.c?limit_changes=100&r1=24116&r2=24969
It is going to decrease dramatically the string!

I uploaded the localization file in the launchpad queue:
https://translations.launchpad.net/scilab/trunk/+imports

Thanks for your input!
Sylvestre



Le samedi 24 mai 2008 à 14:11 +0800, Shiqi Yu a écrit :

> Another case:
>
> GUI MSG 117:%s: Wrong type for first input argument: Graphic handle
> expected.
> GUI MSG 119: %s: Wrong size for first input argument: Graphic handle
> expected.
>
> 2008/5/24 Shiqi Yu <[hidden email]>:
>         Dear all,
>        
>         I'm translating Scilab messages into Chinese, but some
>         messages confused me, such as in GUI module:
>         MSG 69: %s: Wrong size for second input argument: 'on' or
>         'off' expected.
>         MSG 71: %s: Wrong type for second input argument: 'on' or
>         'off' expected.
>        
>         The messages should be displayed when a user does not input
>         'on' or 'off'. It's a wrong type error and not a wrong type
>         error.
>         So I think MSG 69 is incorrect.
>        
>         There are also some other this kind of messages.
>         --
>         Shiqi Yu
>         Shenzhen Institute of Advanced Technology,
>         Chinese Academy of Sciences.
>         Homepage: http://yushiqi.cn
>
>
>
> --
> Shiqi Yu
> Shenzhen Institute of Advanced Technology,
> Chinese Academy of Sciences.
> Homepage: http://yushiqi.cn

signature.asc (189 bytes) Download Attachment
Pierre MARECHAL Pierre MARECHAL
Reply | Threaded
Open this post in threaded view
|

Re: wrong type or wrong size?

In reply to this post by Shiqi Yu
Hi,

I think it depends on the nature of the error made by the user :

--> myfunction( first_arg , 2 )
 => it should return "myfunction: Wrong type for second input argument: 'on' or 'off' expected."


--> myfunction( first_arg , ['on','off','on'] )
 => it should return "myfunction: Wrong size for second input argument: 'on' or 'off' expected."

--> myfunction( first_arg , 'test' )
 => it should return "myfunction: Wrong value for second input argument: 'on' or 'off' expected."

Regards,

Pierre


Shiqi Yu a écrit :
Dear all,

I'm translating Scilab messages into Chinese, but some messages confused me, such as in GUI module:
MSG 69: %s: Wrong size for second input argument: 'on' or 'off' expected.
MSG 71: %s: Wrong type for second input argument: 'on' or 'off' expected.

The messages should be displayed when a user does not input 'on' or 'off'. It's a wrong type error and not a wrong type error.
So I think MSG 69 is incorrect.

There are also some other this kind of messages.
--
Shiqi Yu
Shenzhen Institute of Advanced Technology,
Chinese Academy of Sciences.
Homepage: http://yushiqi.cn

Vincent COUVERT-3 Vincent COUVERT-3
Reply | Threaded
Open this post in threaded view
|

Re: wrong type or wrong size?

Hi,

Yes Pierre is right, the message has to be changed (type or size)
according the user input.

However, in the function which produces this error, if the input type is
checked before the input size, the user may not be confused by error
messages.

Vincent

Pierre MARECHAL a écrit :

> Hi,
>
> I think it depends on the nature of the error made by the user :
>
> --> myfunction( first_arg , 2 )
>  => it should return /"myfunction: Wrong type for second input
> argument: 'on' or 'off' expected."/
>
> --> myfunction( first_arg , ['on','off','on'] )
>  => it should return /"myfunction: Wrong size for second input
> argument: 'on' or 'off' expected."/
>
> --> myfunction( first_arg , 'test' )
>  => it should return /"myfunction: Wrong value for second input
> argument: 'on' or 'off' expected."
>
> /Regards,
>
> Pierre
>
>
> Shiqi Yu a écrit :
>> Dear all,
>>
>> I'm translating Scilab messages into Chinese, but some messages
>> confused me, such as in GUI module:
>> |MSG 69: %s|: Wrong size for second input argument: 'on' or 'off'
>> expected.
>> |MSG 71: ||%s|: Wrong type for second input argument: 'on' or 'off'
>> expected.
>>
>> The messages should be displayed when a user does not input 'on' or
>> 'off'. It's a wrong type error and not a wrong type error.
>> So I think MSG 69 is incorrect.
>>
>> There are also some other this kind of messages.
>> --
>> Shiqi Yu
>> Shenzhen Institute of Advanced Technology,
>> Chinese Academy of Sciences.
>> Homepage: http://yushiqi.cn
>

--
==============================================
Vincent COUVERT
Centre de Recherche INRIA Paris-Rocquencourt
Domaine de Voluceau - B.P. 105
78153 Le Chesnay Cedex
==============================================
Equipe Projet SCILAB
Bâtiment 1B - Bureau 013
Email : [hidden email]
Tél : +33 (0)1 39 63 54 46
Fax : +33 (0)1 39 63 55 94
==============================================