x=mgeti(I(1)-(1+nsiz),'i',u);
mclose(u)
else
- error('Invalid argument')
+ error(msprintf(gettext("%s: Wrong type for input argument #%d.\n"),"bytecode",1))
end
endfunction
for i=1:1:szmodules(1)
file_to_check=SCI+'/modules/'+modules(i)+'/sci_gateway/'+modules(i)+'_gateway.xml';
- printf('checking : '+modules(i)+'\n');
+ printf(gettext("Checking: %s.\n"),modules(i))
if (fileinfo(file_to_check)<>[]) then
try
if MSDOS then
end
catch
ret=%F;
- printf('\n Please check : '+file_to_check+'\n\n');
+ mprintf(gettext("%s: Please check: %s\n"),"check_gateways",file_to_check);
end
else
- printf('\n file doesn''t exist : '+file_to_check+'\n\n');
+ mprintf(gettext("%s: File %s doesn''t exist.\n"),"check_gateways",file_to_check);
end
end
end
if files==[] | files== "" then
- warning(msprintf(gettext("I cannot find any sci files in %s"),path));
+ warning(msprintf(gettext("Cannot find any sci files in %s.\n"),path));
return ;
end
names = basename(files,%f);
for i=1:size(files,'*') // loop on .sci files
scif = files(i);
if verbose then
- write(%io(2),msprintf(gettext(" %s.sci compilation forced'),names(i)));
+ write(%io(2),msprintf(gettext(" %s.sci compilation forced"),names(i)));
end
// getf sci file and save functions it defines as a .bin file
getsave(scif);
if recompile == %t then
if verbose then
- write(%io(2),msprintf(gettext("Processing file %s.sci'),names(i)));
+ write(%io(2),msprintf(gettext("Processing file %s.sci"),names(i)));
end
// getf sci file and save functions it defines as a .bin file
if ~predefined then
execstr(nam+'=resume('+nam+')')
else
- write(%io(2),msprintf(gettext(" Library file %slib has been updated,\n but cannot be loaded into Scilab,\n because %s is a protected variable."),path1, nam));
+ write(%io(2),msprintf(gettext("Library file %slib has been updated,\n but cannot be loaded into Scilab,\nbecause %s is a protected variable.\n"),path1, nam));
end
end
if ierr<> 0 then
clear ierr;
- mprintf(gettext(" Warning: Error in file %s :\n ""%s""\n file ignored\n"),fl,lasterror(%t));
+ warning(msprintf(gettext("Error in file %s:\n ""%s""\n file ignored\n"),fl,lasterror(%t));
result = %f;
else
clear ierr;
if new<>[] then
execstr('save(u,'+strcat(new($:-1:1),',')+')');
else
- mprintf(gettext(" Warning: File ''%s'' does not contain any functions\n"),fl);
+ warning(msprintf(gettext("File ''%s'' does not contain any functions\n"),fl));
result = %f;
end
path=SCI+part(path,4:length(path))
end
if fileinfo(path)==[] then
- warning(" there is no file named "+name+".sci in the library directory "..
- +t(1))
+ warning(msprintf(gettext("%s: There is no file named %s.sci in the library directory %s.\n"),"get_function_path",name,t(1)))
path=[]
end
end
end
if lst==[] | lst== "" then
- error(msprintf(gettext("I cannot find any sci files in %s"),path));
+ error(msprintf(gettext("%s: I cannot find any sci files in %s.\n"),"getd",path));
return ;
end
for k=1:size(lst,'*');
if fileparts(lst(k),"extension")==".sci" then
if execstr("exec(lst(k));","errcatch")<>0 then
- warning(msprintf(gettext("Incorrect function in file %s"),lst(k)))
+ warning(msprintf(gettext("%s: Incorrect function in file %s.\n"),"getd",lst(k)))
end
end
end
//displays the first comments of a function
if exists('%paths')==0 then %paths='./',end
name=stripblanks(name)
- if exists(name)==0 then error('undefined function'),end
+ if exists(name)==0 then error(msprintf(gettext("%s: Undefined function.\n"),"head_comments")),end
execstr('t=type('+name+')')
- if t<>11&t<>13 then
- error(gettext("Argument is not the name of a Scilab function"))
+ if t<>11 & t<>13 then
+ error(msprintf(gettext("%s: Wrong value for input argument #%d: Name of a Scilab function expected.\n"),"head_comments",1))
end
l=whereis(name)
if l<>[] then
else
files= listfiles(%paths+'*.sci')
if files==[] then
- error(msprintf(gettext("%s.sci file cannot be found with the given paths'),name))
+ error(msprintf(gettext("%s.sci file cannot be found with the given paths.\n"),name))
end
k=grep(files,name+'.sci')
if k<>[] then
end
end
if path==[] then
- error(msprintf(gettext("%s.sci file cannot be found with the given paths"),name))
+ error(msprintf(gettext("%s.sci file cannot be found with the given paths.\n"),name))
end
txt=mgetl(path);
k=grep(txt,'function');
txt=txt(k(1)+1:$)
K=grep(part(txt,1:2),'//')
if K(1)<>1 then
- write(%io(2),gettext("No comment available"),'(a)')
+ write(%io(2),gettext("No comment available."),'(a)')
return
end
k2=find(K(2:$)-K(1:$-1)<>1,1)
if sel<>[] then
write(%io(2),[head;strsubst(txt(sel),'//','')],'(a)')
else
- write(%io(2),gettext("No comment available"),'(a)')
+ write(%io(2),gettext("No comment available."),'(a)')
end
endfunction
// locals : local variables
//!
if type(macro)==11 then comp(macro),end
-if type(macro)<>13 then error(gettext("Argument to macrovars must be a macro!")),end
+if type(macro)<>13 then error(msprintf(gettext("%s: Wrong type for input argument #%d: Macro expected.\n"),"macrovar",1)),end
lst=macr2lst(macro);
out=lst(2)',if prod(size(out))==0 then out =[],end
in=lst(3)'
end
n=size(count,1)
if n==0 then
- error(gettext("Perhaps the function(s) has not been loaded for profiling?"))
+ error(gettext("%s: Perhaps the function(s) has not been loaded for profiling?\n"),"plotprofile")
end
//xset("window",win)
end
addmenu(win,gettext("Exit"));
str="execstr(Exit_"+string(win)+"(1))"
- xinfo(gettext("click to get corresponding line, move with a-z"))
+ xinfo(gettext("Click to get corresponding line, move with a-z."))
withpad=with_scipad()
if withpad then
lst=fun
end
if lst(5)(1)<>'25' then
- error(gettext("The function has not been built for profiling"))
+ error(msprintf(gettext("%s: The function has not been built for profiling"),"profile"))
end
count=get_profile(lst,4)
count=count(1:$-1,:)
if ~exists("force","local") then force=%f; end
if ~exists("kind","local") then kind="c"; end
if ~exists(funname)
- error("No variable named: "+funname)
+ error(msprintf(gettext("No variable named: %s"),funname))
end
clear fvar funtext tempfun
execstr("fvar="+funname)
if ~or(type(fvar)==[11 13]) then
- error(msprintf(gettext("%s must be the name of a scilab function variable"), funname))
+ error(msprintf(gettext("%s must be the name of a scilab function variable."), funname))
end
if type(fvar)==11 & ~force then
oldkind="n"
// are also available at
// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
-//
-// -*- Scilab -*-
-//
-// warnobsolete.sci
-// Made by Bruno JOFRET <bruno.jofret@inria.fr>
-//
-// Started on Thu Feb 14 10:33:50 2008 bruno
-// Last update Thu Feb 14 11:06:16 2008 bruno
-//
-
// This function is to warn user that he's using a deprecated function
function warnobsolete(newFunctionName, scilabRemovedVersion)