[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs i18n
From: |
Juri Linkov |
Subject: |
Re: Emacs i18n |
Date: |
Wed, 24 Apr 2019 23:18:34 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
> So, where do we go from here now ?
>
> Juri, have you written documentation ?
It's still WIP. First I looked how i18n is implemented in XEmacs,
and discovered that whereas the interface is documented, it's
not fully functional. What is worse, it's quite ugly.
So I turned onto a nicer interface in CLISP that could be
used as a basis of gettext interface in Emacs Lisp.
> Do you want help ?
Help is needed to install the standard gettext infrastructure
using gettextize. Help is expected from someone who has more
experience in applying gettext to other projects.
Once the default gettext infrastructure is installed,
I could help in adapting gettext to Emacs.
Meanwhile, currently I'm replacing dired-plural-s with ngettext
in bug#35287. It's not without problems: one problematic place
is in dired-do-kill-lines:
(defun dired-do-kill-lines (&optional arg fmt)
...
(let ((count 0))
(setq count (1+ count))
(or (equal "" fmt)
(message (or fmt "Killed %d line%s.") count (dired-plural-s count)))
count)
(defun dired-omit-expunge (&optional regexp)
...
(setq count (dired-do-kill-lines
nil
(if dired-omit-verbose "Omitted %d line%s." "")))
The format string can't be just replaced in dired-do-kill-lines with
something like
(ngettext "Killed %d line." "Killed %d lines." count)
because it can be called with a format string from dired-omit-expunge,
but also dired-omit-expunge has no access to the variable 'count'.
There are more such marginal cases, but eventually they all
have to resolved somehow.
- Re: Emacs i18n, Jean-Christophe Helary, 2019/04/24
- Re: Emacs i18n,
Juri Linkov <=