i18n, part 2

Andrew Cagney cagney@gnu.org
Sun Dec 12 18:35:00 GMT 2004


Baurjan Ismagulov wrote:

>    /* Add a command to allow the user to force the FPU model.  */
>    new_set = add_set_enum_cmd
>      ("fpu", no_class, fp_model_strings, &current_fp_model,
> -     "Set the floating point type.\n"
> -     "auto - Determine the FP typefrom the OS-ABI.\n"
> -     "softfpa - Software FP, mixed-endian doubles on little-endian ARMs.\n"
> -     "fpa - FPA co-processor (GCC compiled).\n"
> -     "softvfp - Software FP with pure-endian doubles.\n"
> -     "vfp - VFP co-processor.",
> +     _("Set the floating point type.\n\
> +auto - Determine the FP typefrom the OS-ABI.\n\
> +softfpa - Software FP, mixed-endian doubles on little-endian ARMs.\n\
> +fpa - FPA co-processor (GCC compiled).\n\
> +softvfp - Software FP with pure-endian doubles.\n\
> +vfp - VFP co-processor."),
>       &setarmcmdlist);
>    set_cmd_sfunc (new_set, set_fp_model_sfunc);
>    set_cmd_sfunc (deprecated_add_show_from_set (new_set, &showarmcmdlist),

You might want to consider focusing on these set/show commands, and 
across all files.  They need to be switched to the add_setshow_..._cmd 
form vis:

>    /* Debugging flag.  */
> -  add_setshow_boolean_cmd ("arm", class_maintenance, &arm_debug, "\
> -Set ARM debugging.", "\
> -Show ARM debugging.", "\
> -When on, arm-specific debugging is enabled.", "\
> -ARM debugging is %s.",
> +  add_setshow_boolean_cmd ("arm", class_maintenance, &arm_debug,
> +			   _("Set ARM debugging."),
> +			   _("Show ARM debugging."),
> +			   _("When on, arm-specific debugging is enabled."),
> +			   _("ARM debugging is %s."),
>  			   NULL, NULL,
>  			   &setdebuglist, &showdebuglist);
>  }

as the former involves deprecated_add_show_from_set and what that does 
under the hood is very i18n-unfriendly.

The current add_setshow_.._cmd implementation also has problems (it 
doesn't yet use the SHOW string) but at least all strings are present 
and correct.

Andrew

PS: Also recall my suggestion for adding something like _XXX or _FIXME 
as a way to mark that a string needs to be fixed on a second pass.



More information about the Gdb-patches mailing list