diff options
author | Sunil Shetye | 2018-07-02 18:39:11 +0530 |
---|---|---|
committer | Sunil Shetye | 2018-07-02 18:43:19 +0530 |
commit | 468de187d0ad59613aa73384976b58b78200ae43 (patch) | |
tree | a303e66b756cd295231a13b44638693f28dc1761 /js/IntegerOp | |
parent | 6e5e34e21b744cf956b18c7a233aa62b1f08efe5 (diff) | |
download | sci2js-468de187d0ad59613aa73384976b58b78200ae43.tar.gz sci2js-468de187d0ad59613aa73384976b58b78200ae43.tar.bz2 sci2js-468de187d0ad59613aa73384976b58b78200ae43.zip |
support gettext
Diffstat (limited to 'js/IntegerOp')
-rw-r--r-- | js/IntegerOp/BITCLEAR.js | 12 | ||||
-rw-r--r-- | js/IntegerOp/BITSET.js | 12 | ||||
-rw-r--r-- | js/IntegerOp/CONVERT.js | 8 | ||||
-rw-r--r-- | js/IntegerOp/EXTRACTBITS.js | 20 | ||||
-rw-r--r-- | js/IntegerOp/INTMUL.js | 6 | ||||
-rw-r--r-- | js/IntegerOp/JKFLIPFLOP.js | 2 | ||||
-rw-r--r-- | js/IntegerOp/LOGIC.js | 8 | ||||
-rw-r--r-- | js/IntegerOp/SHIFT.js | 6 | ||||
-rw-r--r-- | js/IntegerOp/SRFLIPFLOP.js | 2 |
9 files changed, 38 insertions, 38 deletions
diff --git a/js/IntegerOp/BITCLEAR.js b/js/IntegerOp/BITCLEAR.js index df27bd42..aa22841c 100644 --- a/js/IntegerOp/BITCLEAR.js +++ b/js/IntegerOp/BITCLEAR.js @@ -28,17 +28,17 @@ function BITCLEAR() { exprs = graphics.exprs; model = arg1.model; while (true) { - [ok,this.Datatype,this.bit,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"BITCLEAR")],[" "],[gettext("Clear a bit")],[" "]],[[msprintf(gettext("Data Type %s"),"(3:int32, 4:int16, 5:int8, ...)")],[gettext("Index of Bit (0 is least significant)")]],list("vec",1,"vec",1),exprs); + [ok,this.Datatype,this.bit,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","BITCLEAR")],[" "],["Clear a bit"],[" "]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Index of Bit (0 is least significant)"],list("vec",1,"vec",1),exprs); if (!ok) { break; } in1 = [model.in1,model.in2]; if (floor(this.bit)!=this.bit) { - block_parameter_error(msprintf(gettext("Wrong type for \'%s\' parameter: %5.1f."),gettext("Index of Bit"),this.bit),gettext("Must be integer.")); + block_parameter_error(msprintf("Wrong type for \'%s\' parameter: %5.1f.","Index of Bit",this.bit),"Must be integer."); ok = false; } else if ((this.Datatype==3)||(this.Datatype==6)) { if (this.bit>31||this.bit<0) { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Index of Bit"),this.bit),msprintf(gettext("Must be in the interval %s."),"[0, 31]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Index of Bit",this.bit),msprintf("Must be in the interval %s.","[0, 31]")); ok = false; } else { this.bit = uint32(this.bit); @@ -48,7 +48,7 @@ function BITCLEAR() { } } else if ((this.Datatype==4)||(this.Datatype==7)) { if (this.bit>15||this.bit<0) { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Index of Bit"),this.bit),msprintf(gettext("Must be in the interval %s."),"[0, 15]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Index of Bit",this.bit),msprintf("Must be in the interval %s.","[0, 15]")); ok = false; } else { this.bit = uint16(this.bit); @@ -58,7 +58,7 @@ function BITCLEAR() { } } else if ((this.Datatype==5)||(this.Datatype==8)) { if (this.bit>7||this.bit<0) { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Index of Bit"),this.bit),msprintf(gettext("Must be in the interval %s."),"[0, 7]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Index of Bit",this.bit),msprintf("Must be in the interval %s.","[0, 7]")); ok = false; } else { this.bit = uint8(this.bit); @@ -67,7 +67,7 @@ function BITCLEAR() { model.sim = list("bit_clear_8",4); } } else { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Data Type"),this.Datatype),msprintf(gettext("Must be in the interval %s."),"[3, 8]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Data Type",this.Datatype),msprintf("Must be in the interval %s.","[3, 8]")); ok = false; } if (ok) { diff --git a/js/IntegerOp/BITSET.js b/js/IntegerOp/BITSET.js index 51786a6b..f2660157 100644 --- a/js/IntegerOp/BITSET.js +++ b/js/IntegerOp/BITSET.js @@ -28,18 +28,18 @@ function BITSET() { exprs = graphics.exprs; model = arg1.model; while (true) { - [ok,this.Datatype,this.bit,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"BITSET")],[" "],[gettext("Set a bit")],[" "]],[[msprintf(gettext("Data Type %s"),"(3:int32, 4:int16, 5:int8, ...)")],[gettext("Index of Bit (0 is least significant)")]],list("vec",1,"vec",1),exprs); + [ok,this.Datatype,this.bit,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","BITSET")],[" "],["Set a bit"],[" "]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Index of Bit (0 is least significant)"],list("vec",1,"vec",1),exprs); if (!ok) { break; } in1 = [model.in1,model.in2]; if (floor(this.bit)!=this.bit) { - block_parameter_error(msprintf(gettext("Wrong type for \'%s\' parameter: %5.1f."),gettext("Index of Bit"),this.bit),gettext("Must be integer.")); + block_parameter_error(msprintf("Wrong type for \'%s\' parameter: %5.1f.","Index of Bit",this.bit),"Must be integer."); ok = false; } if ((this.Datatype==3)||(this.Datatype==6)) { if (this.bit>31||this.bit<0) { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Index of Bit"),this.bit),msprintf(gettext("Must be in the interval %s."),"[0, 31]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Index of Bit",this.bit),msprintf("Must be in the interval %s.","[0, 31]")); ok = false; } this.bit = uint32(this.bit); @@ -48,7 +48,7 @@ function BITSET() { model.sim = list("bit_set_32",4); } else if ((this.Datatype==4)||(this.Datatype==7)) { if (this.bit>15||this.bit<0) { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Index of Bit"),this.bit),msprintf(gettext("Must be in the interval %s."),"[0, 15]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Index of Bit",this.bit),msprintf("Must be in the interval %s.","[0, 15]")); ok = false; } this.bit = uint16(this.bit); @@ -57,7 +57,7 @@ function BITSET() { model.sim = list("bit_set_16",4); } else if ((this.Datatype==5)||(this.Datatype==8)) { if (this.bit>7||this.bit<0) { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Index of Bit"),this.bit),msprintf(gettext("Must be in the interval %s."),"[0, 7]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Index of Bit",this.bit),msprintf("Must be in the interval %s.","[0, 7]")); ok = false; } this.bit = uint8(this.bit); @@ -65,7 +65,7 @@ function BITSET() { n = uint8(n); model.sim = list("bit_set_8",4); } else { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Data Type"),this.Datatype),msprintf(gettext("Must be in the interval %s."),"[3, 8]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Data Type",this.Datatype),msprintf("Must be in the interval %s.","[3, 8]")); ok = false; } if (ok) { diff --git a/js/IntegerOp/CONVERT.js b/js/IntegerOp/CONVERT.js index 721337bb..9a562fc2 100644 --- a/js/IntegerOp/CONVERT.js +++ b/js/IntegerOp/CONVERT.js @@ -30,7 +30,7 @@ function CONVERT() { model = arg1.model; exprs = graphics.exprs; while (true) { - [ok,this.it,this.ot,this.np,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"CONVERT")],[" "],[gettext("Type conversion")],[" "]],[[gettext("Input Type (1:double, 3:int32, 4:int16, 5:int8, ...)")],[gettext("Output Type (1:double, 3:int32, 4:int16, 5:int8, ...)")],[gettext("Do on Overflow (0:Nothing, 1:Saturate, 2:Error)")]],list("vec",1,"vec",1,"vec",1),exprs); + [ok,this.it,this.ot,this.np,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","CONVERT")],[" "],["Type conversion"],[" "]],["Input Type (1:double, 3:int32, 4:int16, 5:int8, ...)","Output Type (1:double, 3:int32, 4:int16, 5:int8, ...)","Do on Overflow (0:Nothing, 1:Saturate, 2:Error)"],list("vec",1,"vec",1,"vec",1),exprs); if (!ok) { break; } @@ -41,13 +41,13 @@ function CONVERT() { this.ot = 1; } if ((this.np!=0&&this.np!=1&&this.np!=2)) { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Do on Overflow"),this.np),msprintf(gettext("Must be in the interval %s."),"[0, 2]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Do on Overflow",this.np),msprintf("Must be in the interval %s.","[0, 2]")); ok = false; } else if ((this.it>8||this.it<1)) { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Input Type"),this.it),msprintf(gettext("Must be in the interval %s."),"[1, 8]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Input Type",this.it),msprintf("Must be in the interval %s.","[1, 8]")); ok = false; } else if ((this.ot>8||this.ot<1)) { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Output Type"),this.ot),msprintf(gettext("Must be in the interval %s."),"[1, 8]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Output Type",this.ot),msprintf("Must be in the interval %s.","[1, 8]")); ok = false; } model.sim = list("convert",4); diff --git a/js/IntegerOp/EXTRACTBITS.js b/js/IntegerOp/EXTRACTBITS.js index 25db739c..3b820860 100644 --- a/js/IntegerOp/EXTRACTBITS.js +++ b/js/IntegerOp/EXTRACTBITS.js @@ -29,16 +29,16 @@ function EXTRACTBITS() { exprs = graphics.exprs; model = arg1.model; while (true) { - [ok,this.Datatype,this.rule,this.bit,this.scal,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"EXTRACTBITS")],[" "],[gettext("Bits Extraction")],[" "],[gettext(" - Bits to Extract:")],[gettext(" 1 Upper Half")],[gettext(" 2 Lower Half")],[gettext(" 3 Range from MSB")],[gettext(" 4 Range to LSB")],[gettext(" 5 Range of Bits")],[gettext(" - Number of Bits or Index of bit : Index 0 is LSB")],[gettext(" If \'Bits to Extract\' is set to \'Range of bits\': [Start, End]")],[" "]],[[msprintf(gettext("Data Type %s"),"(3:int32, 4:int16, 5:int8, ...)")],[gettext("Bits to extract")],[gettext("Number of Bits or Index of Bit")],[gettext("Treat Bit Field as an Integer (0:No, 1:Yes)")]],list("vec",1,"vec",1,"vec",-1,"vec",1),exprs); + [ok,this.Datatype,this.rule,this.bit,this.scal,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","EXTRACTBITS")],[" "],["Bits Extraction"],[" "],[" - Bits to Extract:"],[" 1 Upper Half"],[" 2 Lower Half"],[" 3 Range from MSB"],[" 4 Range to LSB"],[" 5 Range of Bits"],[" - Number of Bits or Index of bit : Index 0 is LSB"],[" If \'Bits to Extract\' is set to \'Range of bits\': [Start, End]"],[" "]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Bits to extract","Number of Bits or Index of Bit","Treat Bit Field as an Integer (0:No, 1:Yes)"],list("vec",1,"vec",1,"vec",-1,"vec",1),exprs); if (!ok) { break; } bitstr = strcat(string(this.bit.slice())," "); if ((this.rule<1)||(this.rule>5)) { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Bits to Extract"),this.rule),msprintf(gettext("Must be in the interval %s."),"[1, 5]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Bits to Extract",this.rule),msprintf("Must be in the interval %s.","[1, 5]")); ok = false; } else if (this.scal<0||this.scal>1) { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Treat Bit Field as an Integer"),this.scal),msprintf(gettext("Must be in the interval %s."),"[0, 1]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Treat Bit Field as an Integer",this.scal),msprintf("Must be in the interval %s.","[0, 1]")); ok = false; } else { in1 = [model.in1,model.in2]; @@ -46,17 +46,17 @@ function EXTRACTBITS() { this.rule = int(this.rule); if ((this.rule==3)||(this.rule==4)) { if ((size(this.bit,"*")!=1)) { - block_parameter_error(msprintf(gettext("Wrong size for \'%s\' parameter: %s."),gettext("Number of Bits or Index of Bit"),bitstr),gettext("Must be a single value.")); + block_parameter_error(msprintf("Wrong size for \'%s\' parameter: %s.","Number of Bits or Index of Bit",bitstr),"Must be a single value."); ok = false; } else { numb = this.bit; } } else if ((this.rule==5)) { if ((size(this.bit,"*")!=2)) { - block_parameter_error(msprintf(gettext("Wrong size for \'%s\' parameter: %s."),gettext("Number of Bits or Index of Bit"),bitstr),gettext("Must have this form: [Start, End].")); + block_parameter_error(msprintf("Wrong size for \'%s\' parameter: %s.","Number of Bits or Index of Bit",bitstr),"Must have this form: [Start, End]."); ok = false; } else if (this.bit[1-1]>this.bit[2-1]) { - block_parameter_error(msprintf(gettext("Wrong values for \'%s\' parameter: %s."),gettext("Number of Bits or Index of Bit"),bitstr),msprintf(gettext("\'Start\' must be less than \'End\'."))); + block_parameter_error(msprintf("Wrong values for \'%s\' parameter: %s.","Number of Bits or Index of Bit",bitstr),msprintf("\'Start\' must be less than \'End\'.")); ok = false; } else { numb = this.bit[2-1]-this.bit[1-1]; @@ -69,7 +69,7 @@ function EXTRACTBITS() { if (ok) { if ((this.Datatype==3||this.Datatype==6)) { if (or(this.bit.slice()>31)||or(this.bit.slice()<0)) { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s."),gettext("Number of Bits or Index of Bit"),bitstr),msprintf(gettext("Indexes must be in the interval %s."),"[0, 31]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s.","Number of Bits or Index of Bit",bitstr),msprintf("Indexes must be in the interval %s.","[0, 31]")); ok = false; } switch (this.rule) { @@ -116,7 +116,7 @@ function EXTRACTBITS() { } } else if ((this.Datatype==4||this.Datatype==7)) { if (or(this.bit.slice()>15)||or(this.bit.slice()<0)) { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s."),gettext("Number of Bits or Index of Bit"),bitstr),msprintf(gettext("Indexes must be in the interval %s."),"[0, 15]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s.","Number of Bits or Index of Bit",bitstr),msprintf("Indexes must be in the interval %s.","[0, 15]")); ok = false; } switch (this.rule) { @@ -163,7 +163,7 @@ function EXTRACTBITS() { } } else if ((this.Datatype==5||this.Datatype==8)) { if (or(this.bit.slice()>7)||or(this.bit.slice()<0)) { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %s."),gettext("Number of Bits or Index of Bit"),bitstr),msprintf(gettext("Indexes must be in the interval %s."),"[0, 7]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %s.","Number of Bits or Index of Bit",bitstr),msprintf("Indexes must be in the interval %s.","[0, 7]")); ok = false; } switch (this.rule) { @@ -209,7 +209,7 @@ function EXTRACTBITS() { } } } else { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Data Type"),this.Datatype),msprintf(gettext("Must be in the interval %s."),"[3, 8]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Data Type",this.Datatype),msprintf("Must be in the interval %s.","[3, 8]")); ok = false; } } diff --git a/js/IntegerOp/INTMUL.js b/js/IntegerOp/INTMUL.js index 9ce9fb1b..24dba7b1 100644 --- a/js/IntegerOp/INTMUL.js +++ b/js/IntegerOp/INTMUL.js @@ -30,14 +30,14 @@ function INTMUL() { model = arg1.model; exprs = graphics.exprs; while (true) { - [ok,this.Datatype,this.np,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"INTMUL")],[" "],[gettext("Integer matrix multiplication")],[" "]],[[msprintf(gettext("Data Type %s"),"(3:int32, 4:int16, 5:int8, ...)")],[gettext("Do on Overflow (0:Nothing, 1:Saturate, 2:Error)")]],list("vec",1,"vec",1),exprs); + [ok,this.Datatype,this.np,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","INTMUL")],[" "],["Integer matrix multiplication"],[" "]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Do on Overflow (0:Nothing, 1:Saturate, 2:Error)"],list("vec",1,"vec",1),exprs); if (!ok) { break; } it = this.Datatype*ones(1,2); ot = this.Datatype; if ((this.np!=0&&this.np!=1&&this.np!=2)) { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Do on Overflow"),this.np),msprintf(gettext("Must be in the interval %s."),"[0, 2]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Do on Overflow",this.np),msprintf("Must be in the interval %s.","[0, 2]")); ok = false; } else if (this.Datatype==3) { if (this.np==0) { @@ -88,7 +88,7 @@ function INTMUL() { model.sim = list("matmul_ui8e",4); } } else { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Data Type"),ot),msprintf(gettext("Must be in the interval %s."),"[3, 8]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Data Type",ot),msprintf("Must be in the interval %s.","[3, 8]")); ok = false; } in1 = [model.in1,model.in2]; diff --git a/js/IntegerOp/JKFLIPFLOP.js b/js/IntegerOp/JKFLIPFLOP.js index fcada59b..1fd4c604 100644 --- a/js/IntegerOp/JKFLIPFLOP.js +++ b/js/IntegerOp/JKFLIPFLOP.js @@ -67,7 +67,7 @@ function JKFLIPFLOP() { model = xx.model; init_old = model.odstate[1-1]; while (true) { - [ok,this.init,this.exprs0] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"JKFLIPFLOP")],[" "],[gettext("JK flip-flop")],[" "],[gettext("The \'Initial Value\' must be 0 or 1 of type int8")],[gettext(" - Negative values are considered as int8(0)")],[gettext(" - Positive values are considered as int8(1)")],[" "]],gettext("Initial Value"),list("vec",1),exprs); + [ok,this.init,this.exprs0] = scicos_getvalue([[msprintf("Set %s block parameters","JKFLIPFLOP")],[" "],["JK flip-flop"],[" "],["The \'Initial Value\' must be 0 or 1 of type int8"],[" - Negative values are considered as int8(0)"],[" - Positive values are considered as int8(1)"],[" "]],"Initial Value",list("vec",1),exprs); if (!ok) { break; } diff --git a/js/IntegerOp/LOGIC.js b/js/IntegerOp/LOGIC.js index dc3d15e3..cf843b1f 100644 --- a/js/IntegerOp/LOGIC.js +++ b/js/IntegerOp/LOGIC.js @@ -31,7 +31,7 @@ function LOGIC() { exprs = graphics.exprs; model = arg1.model; while (true) { - [ok,this.mat,this.herit,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"LOGIC")],[" "],[gettext("Combinatorial logic")],[" "],[gettext(" Rows of the matrix are the output values")],[gettext(" Number of rows must be a power of two.")],[gettext(" Number of columns gives the number of outputs.")],[" "]],[[gettext("Truth Table (matrix of outputs)")],[gettext("Accepts Inherited Events (0:No, 1:Yes)")]],list("mat",[-1,-2],"vec",1),exprs); + [ok,this.mat,this.herit,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","LOGIC")],[" "],["Combinatorial logic"],[" "],[" Rows of the matrix are the output values"],[" Number of rows must be a power of two."],[" Number of columns gives the number of outputs."],[" "]],["Truth Table (matrix of outputs)","Accepts Inherited Events (0:No, 1:Yes)"],list("mat",[-1,-2],"vec",1),exprs); if (!ok) { break; } @@ -39,13 +39,13 @@ function LOGIC() { nin = (log(size(this.mat,1))/log(2)); u1 = floor(nin); if ((u1!=nin)) { - block_parameter_error(msprintf(gettext("Wrong size for \'%s\' parameter: %d."),gettext("Truth Table"),size(this.mat,1)),gettext("Number of rows must be a power of two.")); + block_parameter_error(msprintf("Wrong size for \'%s\' parameter: %d.","Truth Table",size(this.mat,1)),"Number of rows must be a power of two."); ok = false; } else if ((find(this.mat.slice()!=0&&this.mat.slice()!=1)!=[])) { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter."),gettext("Truth Table")),msprintf(gettext("Elements must be in the interval %s."),"[0, 1]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter.","Truth Table"),msprintf("Elements must be in the interval %s.","[0, 1]")); ok = false; } else if (this.herit<0||this.herit>1) { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Accepts Inherited Events"),this.herit),msprintf(gettext("Must be in the interval %s."),"[0, 1]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Accepts Inherited Events",this.herit),msprintf("Must be in the interval %s.","[0, 1]")); ok = false; } if (ok) { diff --git a/js/IntegerOp/SHIFT.js b/js/IntegerOp/SHIFT.js index 21e5e04e..4534e25c 100644 --- a/js/IntegerOp/SHIFT.js +++ b/js/IntegerOp/SHIFT.js @@ -31,12 +31,12 @@ function SHIFT() { model = arg1.model; exprs = graphics.exprs; while (true) { - [ok,this.Datatype,this.nb,this.np,exprs] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"SHIFT")],[" "],[gettext("Shift/Rotates bits")]],[[msprintf(gettext("Data Type %s"),"(3:int32, 4:int16, 5:int8, ...)")],[gettext("Number of Bits to Shift Left (Negative number to shift right)")],[gettext("Shift Type (0:Arithmetic, 1:Circular)")]],list("vec",1,"vec",1,"vec",1),exprs); + [ok,this.Datatype,this.nb,this.np,exprs] = scicos_getvalue([[msprintf("Set %s block parameters","SHIFT")],[" "],["Shift/Rotates bits"]],[msprintf("Data Type %s","(3:int32, 4:int16, 5:int8, ...)"),"Number of Bits to Shift Left (Negative number to shift right)","Shift Type (0:Arithmetic, 1:Circular)"],list("vec",1,"vec",1,"vec",1),exprs); if (!ok) { break; } if ((this.np!=0&&this.np!=1)) { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Shift Type"),this.np),msprintf(gettext("Must be in the interval %s."),"[0, 1]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Shift Type",this.np),msprintf("Must be in the interval %s.","[0, 1]")); ok = false; } it = this.Datatype; @@ -105,7 +105,7 @@ function SHIFT() { } } } else { - block_parameter_error(msprintf(gettext("Wrong value for \'%s\' parameter: %d."),gettext("Data Type"),this.Datatype),msprintf(gettext("Must be in the interval %s."),"[3, 8]")); + block_parameter_error(msprintf("Wrong value for \'%s\' parameter: %d.","Data Type",this.Datatype),msprintf("Must be in the interval %s.","[3, 8]")); ok = false; } if (ok) { diff --git a/js/IntegerOp/SRFLIPFLOP.js b/js/IntegerOp/SRFLIPFLOP.js index 3ae36928..19b180db 100644 --- a/js/IntegerOp/SRFLIPFLOP.js +++ b/js/IntegerOp/SRFLIPFLOP.js @@ -51,7 +51,7 @@ function SRFLIPFLOP() { model = xx.model; init_old = model.odstate[1-1]; while (true) { - [ok,this.init,this.exprs0] = scicos_getvalue([[msprintf(gettext("Set %s block parameters"),"SRFLIPFLOP")],[" "],[gettext("SR flip-flop")],[" "],[gettext("The \'Initial Value\' must be 0 or 1 of type int8")],[gettext(" - Negative values are considered as int8(0)")],[gettext(" - Positive values are considered as int8(1)")],[" "]],gettext("Initial Value"),list("vec",1),exprs); + [ok,this.init,this.exprs0] = scicos_getvalue([[msprintf("Set %s block parameters","SRFLIPFLOP")],[" "],["SR flip-flop"],[" "],["The \'Initial Value\' must be 0 or 1 of type int8"],[" - Negative values are considered as int8(0)"],[" - Positive values are considered as int8(1)"],[" "]],"Initial Value",list("vec",1),exprs); if (!ok) { break; } |