From 31043f6cfc3612e0278f2dea1a8e3ce050b72798 Mon Sep 17 00:00:00 2001 From: Francois-Xavier Coudert Date: Sat, 17 Sep 2005 20:58:01 +0200 Subject: re PR fortran/15586 (gfortran should support i18n in its compiler messages) PR fortran/15586 * arith.c (gfc_arith_error): Add translation support for error messages. * array.c (gfc_match_array_ref): Likewise. (gfc_match_array_spec): Likewise. * check.c (must_be): Add msgid convention to third argument. (same_type_check): Add translation support for error message. (rank_check): Likewise. (kind_value_check): Likewise. (gfc_check_associated): Correct typo. (gfc_check_reshape): Add translation support for error message. (gfc_check_spread): Likewise. * error.c (error_printf): Add nocmsgid convention to argument. (gfc_warning, gfc_notify_std, gfc_warning_now, gfc_warning_check) (gfc_error, gfc_error_now): Likewise. (gfc_status): Add cmsgid convention to argument. * expr.c (gfc_extract_int): Add translation support for error messages. (gfc_check_conformance): Add msgid convention to argument. (gfc_check_pointer_assign): Correct tabbing. * gfortran.h: Include intl.h header. Remove prototype for gfc_article. * gfortranspec.c: Include intl.h header. (lang_specific_driver): Add translation support for --version. * io.c (check_format): Add translation support for error message. (format_item_1): Likewise. (data_desc): Likewise. * matchexp.c: Likewise. * misc.c (gfc_article): Remove function. * module.c (bad_module): Use msgid convention. Add translation support for error messages. (require_atom): Add translation support for error messages. * parse.c (gfc_ascii_statement): Likewise. (gfc_state_name): Likewise. * primary.c (match_boz_constant): Reorganise error messages for translations. * resolve.c (resolve_entries): Likewise. (resolve_operator): Add translation support for error messages. (gfc_resolve_expr): Use msgid convention. Reorganise error messages for translations. (resolve_symbol): Add translation support for error messages. * symbol.c (gfc_add_procedure): Remove use of gfc_article function. * trans-const.c (gfc_build_string_const): Use msgid convention. * exgettext: Add a new nocmsgid convention for arguments that should be marked as no-c-format. * gcc.pot: Regenerate. From-SVN: r104372 --- gcc/fortran/module.c | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'gcc/fortran/module.c') diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index b11a16b..5117050 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -827,27 +827,25 @@ static char *atom_string, atom_name[MAX_ATOM_SIZE]; static void bad_module (const char *) ATTRIBUTE_NORETURN; static void -bad_module (const char *message) +bad_module (const char *msgid) { - const char *p; + fclose (module_fp); switch (iomode) { case IO_INPUT: - p = "Reading"; + gfc_fatal_error ("Reading module %s at line %d column %d: %s", + module_name, module_line, module_column, msgid); break; case IO_OUTPUT: - p = "Writing"; + gfc_fatal_error ("Writing module %s at line %d column %d: %s", + module_name, module_line, module_column, msgid); break; default: - p = "???"; + gfc_fatal_error ("Module %s at line %d column %d: %s", + module_name, module_line, module_column, msgid); break; } - - fclose (module_fp); - - gfc_fatal_error ("%s module %s at line %d column %d: %s", p, - module_name, module_line, module_column, message); } @@ -1154,19 +1152,19 @@ require_atom (atom_type type) switch (type) { case ATOM_NAME: - p = "Expected name"; + p = _("Expected name"); break; case ATOM_LPAREN: - p = "Expected left parenthesis"; + p = _("Expected left parenthesis"); break; case ATOM_RPAREN: - p = "Expected right parenthesis"; + p = _("Expected right parenthesis"); break; case ATOM_INTEGER: - p = "Expected integer"; + p = _("Expected integer"); break; case ATOM_STRING: - p = "Expected string"; + p = _("Expected string"); break; default: gfc_internal_error ("require_atom(): bad atom type required"); -- cgit v1.1