localization (compatibility_functions module)
Vincent Couvert [Fri, 9 Mar 2007 16:55:32 +0000 (16:55 +0000)]
45 files changed:
scilab/modules/compatibility_functions/languages/en_US/errors.xml
scilab/modules/compatibility_functions/languages/en_US/menus.xml
scilab/modules/compatibility_functions/languages/en_US/messages.xml
scilab/modules/compatibility_functions/macros/ReadmiMatrix.sci
scilab/modules/compatibility_functions/macros/WritemiMatrix.sci
scilab/modules/compatibility_functions/macros/asciimat.sci
scilab/modules/compatibility_functions/macros/char.sci
scilab/modules/compatibility_functions/macros/fseek_origin.sci
scilab/modules/compatibility_functions/macros/loadmatfile.sci
scilab/modules/compatibility_functions/macros/makecell.sci
scilab/modules/compatibility_functions/macros/mstr2sci.sci
scilab/modules/compatibility_functions/macros/mtlb_axes.sci
scilab/modules/compatibility_functions/macros/mtlb_axis.sci
scilab/modules/compatibility_functions/macros/mtlb_box.sci
scilab/modules/compatibility_functions/macros/mtlb_choices.sci
scilab/modules/compatibility_functions/macros/mtlb_close.sci
scilab/modules/compatibility_functions/macros/mtlb_cond.sci
scilab/modules/compatibility_functions/macros/mtlb_delete.sci
scilab/modules/compatibility_functions/macros/mtlb_dir.sci
scilab/modules/compatibility_functions/macros/mtlb_echo.sci
scilab/modules/compatibility_functions/macros/mtlb_eig.sci
scilab/modules/compatibility_functions/macros/mtlb_fopen.sci
scilab/modules/compatibility_functions/macros/mtlb_format.sci
scilab/modules/compatibility_functions/macros/mtlb_fprintf.sci
scilab/modules/compatibility_functions/macros/mtlb_fread.sci
scilab/modules/compatibility_functions/macros/mtlb_fwrite.sci
scilab/modules/compatibility_functions/macros/mtlb_get.sci
scilab/modules/compatibility_functions/macros/mtlb_grid.sci
scilab/modules/compatibility_functions/macros/mtlb_hold.sci
scilab/modules/compatibility_functions/macros/mtlb_is.sci
scilab/modules/compatibility_functions/macros/mtlb_isa.sci
scilab/modules/compatibility_functions/macros/mtlb_legendre.sci
scilab/modules/compatibility_functions/macros/mtlb_load.sci
scilab/modules/compatibility_functions/macros/mtlb_num2str.sci
scilab/modules/compatibility_functions/macros/mtlb_plot.sci
scilab/modules/compatibility_functions/macros/mtlb_qr.sci
scilab/modules/compatibility_functions/macros/mtlb_qz.sci
scilab/modules/compatibility_functions/macros/mtlb_realmax.sci
scilab/modules/compatibility_functions/macros/mtlb_realmin.sci
scilab/modules/compatibility_functions/macros/mtlb_save.sci
scilab/modules/compatibility_functions/macros/mtlb_sortrows.sci
scilab/modules/compatibility_functions/macros/mtlb_sprintf.sci
scilab/modules/compatibility_functions/macros/mtlb_sscanf.sci
scilab/modules/compatibility_functions/macros/mtlb_type.sci
scilab/modules/compatibility_functions/macros/savematfile.sci

index 77da987..b288706 100644 (file)
 <LOCALIZATION>
 
 <entry>
-       <tag></tag>
-       <string></string>
+       <tag>compatibility_functions_error_1</tag>
+       <string>Input argument: inconsistent size.</string>
 </entry>       
 
 <entry>
-       <tag></tag>
-       <string></string>
+       <tag>compatibility_functions_error_2</tag>
+       <string>Not yet implemented.</string>
 </entry>       
                
 <entry>
-       <tag></tag>
-       <string></string>
+       <tag>compatibility_functions_error_3</tag>
+       <string>Cell elements must be characters arrays.</string>
 </entry>       
 
+<entry>
+       <tag>compatibility_functions_error_4</tag>
+       <string>Cell elements must be arrays chars.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_5</tag>
+       <string>Not implemented.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_6</tag>
+       <string>Input argument must be a cell.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_7</tag>
+       <string>Inputs arguments must be characters arrays.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_8</tag>
+       <string>mseek: Unknown reference flag.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_9</tag>
+       <string>All inputs must be character strings.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_10</tag>
+       <string>Found Datatype=%d, expecting %d.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_11</tag>
+       <string>Unknown Class.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_12</tag>
+       <string>Not implemented DataType: %d.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_13</tag>
+       <string>Invalid level 5 binary MAT-file!.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_14</tag>
+       <string>Unknown integer type: %s.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_15</tag>
+       <string>%s mlist type not yet implemented.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_16</tag>
+       <string>%s not yet implemented.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_17</tag>
+       <string>Error while writing MI.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_18</tag>
+       <string>DataType: %s is not implemented.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_19</tag>
+       <string>File %s cannot be opened for reading.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_20</tag>
+       <string>Incorrect file.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_21</tag>
+       <string>VAX D-float not handled.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_22</tag>
+       <string>VAX G-float not handled.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_23</tag>
+       <string>Cray encoding not handled.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_24</tag>
+       <string>Unknown binary number format.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_25</tag>
+       <string>Unknown sparse type.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_26</tag>
+       <string>Unknown Matlab binary file format.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_27</tag>
+       <string>Dimensions and entries do not match.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_28</tag>
+       <string>Not written for hypermatrices.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_29</tag>
+       <string>Input argument must be a caracter string matrix.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_30</tag>
+       <string>a.data_bounds must be a vector.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_31</tag>
+       <string>a.data_bounds=[xmin xmax ymin ymax zmin zmax cmin cmax] not implemented.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_32</tag>
+       <string>Bad affectation for a.data_bounds.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_33</tag>
+       <string>axis fill not implemented.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_34</tag>
+       <string>axis image not implemented.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_35</tag>
+       <string>axis normal not implemented.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_36</tag>
+       <string>axis %s not implemented.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_37</tag>
+       <string>Argument of type %d not implemented.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_38</tag>
+       <string>Matrix must be square.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_39</tag>
+       <string>The second input argument must be 1, 2,'fro' or 'inf'.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_40</tag>
+       <string>mtlb_eig() used with 2 rhs: not yet implemented.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_41</tag>
+       <string>Unknown type in mtlb_format().</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_42</tag>
+       <string>In mtlb_fprintf: mprintf(%s) is not implemented.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_43</tag>
+       <string>In mtlb_fprintf: mprintf Scilab function does not work with more than one row variables.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_44</tag>
+       <string>In mtlb_fprintf: mprintf(format) is not implemented.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_45</tag>
+       <string>In mtlb_fprintf: mfprintf(fid,format) is not implemented.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_46</tag>
+       <string>The format: %s is unknown.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_47</tag>
+       <string>The format: %s is not yet handled.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_48</tag>
+       <string>End of file reached before all matrix is read.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_49</tag>
+       <string>mtlb_get, no equivalent to property: %s.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_50</tag>
+       <string>Wrong option.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_51</tag>
+       <string>First argument is not a Matlab vector of strings.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_52</tag>
+       <string>Unhandled class: %s.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_53</tag>
+       <string>First argument must be a positive integer.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_54</tag>
+       <string>%s: Unknown option.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_55</tag>
+       <string>Not yet implemented for %d lhs argument(s).</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_56</tag>
+       <string>Not yet implemented for %d rhs argument(s).</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_57</tag>
+       <string>qz: pencil is not diagonalizable.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_58</tag>
+       <string>Wrong number of inputs.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_59</tag>
+       <string>All inputs must be character strings.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_60</tag>
+       <string>Name conflict: it is not possible to save variable with name %s.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_61</tag>
+       <string>Attempt to write an unsupported data type to an ASCII file.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_62</tag>
+       <string>Unknown or misplaced option %s.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_63</tag>
+       <string>Second input argument must be a column vector.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_64</tag>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_65</tag>
+       <string>mtlb_sscanf: nextindex not implemented.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_66</tag>
+       <string>End of string reached before a datun has been read.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_error_67</tag>
+       <string>Version %d MAT-file not implemented.</string>
+</entry>
+
+       
 </LOCALIZATION>
index 77da987..f943b0c 100644 (file)
@@ -3,8 +3,8 @@
 <LOCALIZATION>
 
 <entry>
-       <tag></tag>
-       <string></string>
+       <tag>compatibility_functions_menu_1</tag>
+       <string>Close</string>
 </entry>       
 
 <entry>
index 77da987..318df6b 100644 (file)
 <LOCALIZATION>
 
 <entry>
-       <tag></tag>
-       <string></string>
+       <tag>compatibility_functions_message_1</tag>
+       <string>Option %s not implemented: IGNORED.</string>
 </entry>       
 
 <entry>
-       <tag></tag>
-       <string></string>
+       <tag>compatibility_functions_message_2</tag>
+       <string>Scilab string matrix saved as Matlab Cell.</string>
 </entry>       
                
 <entry>
-       <tag></tag>
-       <string></string>
+       <tag>compatibility_functions_message_3</tag>
+       <string>MATLAB 5.0 MAT-file, Generated by Scilab</string>
 </entry>       
 
+<entry>
+       <tag>compatibility_functions_message_4</tag>
+       <string>cube_scaling only used in 3d mode.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_message_5</tag>
+       <string>mtlb_close: status ignored.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_message_6</tag>
+       <string>mtlb_close: all windows deleted.</string>
+</entry>
+
+<entry>
+       <tag>compatibility_functions_message_7</tag>
+       <string>Jan</string>
+</entry>       
+
+<entry>
+       <tag>compatibility_functions_message_8</tag>
+       <string>Feb</string>
+</entry>       
+
+<entry>
+       <tag>compatibility_functions_message_9</tag>
+       <string>Mar</string>
+</entry>       
+
+<entry>
+       <tag>compatibility_functions_message_10</tag>
+       <string>Apr</string>
+</entry>       
+
+<entry>
+       <tag>compatibility_functions_message_11</tag>
+       <string>May</string>
+</entry>       
+
+<entry>
+       <tag>compatibility_functions_message_12</tag>
+       <string>Jun</string>
+</entry>       
+
+<entry>
+       <tag>compatibility_functions_message_13</tag>
+       <string>Jul</string>
+</entry>       
+
+<entry>
+       <tag>compatibility_functions_message_14</tag>
+       <string>Aug</string>
+</entry>       
+
+<entry>
+       <tag>compatibility_functions_message_15</tag>
+       <string>Sep</string>
+</entry>       
+
+<entry>
+       <tag>compatibility_functions_message_16</tag>
+       <string>Oct</string>
+</entry>       
+
+<entry>
+       <tag>compatibility_functions_message_17</tag>
+       <string>Nov</string>
+</entry>       
+
+<entry>
+       <tag>compatibility_functions_message_18</tag>
+       <string>Dec</string>
+</entry>       
+
+<entry>
+       <tag>compatibility_functions_message_19</tag>
+       <string>Cannot open file.</string>
+</entry>       
+
+<entry>
+       <tag>compatibility_functions_message_20</tag>
+       <string>Unknown type %s in mtlb_format(): INGNORED.</string>
+</entry>       
+
+<entry>
+       <tag>compatibility_functions_message_21</tag>
+       <string>No minor grid.</string>
+</entry>       
+
+<entry>
+       <tag>compatibility_functions_message_22</tag>
+       <string>This function is obsolete, use %s instead.</string>
+</entry>       
+
+<entry>
+       <tag>compatibility_functions_message_23</tag>
+       <string>MarkerEdgeColor option ignored.</string>
+</entry>       
+
+<entry>
+       <tag>compatibility_functions_message_24</tag>
+       <string>Unknown line style found in '%s' -> set to 6.</string>
+</entry>       
+
+<entry>
+       <tag>compatibility_functions_message_25</tag>
+       <string>Unknown color found in '%s' -> set to black.</string>
+</entry>       
+
+<entry>
+       <tag>compatibility_functions_message_26</tag>
+       <string>Could not open neither %s nor %s nor %s.</string>
+</entry>       
+
+<entry>
+       <tag>compatibility_functions_message_27</tag>
+       <string>Option -v6 added.</string>
+</entry>       
+
+<entry>
+       <tag>compatibility_functions_message_28</tag>
+       <string>Variable %s can not be saved in level 4 MAT-file: IGNORED.</string>
+</entry>       
+
+<entry>
+       <tag>compatibility_functions_message_29</tag>
+       <string>Variable %s can not be saved in ASCII file: IGNORED.</string>
+</entry>       
+
+
 </LOCALIZATION>
index 475a6d6..f308994 100644 (file)
@@ -8,8 +8,7 @@ function [value,ArrayName]=ReadmiMatrix(fd)
   [DataType,NumberOfBytes,Compressed]=ReadTag(fd);
   if meof(fd) then value=[],ArrayName="",return,end
   if DataType<>miMatrix then 
-    error('Found Datatype='+string(DataType)+', expecting '+ ...
-         string(miMatrix))
+    error(msprintf(gettext("errors","compatibility_functions_error_10"),DataType,miMatrix));
   end
   if NumberOfBytes==0 then value=[],return,end
   [Flags,Class,NnzMax]=ReadArrayFlags(fd);
@@ -142,7 +141,7 @@ function [value,ArrayName]=ReadmiMatrix(fd)
     if RowIndex<>[] then RowIndex=RowIndex(:)+1,end
     value=sparse([col(:),RowIndex],value(:),DimensionArray([2 1])).'
   else
-    error('Unknown Class')
+    error(gettext("errors","compatibility_functions_error_11"));
   end
 endfunction
 
@@ -234,8 +233,7 @@ function value=ReadSimpleElement(fd,NumberOfValues,Class)
     mseek(pse,fd)
     [value,ArrayName]=ReadmiMatrix(fd)
   else
-    disp("Not implemented DataType: "+string(DataType));
-    pause
+    error(msprintf(gettext("errors","compatibility_functions_error_12"),DataType));
   end
   padding()
 
@@ -292,7 +290,7 @@ function [head,version,swap]=matfile_header(fd)
   else
     mclose(fd);
     // This line has to be mofified according to message in 'loadmatfile' function
-    error('Invalid level 5 binary MAT-file!') 
+    error(gettext("errors","compatibility_functions_error_13")); 
   end
 endfunction
 
index f52d6c7..adec9c0 100644 (file)
@@ -49,7 +49,7 @@ elseif type(value)==10 then // CHARACTER STRING value
     NnzMax=0;
     WriteSimpleElement(fd,value,miUINT16);
   else
-    warning("Scilab string matrix saved as Matlab Cell");
+    warning(gettext("messages","compatibility_functions_message_2"));
     sz=size(value);
     value=matrix(value,1,-1);
     entries=list()
@@ -85,7 +85,7 @@ elseif type(value)==8 then // INTEGER value
     Class=Uint32Class;
     WriteSimpleElement(fd,value,miUINT32);
   else
-    error("Unknown integer type: "+typeof(value))
+    error(msprintf(gettext("errors","compatibility_functions_error_14"),typeof(value)));
   end
 elseif type(value)==17 then // MLIST used ofr CELLS and STRUCTS
   Flags(1)=0;
@@ -122,7 +122,7 @@ elseif type(value)==17 then // MLIST used ofr CELLS and STRUCTS
       end
     end
   else
-    error(typeof(value)+" mlist type not yet implemented");
+    error(msprintf(gettext("errors","compatibility_functions_error_15"),typeof(value)));
   end
 elseif or(type(value)==[5,7]) then // SPARSE matrices
   if type(value)==5 then // Scilab sparse is converted to Matlab sparse
@@ -157,7 +157,7 @@ elseif or(type(value)==[5,7]) then // SPARSE matrices
     WriteSimpleElement(fd,imag(v),miDOUBLE);
   end
 else
-  error(typeof(value)+" not yet implemented");
+  error(msprintf(gettext("errors","compatibility_functions_error_16"),typeof(value)));
 end
 
 SavePosAfter=mtell(fd);
@@ -188,7 +188,7 @@ function swap=write_matfile_header(fd)
 // Write the mat file header informations
 // VC
 
-head="MATLAB 5.0 MAT-file, Generated by Scilab"
+head=gettext("messages","compatibility_functions_message_3");
 head=head+part(" ",1:(124-length(head)));
 mput(ascii(head),'uc',fd);
 
@@ -208,7 +208,7 @@ if and(IM_MI==[73,77]) then // little endian file
 elseif and(IM_MI==[77,73]) then // big endian file
   swap='b'
 else
-  error("Error while writing MI");
+  error(gettext("errors","compatibility_functions_error_17"));
 end
 // Following call to mseek is needed under Windows
 // to set file pointer after reading
@@ -353,7 +353,7 @@ case miUINT32
   NumberOfBytes=NumberOfValues*4;
   fmt="u"+md_i;
 else
-  error("DataType: "+string(DataType)+"is not implemented");
+  error(msprintf(gettext("errors","compatibility_functions_error_17"),string(DataType)));
 end
 
 Compressed=NumberOfBytes<=4;
index 7620338..be7b788 100644 (file)
@@ -16,7 +16,7 @@ if size(size(x),"*")<=2 then
       end
       nbcol= size(ytemp,'*')*size(x,2)/size(x,'*') 
       if nbcol-floor(nbcol)<>0 then
-        error("input argument: inconsistent size ")
+        error(gettext("errors","compatibility_functions_error_1"));
       end
       y=[]
       for i=1:size(x,1)
@@ -29,7 +29,7 @@ if size(size(x),"*")<=2 then
       y(k)=ascii(x(k,:))
     end
   else
-    error("Not yet implemented")
+    error(gettext("errors","compatibility_functions_error_2"));
   end
 elseif size(size(x),"*")>2 then
   if typeof(x)=="hypermat" then
@@ -49,6 +49,6 @@ elseif size(size(x),"*")>2 then
     end
   end
 else
-  error("Not yet implemented")
+  error(gettext("errors","compatibility_functions_error_2"));
 end
 endfunction
index 8348768..09b945f 100644 (file)
@@ -34,7 +34,7 @@ function y=char(varargin)
            end
            y=[y;t]
          else
-           error("cell elements must be characters arrays")
+           error(gettext("errors","compatibility_functions_error_3"));
          end
        elseif  type(lst)==10 then //cell elements are a string matrix
          t=emptystr(size(lst,1),1)
@@ -43,7 +43,7 @@ function y=char(varargin)
          end
          y=[y,t]
        else // cell contains more than one element
-         error("cell elements must be arrays chars")
+         error(gettext("errors","compatibility_functions_error_4"));
        end
       else
        for i=1:size(lst)
@@ -57,7 +57,7 @@ function y=char(varargin)
              end
              y=[y;t]
            else
-             error("cell elements must be arrays chars")
+             error(gettext("errors","compatibility_functions_error_4"));
            end
          elseif type(lst(i))==10 then
            t=emptystr(size(lst(i),1),1)
@@ -66,7 +66,7 @@ function y=char(varargin)
            end 
            y=[y;t]
          else
-           error("cell elements must be arrays chars") 
+           error(gettext("errors","compatibility_functions_error_4"));
          end
        end
       end    
@@ -91,10 +91,10 @@ function y=char(varargin)
       elseif type(varargin(1).entries)==1|type(varargin(1).entries)==8 then ////Input is a hypermatrix of integers (or reals) 
        y=asciimat(varargin(1))
       else
-       error("not implemented")
+       error(gettext("errors","compatibility_functions_error_5"));
       end
     else 
-      error("input argument must be a cell")
+      error(gettext("errors","compatibility_functions_error_6"));
     end 
     //More than one input argument
   elseif rhs>1 then
@@ -109,7 +109,7 @@ function y=char(varargin)
          end
          y=[y;t]
        else
-         error("Inputs arguments must be characters arrays")
+         error(gettext("errors","compatibility_functions_error_7"));
        end
       elseif  type(varargin(i))==10 then //Input sti is a matrix of strings
        lst=varargin(i)
@@ -119,7 +119,7 @@ function y=char(varargin)
        end
        y=[y;t]
       else 
-       error("Inputs arguments must be characters arrays")
+       error(gettext("errors","compatibility_functions_error_7"));
       end
     end
     //Add blanks at the length of strings
index e902b95..e01f9bc 100644 (file)
@@ -16,6 +16,6 @@ case 0 then
 case 1 then
   flag="end" 
 else
-  error("mseek : Unknown reference flag")
+  error(gettext("errors","compatibility_functions_error_8"));
 end
 endfunction
index 60f4c99..4b103d2 100644 (file)
@@ -8,7 +8,7 @@ function loadmatfile(varargin)
 // Verify that all inputs are character strings
 for k=1:size(varargin)
   if type(varargin(k))<>10 then
-    error("All inputs must be character strings");
+    error(gettext("errors","compatibility_functions_error_9"));
   end
 end
 
@@ -35,7 +35,7 @@ else // Try to find type binary or ASCII ?
       bin=%F
       k=k+1
     case "-regexp"
-      warning("Option regexp not implemented: IGNORED")
+      warning(msprintf(gettext("messages","compatibility_functions_message_1"),"-regexp"));
       while k<=lstsize(varargin) & and(varargin(k)<>["-mat","-ascii"])
        k=k+1
       end
@@ -75,7 +75,7 @@ if bin then
   if ierr<>0 then
     errmsg=lasterror()
     // This line has to be mofified according to error message in 'matfile_header' function
-    if stripblanks(errmsg)=="Invalid level 5 binary MAT-file!" then 
+    if stripblanks(errmsg)==gettext("errors","compatibility_functions_error_13") then 
       // Level 4 binary file ?
       level=4;
     else
@@ -117,7 +117,7 @@ if bin then
     b_flags=['db','fb','lb','sb','ubs','uc']
     deff('Error(msg)',['mclose(fd)' ;'error(msg)'])
     [fd,err]=mopen(fil,'rb',0)
-    if err<>0 then error('File '+fil+' cannot be opened for reading'),end
+    if err<>0 then error(msprintf(gettext("errors","compatibility_functions_error_19"),fil)),end
     
     vars=list() //list to store loaded variables
     names=[]  // vector of variables names
@@ -131,7 +131,7 @@ if bin then
        mopt=mget(1,'uib',fd)
        
        if mopt>5000 then
-         Error('Incorrect file')
+         Error(gettext("errors","compatibility_functions_error_20"));
        end
       end
       MOPT=[]
@@ -148,19 +148,19 @@ if bin then
        fl='uib'
        flag=b_flags(MOPT(3)+1)
       case 2
-       Error('VAX D-float not handled')
+       Error(gettext("errors","compatibility_functions_error_21"));
       case 3
-       Error('VAX G-float not handled')
+       Error(gettext("errors","compatibility_functions_error_22"));
       case 4
-       Error('Cray encoding not handled')
+       Error(gettext("errors","compatibility_functions_error_23"));
       else
-       Error('Unknown binary number format')
+       Error(gettext("errors","compatibility_functions_error_24"));
       end
       t=mget(4,fl,fd);
-      if meof(fd)<>0 then Error('Incorrect file'),end
+      if meof(fd)<>0 then Error(gettext("errors","compatibility_functions_error_20")),end
       m=t(1);n=t(2);it=t(3),namelen=t(4)
       name=mget(namelen,"c",fd);
-      if meof(fd)<>0 then Error('Incorrect file'),end
+      if meof(fd)<>0 then Error(gettext("errors","compatibility_functions_error_20")),end
       name=ascii(name(1:namelen-1))
       
       // Old version compatibility | Name has been given
@@ -170,7 +170,7 @@ if bin then
       
       if MOPT(4)==0 then  // regular matrix
        v=mget((it+1)*m*n,flag,fd);
-       if meof(fd)<>0 then Error('Incorrect file'),end
+       if meof(fd)<>0 then Error(gettext("errors","compatibility_functions_error_20")),end
        if it==0 then
          mat=matrix(v,m,n);
        elseif it==1
@@ -178,7 +178,7 @@ if bin then
        end
       elseif MOPT(4)==1 // vector of strings
        v=mget(m*n,flag,fd);
-       if meof(fd)<>0 then Error('Incorrect file'),end
+       if meof(fd)<>0 then Error(gettext("errors","compatibility_functions_error_20")),end
        mat=matrix(v(1:m*n),m,n);
        w=mat;
        mat=[];
@@ -188,11 +188,11 @@ if bin then
       elseif MOPT(4)==2 //sparse matrix
        //sparse
        Nnz=m-1;
-       it=n-3;if it<>0&it<>1 then Error('Unknown sparse type'),end
+       it=n-3;if it<>0&it<>1 then Error(gettext("errors","compatibility_functions_error_25")),end
        ir=mget(Nnz,flag,fd);m=mget(1,"d",fd);
        jc=mget(Nnz,flag,fd);n=mget(1,"d",fd);
        v=mget(Nnz,flag,fd);junk=mget(1,"d",fd);
-       if meof(fd)<>0 then Error('Incorrect file'),end
+       if meof(fd)<>0 then Error(gettext("errors","compatibility_functions_error_20")),end
        if it==1 then
          //complex
          v=v+%i*mget(Nnz,flag,fd);
@@ -208,7 +208,7 @@ if bin then
     //form execstr instruction to resume variables in the calling environment
     execstr('['+strcat(names,',')+']=resume(vars(:))')  
   else
-    error("Unknown Matlab binary file format");
+    error(gettext("errors","compatibility_functions_error_26"));
   end
    
 // --- ASCII FILE (Copy/Paste from mtlb_load.sci) ---
index 1c185c9..e515555 100644 (file)
@@ -11,7 +11,7 @@ end
 
 dims=varargin(1)
 if prod(dims)<>lstsize(varargin)-1 then
-  error("Dimensions and entries do not match");
+  error(gettext("errors","compatibility_functions_error_27"));
 end
 
 if prod(dims)==1 then
index 380b9e1..bc9b012 100644 (file)
@@ -6,8 +6,8 @@ function y=mstr2sci(x)
 // This function solves this problem by converting a string into a character matrix
 // Ex : 'string' is converted into ['s' 't' 'r' 'i' 'n' 'g']
 
-if type(x)==17 then disp("Not written for hypermatrices !"),return,end
-if type(x)<>10 then disp("Input argument must be a caracter string matrix !"),return,end
+if type(x)==17 then error(gettext("errors","compatibility_functions_error_28")),return,end
+if type(x)<>10 then error(gettext("errors","compatibility_functions_error_29")),return,end
 nr=size(x,1);
 nc=max(length(x));
 y=[]
index 3d82576..8cef972 100644 (file)
@@ -21,7 +21,7 @@ elseif varargin(1)=='position'
 elseif type(varargin(1))==1 then
   xsetech(AXES_T(k)(varargin(1),:))
 else
-  error('mtlb_axes: This case is not yet implemented')
+  error(gettext("errors","compatibility_functions_error_2"))
 end
   
   
index c0356cd..1752cdd 100644 (file)
@@ -24,7 +24,7 @@ if rhs>0 then
   for krhs=1:rhs
     if type(listvar(krhs))==1 then
         if size(listvar(krhs),1)>1 & size(listvar(krhs),2)>1 then
-         error("a.data_bounds must be a vector")
+         error(gettext("errors","compatibility_functions_error_30"));
        end
         listvar(krhs) = matrix(listvar(krhs),1,-1);
        
@@ -39,10 +39,10 @@ if rhs>0 then
        set(gca(),"axes_visible",'on')
       // axis([xmin xmax ymin ymax zmin zmax cmin cmax]) 
       elseif size(listvar(krhs),2)==8 then
-       error("a.data_bounds=[xmin xmax ymin ymax zmin zmax cmin cmax] not implemented!");
+       error(gettext("errors","compatibility_functions_error_31"));
       // Unknown column number for listvar(krhs)
       else
-       error("Bad affectation for a.data_bounds!");
+       error(gettext("errors","compatibility_functions_error_32"));
       end
       
     elseif type(listvar(krhs))==10 then
@@ -61,7 +61,7 @@ if rhs>0 then
        
        // axis fill
       elseif listvar(krhs)=="fill" then
-       error("axis fill not implemented!");
+       error(gettext("errors","compatibility_functions_error_33"));
 
        // axis ij
       elseif listvar(krhs)=="ij" then
@@ -77,12 +77,12 @@ if rhs>0 then
        
        // axis image
       elseif listvar(krhs)=="image" then
-       error("axis image not implemented!");
+       error(gettext("errors","compatibility_functions_error_34"));
 
        // axis square
       elseif listvar(krhs)=="square" then
        if a.view=="2d" then
-         warning("cube_scaling only used in 3d mode");
+         warning(gettext("messages","compatibility_functions_message_4"));
        end
        a.cube_scaling="on"
        
@@ -92,7 +92,7 @@ if rhs>0 then
        
        // axis normal
       elseif listvar(krhs)=="normal" then
-       error("axis normal not implemented!");
+       error(gettext("errors","compatibility_functions_error_35"));
        
        // axis on
       elseif listvar(krhs)=="on" then
@@ -117,7 +117,7 @@ if rhs>0 then
        end
        // Unknown character string
       else
-       error("axis "+listvar(krhs)+" not implemented!");
+       error(msprintf(gettext("errors","compatibility_functions_error_36"),listvar(krhs)));
       end
       
     // axis(axes_handles,...)
@@ -133,7 +133,7 @@ if rhs>0 then
       end
     // Wrong type for listvar(krhs)
     else
-       error("Argument of type "+string(type(listvar(krhs)))+" not implemented!");
+       error(msprintf(gettext("errors","compatibility_functions_error_37"),type(listvar(krhs))));
     end
     varargout(1)=matrix(a.data_bounds,1,-1);
   end
index 39d1b4a..fae71e9 100644 (file)
@@ -26,7 +26,7 @@ elseif rhs==1 then
 elseif rhs==2 then // box(axes_handle,...)
   axes_handle.box=convstr(val,"l")
 else
-  error("Not yet implemented");
+  error(gettext("errors","compatibility_functions_error_2"));
 end
 
 endfunction
index 4cf9351..f05cda4 100644 (file)
@@ -1,7 +1,7 @@
 function mtlb_choices(nam,header,labels,callbacks,inter)
 // Copyright INRIA
 while %t
-  num=x_choose(labels,header,'Close')
+  num=x_choose(labels,header,gettext("menus","compatibility_functions_menu_1"))
   if num==0 then break,end
   execstr(callbacks(num))
 end
index 1462f63..a182173 100644 (file)
@@ -5,7 +5,7 @@ function [status]=mtlb_close(h)
 
 rhs=argn(2)
 
-warning("mtlb_close: status ignored")
+warning(gettext("messages","compatibility_functions_message_5"));
 status=1
 
 // close
@@ -38,10 +38,10 @@ elseif rhs==1 then
       scf(cf_save)
     end
   else // Unknown type for h
-    error("Not implemented")
+    error(gettext("errors","compatibility_functions_error_5"))
   end
 else // close('all','hidden')
-  warning("mtlb_close: all windows deleted");
+  warning(gettext("messages","compatibility_functions_message_6"));
   xdel(winsid())
 end
 endfunction
index 6d0e754..3c8cf91 100644 (file)
@@ -4,7 +4,7 @@ function c=mtlb_cond(A,flag)
 // F.B.
 
 if A == [] then c = 0, return, end
-if size(A,1) <> size(A,2) &  flag <> 2 then error('Matrix must be square'),end
+if size(A,1) <> size(A,2) &  flag <> 2 then error(gettext("errors","compatibility_functions_error_38")),end
 
 if flag == 1
   c = norm(A,1)*norm(inv(A),1);
@@ -24,6 +24,6 @@ elseif flag == "fro"
 elseif flag == "inf"
   c = norm(A,'inf')*norm(inv(A),'inf');
 else
-  error("The second input argument must be 1, 2,''fro'' or ''inf''");  
+  error(gettext("errors","compatibility_functions_error_39"));  
 end
-endfunction
\ No newline at end of file
+endfunction
index edbb683..ce20465 100644 (file)
@@ -8,7 +8,7 @@ if type(y)==10 then
 elseif type(y)==9 then 
   delete(y);
 else
-  error("Not yet implemented");
+  error(gettext("errors","compatibility_functions_error_2"));
 end
 
 endfunction
index a45ae0d..b0096ed 100644 (file)
@@ -35,7 +35,19 @@ for k=1:n
   if ( (x == []) & (ierr== -1) ) then [x,ierr]=fileinfo(files(k)),end
   if x<>[] then
     w=getdate(x(6))
-    month=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]
+    month=[gettext("messages","compatibility_functions_message_7"),..
+           gettext("messages","compatibility_functions_message_8"),..
+           gettext("messages","compatibility_functions_message_9"),..
+           gettext("messages","compatibility_functions_message_10"),..
+           gettext("messages","compatibility_functions_message_11"),..
+           gettext("messages","compatibility_functions_message_12"),..
+           gettext("messages","compatibility_functions_message_13"),..
+           gettext("messages","compatibility_functions_message_14"),..
+           gettext("messages","compatibility_functions_message_15"),..
+           gettext("messages","compatibility_functions_message_16"),..
+           gettext("messages","compatibility_functions_message_17"),..
+           gettext("messages","compatibility_functions_message_18")];
+
     ldate(k)=string(w(6))+"-"+month(w(2))+"-"+string(w(1))+" "+string(w(7))+":"+string(w(8))+":"+string(w(9))
     lbytes(k)=x(1);
     lisdir(k)=double(int32(x(2)) & mask) == dirtype
index c747873..75fbf0d 100644 (file)
@@ -13,9 +13,9 @@ elseif rhs==1 then
   elseif arg1=="off" then
     mode(0);
   else
-    error("Not yet implemented");
+    error(gettext("errors","compatibility_functions_error_2"));
   end
 else
-  error("Not yet implemented");
+    error(gettext("errors","compatibility_functions_error_2"));
 end
 endfunction
index 1a85e62..1c633b7 100644 (file)
@@ -15,6 +15,6 @@ if rhs==1 then
     end
   end  
 else
-  error("mtlb_eig() used with 2 rhs: not yet implemented !")
+  error(gettext("errors","compatibility_functions_error_40"));
 end
 endfunction
index 448178e..81c47b0 100644 (file)
@@ -8,7 +8,7 @@ function [fid,mess]=mtlb_fopen(filename,permission)
 [fid,err]=mopen(filename,permission,0)
 if err<0 then
   fid=-1
-  mess="Cannot open file!"
+  mess=gettext("messages","compatibility_functions_message_19");
 else
   mess=""
 end
index 275a223..a4c76a0 100644 (file)
@@ -47,9 +47,9 @@ end
 
 
 if unk then
-  error("Unknown type in mtlb_format() !");
+  error(gettext("errors","compatibility_functions_error_41"))
 elseif ratf|loose|compact|bank|hex then
-  warning("Unknown type "+type+" in mtlb_format(): INGNORED !")
+  warning(msprintf(gettext("messages","compatibility_functions_message_20"),type));
 else
   if rhs1==1 then
     format(d+1)
index e0ca367..99b9298 100644 (file)
@@ -32,7 +32,7 @@ elseif type(varargin(1))==10 then
     mprintf(fmt,l(:))
     count=size(a,"*")
   elseif nv==0 then
-    error("In mtlb_fprintf: mprintf("+fmt+") is not implemented")
+    error(msprintf(gettext("errors","compatibility_functions_error_42"),fmt));
   else
     sz=[]
     for k=1:nv
@@ -46,7 +46,7 @@ elseif type(varargin(1))==10 then
       mprintf(fmt,varargin(2:$))
       count=size(sz,"*")
     else
-      error("In mtlb_fprintf: mprintf Scilab function does not work with more than one row variables !")
+      error(gettext("errors","compatibility_functions_error_43"))
     end
   end  
 // mtlb_fprintf(fid,fmt,...)
@@ -81,9 +81,9 @@ else
     count=length(varargin(2))
   elseif nv==0 then
     if or(fid==[1 2]) then
-      error("In mtlb_fprintf: mprintf(format) is not implemented")
+      error(gettext("errors","compatibility_functions_error_44"))
     else
-      error("In mtlb_fprintf: mfprintf(fid,format) is not implemented")
+      error(gettext("errors","compatibility_functions_error_45"))
     end 
   else
     sz=[]
@@ -103,7 +103,7 @@ else
       end
     else
       if or(fid==[1 2]) then
-       error("In mtlb_fprintf: mprintf Scilab function does not work with more than one row variables !")
+       error(gettext("errors","compatibility_functions_error_43"))
       else
        mfprintfMat(fid,varargin(3:$),fmt)
        for k=1:nv
index d98efab..8e08687 100644 (file)
@@ -34,11 +34,11 @@ case 2 then
 end
 [l,k]=find(prec==prectbl)
 if l==[] then
-  error("The format: "+prec+" is unknown")
-  end
+  error(msprintf(gettext("errors","compatibility_functions_error_46"),prec))
+end
 Prec=prectbl(l,1)
 if Prec=="?" then 
-  error("The format: "+prec+" is not yet handled")
+  error(msprintf(gettext("errors","compatibility_functions_error_47"),prec))
 end
 if isinf(sz) then
   a=[]
@@ -56,7 +56,7 @@ else
 
   if meof(fid)<>0 then
     mclearerr(fid)
-    error("End of file reached before all matrix is read")
+    error(gettext("errors","compatibility_functions_error_48"))
   end
   if size(sz,"*")==1 then
     a=a(:)
index cefa4aa..1c095c1 100644 (file)
@@ -29,11 +29,11 @@ if rhs<3 then prec="uchar";end
 
 [l,k]=find(prec==prectbl)
 if l==[] then
-  error("The format: "+prec+" is unknown")
+  error(msprintf(gettext("errors","compatibility_functions_error_46"),prec));
 end
 Prec=prectbl(l,1)
 if Prec=="?" then 
-  error("The format: "+prec+" is not yet handled")
+  error(msprintf(gettext("errors","compatibility_functions_error_47"),prec));
 end
 mput(a,Prec,fid)
 count=size(a,"*")
index cecd395..cc34a52 100644 (file)
@@ -12,42 +12,42 @@ else
   case 'colormap' then
     v=xget('colormap')
   case 'currentaxes' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'currentcharacter' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'currentmenu' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'currentobject' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'currentpoint' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'fixedcolors' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'inverthardcopy' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'keypressfcn' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'menubar' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'mincolormap' then
     v=xget('colormap')
     v=size(v,1)
   case 'name' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'nextplot' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'numbertitle' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'paperunits' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'paperorientation' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'paperposition' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'papersize' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'papertype' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'pointer' then
     v='arrow'
   case 'position' then
@@ -57,34 +57,34 @@ else
   case 'resize' then
     v='on'
   case 'resizefcn' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'selectiontype' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'sharecolors' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'units' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'windowbuttondownfcn' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'windowbuttonmotionfcn' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'windowbuttonupfcn' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'buttondownfcn' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'children' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'clipping' then
     v=xget('clipping')
     if v(1)<>0 then v='on',else v='off',end
   case 'interruptible' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'parent' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'type' then
     v='figure'
   case 'userdata' then
-    error('mtlb_get, no equivalent to property :'+property)
+    error(msprintf(gettext("errors","compatibility_functions_error_49"),property));
   case 'visible' then    
     v='on'
   end   
index b60cde7..6682143 100644 (file)
@@ -25,14 +25,14 @@ elseif rhs==1 then
     elseif arg1=="off" then
       a.grid=[-1 -1]
     elseif arg1=="minor" then
-      warning("No minor grid");
+      warning(gettext("messages","compatibility_functions_message_21"));
       if and(a.grid==[-1 -1]) then
        a.grid=[1 1]
       else
        a.grid=[-1 -1]
       end
     else
-      error("Wrong option");
+      error(gettext("errors","compatibility_functions_error_50"));
     end
   end
 elseif rhs==2 then
@@ -41,14 +41,14 @@ elseif rhs==2 then
   elseif arg2=="off" then
     arg1.grid=[-1 -1]
   elseif arg2=="minor" then
-    warning("No minor grid");
+    warning(gettext("messages","compatibility_functions_message_21"));
     if and(arg1.grid==[-1 -1]) then
       arg1.grid=[1 1]
     else
       arg1.grid=[-1 -1]
     end
   else
-    error("Wrong option");
+    error(gettext("errors","compatibility_functions_error_50"));
   end
 end
 endfunction
index e125f95..efa28c4 100644 (file)
@@ -17,7 +17,7 @@ else
   elseif flag=="off" then
     a=gca();a.auto_clear="on"
   else
-    error("Not implemented")
+    error(gettext("errors","compatibility_functions_error_5"))
   end
 end
 endfunction
index 5895b69..49676d4 100644 (file)
@@ -5,7 +5,7 @@ function str=mtlb_is(sto,sfrom,i,j)
 [mto,nto]=size(sto)
 // convert sto to a regular matrix
 if type(sto)==10 then
-  if nto<>1 then error('First argument is not a Matlab vector of strings'),end
+  if nto<>1 then error(gettext("errors","compatibility_functions_error_51")),end
   if mto==1 then
     lnto=length(sto)
     sto=ascii(sto)
@@ -21,7 +21,7 @@ end
 [mfrom,nfrom]=size(sfrom)
 // convert sfrom to a regular matrix
 if type(sfrom)==10 then
-  if nfrom<>1 then error('First argument is not a Matlab vector of strings'),end
+  if nfrom<>1 then error(gettext("errors","compatibility_functions_error_51")),end
   if mfrom==1 then
     lnfrom=length(sfrom)
     sfrom=ascii(sfrom)
index 217e5f9..bb98efd 100644 (file)
@@ -33,6 +33,6 @@ case "sparse"
 case "lti"
    r=typeof(OBJ)=="state-space"
 else
-  error("Unhandled class: "+class)
+  error(msprintf(gettext("errors","compatibility_functions_error_52"),class));
 end
 endfunction
index 116d84c..a711da1 100644 (file)
@@ -5,7 +5,7 @@ function y=mtlb_legendre(n,x,flag)
 
 rhs=argn(2)
 if ndims(n) <> 2 | size(n,"*") <> 1 | floor(n)-n <> 0 | n<0 then
-  error("the first argument must be a positive integer")
+  error(gettext("errors","compatibility_functions_error_53"));
 end
 
 m = 0:n;
index 2874da5..2197346 100644 (file)
@@ -1,7 +1,7 @@
 function mtlb_load(thefile,opt)
 //loads matlab 4.x  binary (.mat) or ascii files
 //
-warning("This function is obsolete, use loadmatfile instead");
+warning(msprintf(gettext("messages","compatibility_functions_message_22"),"loadmatfile"));
 
 l_flags=['dl','fl','ll','sl','uls','uc']
 b_flags=['db','fb','lb','sb','ubs','uc']
@@ -12,7 +12,7 @@ if rhs==2 then
   if convstr(opt)=='-ascii' then
     bin=%f
   else
-    error(opt+' : Unknown option')
+    error(msprintf(gettext("errors","compatibility_functions_error_54"),opt));
   end
 else
   k=strindex(thefile,'.')
@@ -30,7 +30,7 @@ end
 
 if bin then
   [fd,err]=mopen(thefile,'rb',0)
-  if err<>0 then error('File '+thefile+' cannot be opened for reading'),end
+  if err<>0 then error(msprintf(gettext("errors","compatibility_functions_error_19"),thefile)),end
 
   vars=list() //list to store loaded variables
   names=[]  // vector of variables names
@@ -45,7 +45,7 @@ if bin then
       mopt=mget(1,'uib',fd)
 
       if mopt>5000 then
-       Error('Incorrect file')
+       Error(gettext("errors","compatibility_functions_error_20"))
       end
     end
     MOPT=[]
@@ -62,26 +62,26 @@ if bin then
       fl='uib'
       flag=b_flags(MOPT(3)+1)
     case 2
-      Error('VAX D-float not handled')
+      Error(gettext("errors","compatibility_functions_error_21"))
     case 3
-      Error('VAX G-float not handled')
+      Error(gettext("errors","compatibility_functions_error_22"))
     case 4
-      Error('Cray encoding not handled')
+      Error(gettext("errors","compatibility_functions_error_23"))
     else
-      Error('Unknown binary number format')
+      Error(gettext("errors","compatibility_functions_error_24"))
     end
     t=mget(4,fl,fd);
-    if meof(fd)<>0 then Error('Incorrect file'),end
+    if meof(fd)<>0 then Error(gettext("errors","compatibility_functions_error_20")),end
     m=t(1);n=t(2);it=t(3),namelen=t(4)
     name=mget(namelen,"c",fd);
-    if meof(fd)<>0 then Error('Incorrect file'),end
+    if meof(fd)<>0 then Error(gettext("errors","compatibility_functions_error_20")),end
     name=ascii(name(1:namelen-1))
     names=[names name]
     
     
     if MOPT(4)==0 then  // regular matrix
       v=mget((it+1)*m*n,flag,fd);
-      if meof(fd)<>0 then Error('Incorrect file'),end
+      if meof(fd)<>0 then Error(gettext("errors","compatibility_functions_error_20")),end
       if it==0 then
        mat=matrix(v,m,n);
       elseif it==1
@@ -89,7 +89,7 @@ if bin then
       end
     elseif MOPT(4)==1 // vector of strings
       v=mget(m*n,flag,fd);
-      if meof(fd)<>0 then Error('Incorrect file'),end
+      if meof(fd)<>0 then Error(gettext("errors","compatibility_functions_error_20")),end
       mat=matrix(v(1:m*n),m,n);
       w=mat;
       mat=[];
@@ -99,11 +99,11 @@ if bin then
     elseif MOPT(4)==2 //sparse matrix
       //sparse
       Nnz=m-1;
-      it=n-3;if it<>0&it<>1 then Error('Unknown sparse type'),end
+      it=n-3;if it<>0&it<>1 then Error(gettext("errors","compatibility_functions_error_25")),end
       ir=mget(Nnz,flag,fd);m=mget(1,"d",fd);
       jc=mget(Nnz,flag,fd);n=mget(1,"d",fd);
       v=mget(Nnz,flag,fd);junk=mget(1,"d",fd);
-      if meof(fd)<>0 then Error('Incorrect file'),end
+      if meof(fd)<>0 then Error(gettext("errors","compatibility_functions_error_20")),end
       if it==1 then
        //complex
        v=v+%i*mget(Nnz,flag,fd);
index 4489e80..f1bb21a 100644 (file)
@@ -15,7 +15,7 @@ else
   if type(f)==10 then
     s=msprintf(f,x)
   else
-    error("Not implemented")
+    error(gettext("errors","compatibility_functions_error_5"))
   end
 end
 endfunction
index 786b22a..f6a720c 100644 (file)
@@ -118,7 +118,7 @@ else
        linespec2sci(varargin(k+1),curh)
        k=k+2
       elseif ~isempty(strindex("markeredgecolor",opt)) then
-       warning("MarkerEdgeColor option ignored");
+       warning(gettext("messages","compatibility_functions_message_23"));
        k=k+2
       elseif ~isempty(strindex("markerfacecolor",opt)) then
        curh=markplot.children(1)
@@ -182,7 +182,7 @@ styl=scilinestyles(ind)
 if styl>=0 then
   cur_handle.line_style=styl
 elseif ~isempty(ind) then
-  warning("Unknown line style found in ''"+linespec+"'' -> set to 6");
+  warning(msprintf(gettext("messages","compatibility_functions_message_24"),linespec));
   cur_handle.line_style=6
 end
 
@@ -200,7 +200,7 @@ if ~isempty(clr) then
   cur_handle.foreground=color(clr)
   mtlbColor=name2rgb(clr)
 elseif ~isempty(ind) then
-  warning("Unknown color found in ''"+linespec+"'' -> set to black");
+  warning(msprintf(gettext("messages","compatibility_functions_message_25"),linespec));
   cur_handle.foreground=color("black")
   mtlbColor=name2rgb("black")
 end
index 2d710f1..c7e95e6 100644 (file)
@@ -6,10 +6,10 @@ function [Q,R,E]=mtlb_qr(A,B)
 [lhs,rhs]=argn()
 
 if lhs<>3 then
-  error("Not yet implemented for "+string(lhs)+" lhs argument(s) !")
+  error(msprintf(gettext("errors","compatibility_functions_error_55"),lhs));
 end
 if rhs<>2 then
-  error("Not yet implemented "+string(rhs)+" rhs argument(s) !")
+  error(msprintf(gettext("errors","compatibility_functions_error_56"),rhs));
 end  
 
 [Q,R,E] = qr(A)
index a8fde30..abea5f5 100644 (file)
@@ -10,7 +10,7 @@ if lhs==5 then
   for k=1:n
     K=kernel(A*LB(k)-B*LA(k))
     if size(K,2)<>1 then
-      error('qz : pencil is not diagonalizable')
+      error(gettext("errors","compatibility_functions_error_57"))
     end
     V(:,k)=K
   end
index 2427491..3ee130b 100644 (file)
@@ -11,9 +11,9 @@ elseif rhs==1 then
   if prec=="double" then
     val=number_properties("huge");
   else
-    error("Not yet implemented");
+    error(gettext("errors","compatibility_functions_error_2"));
   end
 else
-  error("Wrong number of inputs");
+  error(gettext("errors","compatibility_functions_error_58"));
 end
 endfunction
index f37f84e..f35e1b2 100644 (file)
@@ -11,9 +11,9 @@ elseif rhs==1 then
   if prec=="double" then
     val=number_properties("tiny");
   else
-    error("Not yet implemented");
+    error(gettext("errors","compatibility_functions_error_2"));
   end
 else
-  error("Wrong number of inputs");
+  error(gettext("errors","compatibility_functions_error_58"));
 end
 endfunction
index ef5eec8..fe149af 100644 (file)
@@ -2,12 +2,12 @@ function mtlb_save(mtlb_thefile,varargin)
 //save variable under  matlab 4.x .mat binary format files
 //see: www.mathworks.com/access/helpdesk/help/pdf_doc/matlab/matfile_format.pdf 
 
-warning("This function is obsolete, use savematfile instead");
+warning(msprintf(gettext("messages","compatibility_functions_message_22"),"savematfile"));
 
 // Verify that all inputs are character strings
 for k=1:size(varargin)
   if type(varargin(k))<>10 then
-    error("All inputs must be character strings");
+    error(gettext("messages","compatibility_functions_message_59"));
   end
 end
 
@@ -60,7 +60,7 @@ if mtlb_opts==[] then //binary save
   // check name conflicts
   for k=['mtlb_thefile','varargin','mtlb_names','mtlb_opts','mtlb_fd']
     if or(mtlb_names==k) then
-      error('Name conflict: it is not possible to save variable with name '+k)
+      error(msprintf(gettext("errors","compatibility_functions_error_60"),k));
     end
   end
   // clear variable wich are no more used to avoid name conflicts
@@ -115,7 +115,7 @@ if mtlb_opts==[] then //binary save
       P=5
       T=1
     else
-      error('Attempt to write an unsupported data type to an ASCII file')
+      error(gettext("errors","compatibility_functions_error_61"))
     end
     [m,n]=size(x)
   
@@ -160,7 +160,7 @@ if mtlb_opts==[] then //binary save
 else //ascii save
 
   if convstr(mtlb_opts(1))<>'-ascii' then 
-    error('Uknown or misplaced option '+mtlb_opts(1))
+    error(msprintf(gettext("errors","compatibility_functions_error_62"),mtlb_opts(1)));
   end
     if size(mtlb_opts,'*')==3 then
     sep=str2code(-40)
@@ -177,7 +177,7 @@ else //ascii save
   // clear variable wich are no more used to avoid name conflicts
   for k=['mtlb_thefile','varargin','mtlb_names','mtlb_fmt','mtlb_fd']
     if or(mtlb_names==k) then
-      error('Name conflict: it is not possible to save variable with name '+k)
+      error(msprintf(gettext("errors","compatibility_functions_error_60"),k));
     end
   end
   clear('rhs','lhs','kk','err','sep');
index bf2b92f..8f33da7 100644 (file)
@@ -17,7 +17,7 @@ elseif rhs==2 then
        indexlist=list((1:size(A,1))');
        
        if size(cls,2)>1 then
-               error("second input argument must be a column vector")
+               error(gettext("errors","compatibility_functions_error_63"))
        end
 
        if type(A)==10 then
index ba6796f..d7ec245 100644 (file)
@@ -27,7 +27,7 @@ else
     fmt=strcat(fmt(ones(1,mult))) // duplicate format 
     s=msprintf(fmt,varargin(:))
   else
-    error('mtlb_printf this particular case is not implemented')
+    error(gettext("errors","compatibility_functions_error_64"))
   end
 end
 K=strindex(s,'\n')
index c38b1cf..338ce79 100644 (file)
@@ -1,6 +1,6 @@
 function [a,nvars,errmsg,nextindex] = mtlb_sscanf(s,fmt,sz)
 [lhs,rhs]=argn()
-if lhs==4 then error('mtlb_sscanf: nextindex not implemented'),end
+if lhs==4 then error(gettext("errors","compatibility_functions_error_65")),end
 if rhs<3 then sz=%inf,end
 nmx=prod(sz)
 nvars=0
@@ -13,7 +13,7 @@ lvars=msscanf(s,fmt);
 if lvars==-1 then
   a=''
   return
-  errmsg='End of string reached before a datun has been read'
+  errmsg=gettext("errors","compatibility_functions_error_66");
 else
   nvars=size(lvars)
   nv=min(nvars,nmx)
index 18bd521..fea3db1 100644 (file)
@@ -19,7 +19,7 @@ else
       if ierr==0 then // filename.sci exists
        disp(mgetl(mopen(SCIfilename,"r")))
       else
-       disp("Could not open neither "+filename+" nor "+Mfilename+" nor "+SCIfilename); 
+       disp(msprintf(gettext("messages","compatibility_functions_message_26"),filename,Mfilename,SCIfilename)); 
       end
     end
   end
index 63a24ad..9a67a13 100644 (file)
@@ -8,7 +8,7 @@ vars=who('get');
 // Verify that all inputs are character strings
 for k=1:size(varargin)
   if type(varargin(k))<>10 then
-    error("All inputs must be character strings");
+    error(gettext("errors","compatibility_functions_error_59"));
   end
 end
 
@@ -35,7 +35,7 @@ while k<=lstsize(varargin)
   
   select varargin(k)
   case "-append"
-    warning("Option -append not implemented: IGNORED")
+    warning(msprintf(gettext("messages","compatibility_functions_message_1"),"-append"));
     k=k+1
   case "-mat"
     bin=%T
@@ -81,7 +81,7 @@ while k<=lstsize(varargin)
     mtlb_opts=[mtlb_opts varargin(k)];
     k=k+1
   case "-regexp"
-    warning("Option -regexp not implemented: IGNORED")
+    warning(msprintf(gettext("messages","compatibility_functions_message_1"),"-regexp"));
     while k<=lstsize(varargin) & and(varargin(k)<>["-mat","-ascii"])
       k=k+1
     end
@@ -101,7 +101,7 @@ end
 // Default version 6 for binary files
 if isempty(version) & bin then
   version=6;
-  warning("Option -v6 added");
+  warning(gettext("messages","compatibility_functions_message_27"));
 end
 
 // If no name given then all workspace saved
@@ -130,7 +130,7 @@ if bin then
     for k=size(mtlb_names,"*"):-1:1
       execstr("x="+mtlb_names(k))
       if and(type(x)<>[1 4 5 6 10]) then
-       warning("Variable "+mtlb_names(k)+" can not be save in level 4 MAT-file: IGNORED");
+       warning(msprintf(gettext("messages","compatibility_functions_message_28"),mtlb_names(k)));
        mtlb_names(k)=[]
       end
     end
@@ -141,7 +141,7 @@ if bin then
     // Clear variable wich are no more used to avoid name conflicts
     for k=["varargin","mtlb_names","mtlb_fmt","mtlb_fd"]
       if or(mtlb_names==k) then
-       error("Name conflict: it is not possible to save variable with name "+k)
+       error(msprintf(gettext("errors","compatibility_functions_error_60"),k));
       end
     end
     clear("x","k","rhs","lhs","kk","err","bin","version","mtlb_thefile","mtlb_opts");
@@ -196,7 +196,7 @@ if bin then
        P=5
        T=1
       else
-       error("Attempt to write an unsupported data type to an ASCII file")
+       error(gettext("errors","compatibility_functions_error_61"));
       end
       [m,n]=size(x)
       
@@ -257,7 +257,7 @@ if bin then
     // Clear variable wich are no more used to avoid name conflicts
     for k=["endian","varargin","mtlb_names","mtlb_fmt","mtlb_fd"]
       if or(mtlb_names==k) then
-       error("Name conflict: it is not possible to save variable with name "+k)
+       error(msprintf(gettext("messages","compatibility_functions_message_60"),k))
       end
     end
     clear("x","k","rhs","lhs","kk","err","sep","bin","version","mtlb_thefile","mtlb_opts");
@@ -273,7 +273,7 @@ if bin then
     mclose(mtlb_fd);
   else
     // This part should contain miCOMPRESSED data type handling
-    error("Version "+string(version)+" MAT-file not implemented");
+    error(msprintf(gettext("errors","compatibility_functions_error_67"),version));
   end
   
 // ASCII save
@@ -284,7 +284,7 @@ else
   for k=size(mtlb_names,"*"):-1:1
     execstr("x="+mtlb_names(k))
     if and(type(x)<>[1 4 5 6 10]) then
-      warning("Variable "+mtlb_names(k)+" can not be save in ASCII file: IGNORED");
+      warning(msprintf(gettext("messages","compatibility_functions_message_29"),mtlb_names(k)));
       mtlb_names(k)=[]
     end
   end
@@ -304,7 +304,7 @@ else
   // Clear variable wich are no more used to avoid name conflicts
   for k=["varargin","mtlb_names","mtlb_fmt","mtlb_fd"]
     if or(mtlb_names==k) then
-      error("Name conflict: it is not possible to save variable with name "+k)
+      error(msprintf(gettext("errors","compatibility_functions_error_60"),k));
     end
   end
   clear("x","k","rhs","lhs","kk","err","sep","bin","version","mtlb_thefile","mtlb_opts");