[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs i18n
From: |
Juri Linkov |
Subject: |
Re: Emacs i18n |
Date: |
Mon, 18 Mar 2019 23:20:00 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
> Other Lisp implementations use ‘ngettext’ as well, e.g.:
> https://clisp.sourceforge.io/impnotes.html#ggettext
And this command will extract ‘ngettext’ messages:
xgettext --from-code=UTF-8 -kngettext:1,2 *.el **/*.el
Using only ‘ngettext’ has an additional advantage:
there will be no need to add more such functions as
nmessage, nerror, nuser-error, ntramp-error, etc.
But for cases when ‘message’ will receive a string
already translated by ‘ngettext’, e.g.:
(message (ngettext "Replaced %d occurrence%s"
"Replaced %d occurrences%s"
replace-count)
we need to mark translated strings like Richard suggested:
(defun ngettext (msgid msgid_plural n &optional _domain _category)
"Return the plural form of the translation for of MSGID and N."
(propertize (if (/= n 1) msgid_plural msgid) 'translated t))
so ‘format-message’ should check if its first argument is translated,
and not to call gettext again.
- Re: Emacs i18n, (continued)
- Re: Emacs i18n, Jean-Christophe Helary, 2019/03/06
- Re: Emacs i18n, Paul Eggert, 2019/03/07
- Re: Emacs i18n, Richard Stallman, 2019/03/07
- Re: Emacs i18n, Juri Linkov, 2019/03/11
- Re: Emacs i18n, Paul Eggert, 2019/03/11
- Re: Emacs i18n, Juri Linkov, 2019/03/12
- Re: Emacs i18n, Juri Linkov, 2019/03/17
- Re: Emacs i18n,
Juri Linkov <=
- Re: Emacs i18n, Paul Eggert, 2019/03/18
- Re: Emacs i18n, Juri Linkov, 2019/03/19
- Re: Emacs i18n, Jean-Christophe Helary, 2019/03/11
- Re: Emacs i18n, Michael Albinus, 2019/03/12
- Re: Emacs i18n, Paul Eggert, 2019/03/06
- Re: Emacs i18n, Eli Zaretskii, 2019/03/06
- Re: Emacs i18n, Paul Eggert, 2019/03/06
- Re: Emacs i18n, Eli Zaretskii, 2019/03/06
- Re: Emacs i18n, Richard Stallman, 2019/03/06
- Re: Emacs i18n, Eli Zaretskii, 2019/03/07