Commit beb610c2 authored by Chyla Zbigniew's avatar Chyla Zbigniew

Added help_is_localized field.

* src/func.h (struct TokenizedHelp): Added help_is_localized field.

* src/func.c (tokenized_help_new): Initialize it here.

* src/dialogs/dialog-function-wizard.c (formula_guru_init_args):
Use the default argument separator (comma) if the function's help is
not localized.
parent f8c07d62
2001-08-16 Zbigniew Chyla <cyba@gnome.pl>
* src/func.h (struct TokenizedHelp): Added help_is_localized field.
* src/func.c (tokenized_help_new): Initialize it here.
* src/dialogs/dialog-function-wizard.c (formula_guru_init_args):
Use the default argument separator (comma) if the function's help is
not localized.
2001-08-15 Jody Goldberg <jgoldberg@home.com>
* src/GNOME_Gnumeric.xml : Use the new artwork from gtkhtml for
......
2001-08-16 Zbigniew Chyla <cyba@gnome.pl>
* src/func.h (struct TokenizedHelp): Added help_is_localized field.
* src/func.c (tokenized_help_new): Initialize it here.
* src/dialogs/dialog-function-wizard.c (formula_guru_init_args):
Use the default argument separator (comma) if the function's help is
not localized.
2001-08-15 Jody Goldberg <jgoldberg@home.com>
* src/GNOME_Gnumeric.xml : Use the new artwork from gtkhtml for
......
2001-08-16 Zbigniew Chyla <cyba@gnome.pl>
* src/func.h (struct TokenizedHelp): Added help_is_localized field.
* src/func.c (tokenized_help_new): Initialize it here.
* src/dialogs/dialog-function-wizard.c (formula_guru_init_args):
Use the default argument separator (comma) if the function's help is
not localized.
2001-08-15 Jody Goldberg <jgoldberg@home.com>
* src/GNOME_Gnumeric.xml : Use the new artwork from gtkhtml for
......
2001-08-16 Zbigniew Chyla <cyba@gnome.pl>
* src/func.h (struct TokenizedHelp): Added help_is_localized field.
* src/func.c (tokenized_help_new): Initialize it here.
* src/dialogs/dialog-function-wizard.c (formula_guru_init_args):
Use the default argument separator (comma) if the function's help is
not localized.
2001-08-15 Jody Goldberg <jgoldberg@home.com>
* src/GNOME_Gnumeric.xml : Use the new artwork from gtkhtml for
......
......@@ -506,7 +506,15 @@ formula_guru_init_args (FormulaGuruState *state)
}
ptr = copy_args = g_strdup (syntax);
i = 0;
arg_separator = format_get_arg_sep ();
/*
We must use different argument separator for parsing depending
on if the function's help is localized or not. If the help is
translated, e.g. to Polish ("@SYNTAX=DGET(baza_danych;pole;kryteria)")
then we use locale dependent separator. If the help is not translated
then we use comma. */
arg_separator = state->help_tokens->help_is_localized
? format_get_arg_sep ()
: ',';
while (*ptr) {
if (*ptr == '(' && !start)
start = ptr + 1;
......
......@@ -506,7 +506,15 @@ formula_guru_init_args (FormulaGuruState *state)
}
ptr = copy_args = g_strdup (syntax);
i = 0;
arg_separator = format_get_arg_sep ();
/*
We must use different argument separator for parsing depending
on if the function's help is localized or not. If the help is
translated, e.g. to Polish ("@SYNTAX=DGET(baza_danych;pole;kryteria)")
then we use locale dependent separator. If the help is not translated
then we use comma. */
arg_separator = state->help_tokens->help_is_localized
? format_get_arg_sep ()
: ',';
while (*ptr) {
if (*ptr == '(' && !start)
start = ptr + 1;
......
......@@ -1028,7 +1028,9 @@ tokenized_help_new (FunctionDefinition const *fn_def)
int seek_att = 1;
int last_newline = 1;
tok->help_copy = g_strdup (_(fn_def->help [0]));
ptr = _(fn_def->help [0]);
tok->help_is_localized = ptr != fn_def->help [0];
tok->help_copy = g_strdup (ptr);
tok->sections = g_ptr_array_new ();
ptr = tok->help_copy;
......
......@@ -133,6 +133,7 @@ Value *function_iterate_do_value (const EvalPos *ep,
/* Detailed function help */
typedef struct {
GPtrArray *sections;
gboolean help_is_localized;
gchar *help_copy;
FunctionDefinition const *fndef;
} TokenizedHelp;
......
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