Commit 655db839 authored by Andreas J. Guelzow's avatar Andreas J. Guelzow

/home/aguelzow/tmp/cvsX5JtJb

parent 305f2d53
2002-05-03 Andreas J. Guelzow <aguelzow@taliesin.ca>
* src/func-builtin.c : mark argument names for translation and adjust
them for use by the formula guru.
* src/func.c (function_def_get_arg_name) : translate argument name
2002-05-03 Morten Welinder <terra@diku.dk>
* src/workbook-control-gui.c (cb_select_auto_expr): Filter out
......
2002-05-03 Andreas J. Guelzow <aguelzow@taliesin.ca>
* src/func-builtin.c : mark argument names for translation and adjust
them for use by the formula guru.
* src/func.c (function_def_get_arg_name) : translate argument name
2002-05-03 Morten Welinder <terra@diku.dk>
* src/workbook-control-gui.c (cb_select_auto_expr): Filter out
......
2002-05-03 Andreas J. Guelzow <aguelzow@taliesin.ca>
* src/func-builtin.c : mark argument names for translation and adjust
them for use by the formula guru.
* src/func.c (function_def_get_arg_name) : translate argument name
2002-05-03 Morten Welinder <terra@diku.dk>
* src/workbook-control-gui.c (cb_select_auto_expr): Filter out
......
2002-05-03 Andreas J. Guelzow <aguelzow@taliesin.ca>
* functions.c : mark argument names for translation and adjust
them for use by the formula guru.
......@@ -3215,74 +3215,74 @@ gnumeric_sumproduct (FunctionEvalInfo *ei, GnmExprList *args)
/***************************************************************************/
const ModulePluginFunctionInfo math_functions[] = {
{ "abs", "f", "number", &help_abs, gnumeric_abs, NULL, NULL, NULL },
{ "acos", "f", "number", &help_acos, gnumeric_acos, NULL, NULL, NULL },
{ "acosh", "f", "number", &help_acosh, gnumeric_acosh, NULL, NULL, NULL },
{ "asin", "f", "number", &help_asin, gnumeric_asin, NULL, NULL, NULL },
{ "asinh", "f", "number", &help_asinh, gnumeric_asinh, NULL, NULL, NULL },
{ "atan", "f", "number", &help_atan, gnumeric_atan, NULL, NULL, NULL },
{ "atanh", "f", "number", &help_atanh, gnumeric_atanh, NULL, NULL, NULL },
{ "atan2", "ff", "xnum,ynum", &help_atan2, gnumeric_atan2, NULL, NULL, NULL },
{ "cos", "f", "number", &help_cos, gnumeric_cos, NULL, NULL, NULL },
{ "cosh", "f", "number", &help_cosh, gnumeric_cosh, NULL, NULL, NULL },
{ "countif", "r?", "range,criteria", &help_countif, gnumeric_countif, NULL, NULL, NULL },
{ "ceil", "f", "number", &help_ceil, gnumeric_ceil, NULL, NULL, NULL },
{ "ceiling", "ff", "number,significance", &help_ceiling, gnumeric_ceiling, NULL, NULL, NULL },
{ "degrees", "f", "number", &help_degrees, gnumeric_degrees, NULL, NULL, NULL },
{ "even", "f", "number", &help_even, gnumeric_even, NULL, NULL, NULL },
{ "exp", "f", "number", &help_exp, gnumeric_exp, NULL, NULL, NULL },
{ "fact", "f", "number", &help_fact, gnumeric_fact, NULL, NULL, NULL },
{ "factdouble", "f", "number", &help_factdouble, gnumeric_factdouble, NULL, NULL, NULL },
{ "combin", "ff", "n,k", &help_combin, gnumeric_combin, NULL, NULL, NULL },
{ "floor", "f|f", "number", &help_floor, gnumeric_floor, NULL, NULL, NULL },
{ "gcd", 0, "number1,number2", &help_gcd, NULL, gnumeric_gcd, NULL, NULL },
{ "int", "f", "number", &help_int, gnumeric_int, NULL, NULL, NULL },
{ "abs", "f", N_("number"), &help_abs, gnumeric_abs, NULL, NULL, NULL },
{ "acos", "f", N_("number"), &help_acos, gnumeric_acos, NULL, NULL, NULL },
{ "acosh", "f", N_("number"), &help_acosh, gnumeric_acosh, NULL, NULL, NULL },
{ "asin", "f", N_("number"), &help_asin, gnumeric_asin, NULL, NULL, NULL },
{ "asinh", "f", N_("number"), &help_asinh, gnumeric_asinh, NULL, NULL, NULL },
{ "atan", "f", N_("number"), &help_atan, gnumeric_atan, NULL, NULL, NULL },
{ "atanh", "f", N_("number"), &help_atanh, gnumeric_atanh, NULL, NULL, NULL },
{ "atan2", "ff", N_("xnum,ynum"), &help_atan2, gnumeric_atan2, NULL, NULL, NULL },
{ "cos", "f", N_("number"), &help_cos, gnumeric_cos, NULL, NULL, NULL },
{ "cosh", "f", N_("number"), &help_cosh, gnumeric_cosh, NULL, NULL, NULL },
{ "countif", "r?", N_("range,criteria"), &help_countif, gnumeric_countif, NULL, NULL, NULL },
{ "ceil", "f", N_("number"), &help_ceil, gnumeric_ceil, NULL, NULL, NULL },
{ "ceiling", "ff", N_("number,significance"), &help_ceiling, gnumeric_ceiling, NULL, NULL, NULL },
{ "degrees", "f", N_("number"), &help_degrees, gnumeric_degrees, NULL, NULL, NULL },
{ "even", "f", N_("number"), &help_even, gnumeric_even, NULL, NULL, NULL },
{ "exp", "f", N_("number"), &help_exp, gnumeric_exp, NULL, NULL, NULL },
{ "fact", "f", N_("number"), &help_fact, gnumeric_fact, NULL, NULL, NULL },
{ "factdouble", "f", N_("number"), &help_factdouble, gnumeric_factdouble, NULL, NULL, NULL },
{ "combin", "ff", N_("n,k"), &help_combin, gnumeric_combin, NULL, NULL, NULL },
{ "floor", "f|f", N_("number"), &help_floor, gnumeric_floor, NULL, NULL, NULL },
{ "gcd", 0, N_("number,number"), &help_gcd, NULL, gnumeric_gcd, NULL, NULL },
{ "int", "f", N_("number"), &help_int, gnumeric_int, NULL, NULL, NULL },
{ "lcm", 0, "", &help_lcm, NULL, gnumeric_lcm, NULL, NULL },
{ "ln", "f", "number", &help_ln, gnumeric_ln, NULL, NULL, NULL },
{ "log", "f|f", "number[,base]", &help_log, gnumeric_log, NULL, NULL, NULL },
{ "log2", "f", "number", &help_log2, gnumeric_log2, NULL, NULL, NULL },
{ "log10", "f", "number", &help_log10, gnumeric_log10, NULL, NULL, NULL },
{ "mod", "ff", "num,denom", &help_mod, gnumeric_mod, NULL, NULL, NULL },
{ "mround", "ff", "number,multiple", &help_mround, gnumeric_mround, NULL, NULL, NULL },
{ "ln", "f", N_("number"), &help_ln, gnumeric_ln, NULL, NULL, NULL },
{ "log", "f|f", N_("number,base"), &help_log, gnumeric_log, NULL, NULL, NULL },
{ "log2", "f", N_("number"), &help_log2, gnumeric_log2, NULL, NULL, NULL },
{ "log10", "f", N_("number"), &help_log10, gnumeric_log10, NULL, NULL, NULL },
{ "mod", "ff", N_("numerator,denominator"), &help_mod, gnumeric_mod, NULL, NULL, NULL },
{ "mround", "ff", N_("number,multiple"), &help_mround, gnumeric_mround, NULL, NULL, NULL },
{ "multinomial", 0, "", &help_multinomial, NULL, gnumeric_multinomial, NULL, NULL },
{ "odd" , "f", "number", &help_odd, gnumeric_odd, NULL, NULL, NULL },
{ "power", "ff", "x,y", &help_power, gnumeric_power, NULL, NULL, NULL },
{ "g_product", 0, "number", &help_g_product, NULL, gnumeric_g_product, NULL, NULL },
{ "quotient" , "ff", "num,den", &help_quotient, gnumeric_quotient, NULL, NULL, NULL },
{ "radians", "f", "number", &help_radians, gnumeric_radians, NULL, NULL, NULL },
{ "odd" , "f", N_("number"), &help_odd, gnumeric_odd, NULL, NULL, NULL },
{ "power", "ff", N_("base,exponent"), &help_power, gnumeric_power, NULL, NULL, NULL },
{ "g_product", 0, N_("number"), &help_g_product, NULL, gnumeric_g_product, NULL, NULL },
{ "quotient" , "ff", N_("numerator,denominator"), &help_quotient, gnumeric_quotient, NULL, NULL, NULL },
{ "radians", "f", N_("number"), &help_radians, gnumeric_radians, NULL, NULL, NULL },
{ "rand", "", "", &help_rand, gnumeric_rand, NULL, NULL, NULL },
{ "randbernoulli", "f", "p", &help_randbernoulli, gnumeric_randbernoulli, NULL, NULL, NULL },
{ "randbetween", "ff", "bottom,top", &help_randbetween, gnumeric_randbetween, NULL, NULL, NULL },
{ "randbinom", "ff", "p,trials", &help_randbinom, gnumeric_randbinom, NULL, NULL, NULL },
{ "randexp", "f", "b", &help_randexp, gnumeric_randexp, NULL, NULL, NULL },
{ "randnegbinom", "ff", "p,failures", &help_randnegbinom, gnumeric_randnegbinom, NULL, NULL, NULL },
{ "randpoisson", "f", "lambda", &help_randpoisson, gnumeric_randpoisson, NULL, NULL, NULL },
{ "roman", "f|f", "number[,type]", &help_roman, gnumeric_roman, NULL, NULL, NULL },
{ "round", "f|f", "number[,digits]", &help_round, gnumeric_round, NULL, NULL, NULL },
{ "rounddown", "f|f", "number,digits", &help_rounddown, gnumeric_rounddown, NULL, NULL, NULL },
{ "roundup", "f|f", "number,digits", &help_roundup, gnumeric_roundup, NULL, NULL, NULL },
{ "seriessum", 0, "x,n,m,coefficients", &help_seriessum, NULL, gnumeric_seriessum, NULL, NULL },
{ "sign", "f", "number", &help_sign, gnumeric_sign, NULL, NULL, NULL },
{ "sin", "f", "number", &help_sin, gnumeric_sin, NULL, NULL, NULL },
{ "sinh", "f", "number", &help_sinh, gnumeric_sinh, NULL, NULL, NULL },
{ "sqrt", "f", "number", &help_sqrt, gnumeric_sqrt, NULL, NULL, NULL },
{ "sqrtpi", "f", "number", &help_sqrtpi, gnumeric_sqrtpi, NULL, NULL, NULL },
{ "suma", 0, "number1,number2,...", &help_suma, NULL, gnumeric_suma, NULL, NULL },
{ "sumif", "r?|r", "range,criteria[,actual_range]", &help_sumif, gnumeric_sumif, NULL, NULL, NULL },
{ "sumproduct", 0, "range1,range2,...", &help_sumproduct, NULL, gnumeric_sumproduct, NULL, NULL },
{ "sumsq", 0, "number", &help_sumsq, NULL, gnumeric_sumsq, NULL, NULL },
{ "sumx2my2", "AA", "array1,array2", &help_sumx2my2, gnumeric_sumx2my2, NULL, NULL, NULL },
{ "sumx2py2", "AA", "array1,array2", &help_sumx2py2, gnumeric_sumx2py2, NULL, NULL, NULL },
{ "sumxmy2", "AA", "array1,array2", &help_sumxmy2, gnumeric_sumxmy2, NULL, NULL, NULL },
{ "tan", "f", "number", &help_tan, gnumeric_tan, NULL, NULL, NULL },
{ "tanh", "f", "number", &help_tanh, gnumeric_tanh, NULL, NULL, NULL },
{ "trunc", "f|f", "number,digits", &help_trunc, gnumeric_trunc, NULL, NULL, NULL },
{ "randbernoulli", "f", N_("p"), &help_randbernoulli, gnumeric_randbernoulli, NULL, NULL, NULL },
{ "randbetween", "ff", N_("bottom,top"), &help_randbetween, gnumeric_randbetween, NULL, NULL, NULL },
{ "randbinom", "ff", N_("p,trials"), &help_randbinom, gnumeric_randbinom, NULL, NULL, NULL },
{ "randexp", "f", N_("b"), &help_randexp, gnumeric_randexp, NULL, NULL, NULL },
{ "randnegbinom", "ff", N_("p,failures"), &help_randnegbinom, gnumeric_randnegbinom, NULL, NULL, NULL },
{ "randpoisson", "f", N_("lambda"), &help_randpoisson, gnumeric_randpoisson, NULL, NULL, NULL },
{ "roman", "f|f", N_("number,type"), &help_roman, gnumeric_roman, NULL, NULL, NULL },
{ "round", "f|f", N_("number,digits"), &help_round, gnumeric_round, NULL, NULL, NULL },
{ "rounddown", "f|f", N_("number,digits"), &help_rounddown, gnumeric_rounddown, NULL, NULL, NULL },
{ "roundup", "f|f", N_("number,digits"), &help_roundup, gnumeric_roundup, NULL, NULL, NULL },
{ "seriessum", 0, N_("x,n,m,coefficients"), &help_seriessum, NULL, gnumeric_seriessum, NULL, NULL },
{ "sign", "f", N_("number"), &help_sign, gnumeric_sign, NULL, NULL, NULL },
{ "sin", "f", N_("number"), &help_sin, gnumeric_sin, NULL, NULL, NULL },
{ "sinh", "f", N_("number"), &help_sinh, gnumeric_sinh, NULL, NULL, NULL },
{ "sqrt", "f", N_("number"), &help_sqrt, gnumeric_sqrt, NULL, NULL, NULL },
{ "sqrtpi", "f", N_("number"), &help_sqrtpi, gnumeric_sqrtpi, NULL, NULL, NULL },
{ "suma", 0, N_("number,number,"), &help_suma, NULL, gnumeric_suma, NULL, NULL },
{ "sumif", "r?|r", N_("range,criteria,actual_range"), &help_sumif, gnumeric_sumif, NULL, NULL, NULL },
{ "sumproduct", 0, N_("range,range,"), &help_sumproduct, NULL, gnumeric_sumproduct, NULL, NULL },
{ "sumsq", 0, N_("number"), &help_sumsq, NULL, gnumeric_sumsq, NULL, NULL },
{ "sumx2my2", "AA", N_("array1,array2"), &help_sumx2my2, gnumeric_sumx2my2, NULL, NULL, NULL },
{ "sumx2py2", "AA", N_("array1,array2"), &help_sumx2py2, gnumeric_sumx2py2, NULL, NULL, NULL },
{ "sumxmy2", "AA", N_("array1,array2"), &help_sumxmy2, gnumeric_sumxmy2, NULL, NULL, NULL },
{ "tan", "f", N_("number"), &help_tan, gnumeric_tan, NULL, NULL, NULL },
{ "tanh", "f", N_("number"), &help_tanh, gnumeric_tanh, NULL, NULL, NULL },
{ "trunc", "f|f", N_("number,digits"), &help_trunc, gnumeric_trunc, NULL, NULL, NULL },
{ "pi", "", "", &help_pi, gnumeric_pi, NULL, NULL, NULL },
{ "mmult", "AA", "array1,array2", &help_mmult, gnumeric_mmult, NULL, NULL, NULL },
{ "minverse","A", "array", &help_minverse, gnumeric_minverse, NULL, NULL, NULL },
{ "mdeterm", "A", "array[,matrix_type[,bandsize]]", &help_mdeterm, gnumeric_mdeterm, NULL, NULL, NULL },
{ "mmult", "AA", N_("array1,array2"), &help_mmult, gnumeric_mmult, NULL, NULL, NULL },
{ "minverse","A", N_("array"), &help_minverse, gnumeric_minverse, NULL, NULL, NULL },
{ "mdeterm", "A", N_("array,matrix_type,bandsize"), &help_mdeterm, gnumeric_mdeterm, NULL, NULL, NULL },
#if 0
{ "logmdeterm", "A|si", "array[,matrix_type[,bandsize]]",
{ "logmdeterm", "A|si", N_("array,matrix_type,bandsize"),
&help_logmdeterm, gnumeric_logmdeterm, NULL, NULL, NULL },
#endif
{NULL}
......
......@@ -225,20 +225,21 @@ func_builtin_init (void)
(sheetcatname, _(sheetcatname));
def = function_add_nodes (mathcat, "sum", 0,
"number1,number2,...",
N_("number,number,"),
&help_sum, gnumeric_sum);
auto_format_function_result (def, AF_FIRST_ARG_FORMAT);
mathfuncs = g_slist_prepend (mathfuncs, def);
def = function_add_nodes (mathcat, "product", 0,
"number", &help_product, gnumeric_product);
N_("number,number,"),
&help_product, gnumeric_product);
mathfuncs = g_slist_prepend (mathfuncs, def);
def = function_add_args (gnumericcat, "gnumeric_version", "", "",
&help_gnumeric_version, gnumeric_version);
gnumericfuncs = g_slist_prepend (gnumericfuncs, def);
def = function_add_args (sheetcat, "selection", "b", "permit_intersection",
def = function_add_args (sheetcat, "selection", "b", N_("permit_intersection"),
&help_selection, gnumeric_selection);
sheetfuncs = g_slist_prepend (sheetfuncs, def);
}
......
......@@ -651,6 +651,7 @@ function_def_get_arg_name (FunctionDefinition const *fn_def,
{
gchar **names, **o_names;
gchar *name;
gchar *translated_arguments;
g_return_val_if_fail (arg_idx >= 0, NULL);
g_return_val_if_fail (fn_def != NULL, NULL);
......@@ -661,7 +662,10 @@ function_def_get_arg_name (FunctionDefinition const *fn_def,
if (!fn_def->named_arguments)
return NULL;
names = g_strsplit (fn_def->named_arguments, ",", G_MAXINT);
translated_arguments = _(fn_def->named_arguments);
names = g_strsplit (translated_arguments,
strcmp (translated_arguments, fn_def->named_arguments) == 0 ?
"," : format_get_arg_sep (), G_MAXINT);
o_names = names;
while (arg_idx-- && *names) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment