guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More i18n


From: Neil Jerram
Subject: Re: More i18n
Date: Mon, 11 Dec 2006 19:42:58 +0000
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> Hi,
>
> The patch below provides further i18n support.

Overall, this all looks fine to me (although I'm nowhere near an
expert in i18n).  Detailed comments on about 40% are as follows.

> +#   langinfo.h, nl_types.h - SuS v2
> +#   iconv.h - SuS v2

"SuS v2" isn't quite a reason for testing, is it?  I think you need a
few more words here.

> address@hidden {C Function} SCM scm_from_string (const char *str, const char 
> *charset)
> address@hidden {C Function} SCM scm_from_stringn (const char *str, size_t 
> len, const char *charset)
> +These are generalized versions of the above functions.
> +
> +Create a Scheme string that has the same contents as @var{str} when
> +interpreted in the character encoding specified by @var{charset} (the
> +interpretation of charset is platform-dependent).

Could you:

(i) add a reference to where charsets are documented further

(ii) modify wording to make clear that it is the source C string that
is being "interpreted in the character encoding ..."

?

> address@hidden nl_langinfo
> address@hidden low-level locale information
> +It is sometimes useful to obtain very specific information about a
> +locale such as the name it uses for days or months, its format for
> +representing floating-point figures, etc.  The @code{(ice-9 i18n)}
> +module provides support for this with the @code{language-information}
> +procedure.  Note that this procedure is only available on platforms
> +that provide @code{nl_langinfo ()} (@pxref{The Elegant and Fast Way,
> address@hidden,, libc, The GNU C Library Reference Manual}).  When
> address@hidden, the @code{language-information} feature
> +is provided (@pxref{Feature Tracking}).

Last sentence seems garbled.

> +           ;; detailed language information
> +           language-information
> +           CODESET
> +           ABDAY_1 ABDAY_2 ABDAY_3 ABDAY_4 ABDAY_5 ABDAY_6 ABDAY_7
> +           DAY_1 DAY_2 DAY_3 DAY_4 DAY_5 DAY_6 DAY_7
> +           ABMON_1 ABMON_2 ABMON_3 ABMON_4 ABMON_5 ABMON_6 ABMON_7
> +           ABMON_8 ABMON_9 ABMON_10 ABMON_11 ABMON_12
> +           MON_1 MON_2 MON_3 MON_4 MON_5 MON_6 MON_7 MON_8
> +           MON_9 MON_10 MON_11 MON_12
> +           AM_STR PM_STR
> +           D_T_FMT D_FMT T_FMT T_FMT_AMPM
> +           ERA ERA_D_FMT ERA_D_T_FMT ERA_T_FMT
> +           ALT_DIGITS RADIXCHAR THOUSEP
> +           CRNCYSTR
> +           YESEXPR NOEXPR YESSTR NOSTR
> +
> +           ;; GNU extensions (may be unavailable on non-GNU systems)
> +           ERA_YEAR DECIMAL_POINT
> +           INT_CURR_SYMBOL CURRENCY_SYMBOL
> +           MON_DECIMAL_POINT MON_THOUSANDS_SEP MON_GROUPING
> +           POSITIVE_SIGN NEGATIVE_SIGN INT_FRAC_DIGITS FRAC_DIGITS
> +           P_CS_PRECEDES P_SEP_BY_SPACE N_CS_PRECEDES N_SEP_BY_SPACE
> +           P_SIGN_POSN N_SIGN_POSN INT_P_CS_PRECEDES INT_P_SEP_BY_SPACE
> +           INT_N_CS_PRECEDES INT_N_SEP_BY_SPACE INT_P_SIGN_POSN
> +           INT_N_SIGN_POSN))

That's a lot of constant definitions!  Did you consider the possibility of
any other approach (e.g. symbols)?

> +   1. The `CODESET' value if not normalized.  This is a secondary
> +   issue, but

"if" -> "is"?

> +   2. `nl_langinfo ()' is not available on Windows (but do we care?).  */

I think we care enough for it to be worth removing the "(but do we
care?)".

> +  c_result = strdup (c_result);
> +
> +  codeset = (char *) alloca (strlen (tmp_codeset) + 1);
> +  strcpy (codeset, tmp_codeset);

Can we avoid alloca here?  We know from another current thread that
some systems don't seem to have it.

...

That's as far as I've got for now.  Does anyone else have a cunning
way of reviewing a big diff like this?  I'm finding it quite slow.  It
would be nicer if epatch or something similar worked, but for me it
doesn't.

Regards,
     Neil





reply via email to

[Prev in Thread] Current Thread [Next in Thread]