From: Juri Linkov <juri@jurta.org>
Cc: emacs-devel@gnu.org
Subject: i18n (was: reverting/notifying of files that no longer exist)
Date: Thu, 15 Jul 2004 21:42:09 +0300 [thread overview]
Message-ID: <87hds9glj4.fsf@mail.jurta.org> (raw)
In-Reply-To: quack.20040714T1030.j5eknefqdq@hkn.eecs.berkeley.edu
Karl Chen <quarl@hkn.eecs.berkeley.edu> writes:
> BTW, I don't know if Emacs coding standards say much regarding
> internationalization, but in general it's better to write out
> (message "%s changed on disk...")
> and
> (message "%s renamed or deleted on disk...")
> for translation.
> (http://www.gnu.org/software/gettext/manual/html_node/gettext_15.html)
According to those guidelines the right way to translate messages is
to call the `gettext' function on messages before placeholders in them
get expanded with arguments, i.e. to write:
(message (gettext "File %s renamed") filename)
However, this might not be the best solution for Emacs, since it has
several powerful mechanisms like regexps to avoid the need to add
`gettext' functions to every `message' call. So after the call to
(message "File %s renamed" filename) the function `message' receives
a string like "File /some/path/somefile renamed" and could use a
variable with translation mappings to performs regexp replacements
before messages get displayed in the echo area, e.g.:
(defvar message-translations
'(("some_language_name" "^File \\(.?+\\) renamed$" "Elif \1 demaner")
(... ... ...)))
Anyway, I believe this feature is for Emacs 22, and etc/TODO already
has an entry for that.
--
Juri Linkov
http://www.jurta.org/emacs/
next prev parent reply other threads:[~2004-07-15 18:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-09 15:47 suggestion: reverting/notifying of files that no longer exist Karl Chen
2004-07-12 16:18 ` Juri Linkov
2004-07-12 16:28 ` default file name to buffer name (was: reverting/notifying of files that no longer exist) Juri Linkov
2004-07-14 0:17 ` Richard Stallman
2004-07-12 19:00 ` suggestion: reverting/notifying of files that no longer exist Karl Chen
2004-07-14 14:17 ` Juri Linkov
2004-07-14 17:30 ` Karl Chen
2004-07-15 18:42 ` Juri Linkov [this message]
2004-07-14 0:16 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87hds9glj4.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).