Re: SRFI 198 Foreign Interface Errors: abusing alists for fun and non-profit Lassi Kortela (17 Jul 2020 17:22 UTC)
Interaction of gettext and SRFI 198's localization feature Lassi Kortela (26 Jul 2020 21:21 UTC)

Re: SRFI 198 Foreign Interface Errors: abusing alists for fun and non-profit Lassi Kortela 17 Jul 2020 17:22 UTC

> (make-foreign-error
>   '((error-set . errno)
>     (code (number . 2)
>           (symbol . errno/ENOENT))
>     (scheme-procedure . open-file)
>     (foreign-interface . open)
>     (message (en_US . "open-file called open: errno/ENOENT: No such file
> or directory")
>              (fi_FI . "~~~FIX_ME insert Finnish version here"))
>     (data (arguments . ("not-a-valid-filename" 0 428))
>           (heritage . "SRFI 170"))))

This looks fine to me. In what way are nested alists used
problematically here? :)

> (Lassi is the designer of the API, and has been volunteered by me to
> translate one English error message into Finnish and/or Swedish or
> whatever. :-)

I can try to find some existing ones for both languages. Localized error
messages can be quite amusing since the terminology may not be properly
established in the target language and the translations are often done
by writers who don't grasp the tech at that level of detail.