From: Eli Zaretskii <eliz@gnu.org>
To: "Stephen J. Turnbull" <stephen@xemacs.org>
Cc: schwab@suse.de, fusion@mx6.tiki.ne.jp, emacs-devel@gnu.org
Subject: Re: Fwd: A system for localizing documentation strings
Date: Fri, 27 Jul 2007 14:12:42 +0300 [thread overview]
Message-ID: <utzrqdrrp.fsf@gnu.org> (raw)
In-Reply-To: <871weuk228.fsf@uwakimon.sk.tsukuba.ac.jp> (stephen@xemacs.org)
> From: "Stephen J. Turnbull" <stephen@xemacs.org>
> Cc: Andreas Schwab <schwab@suse.de>,
> fusion@mx6.tiki.ne.jp,
> emacs-devel@gnu.org
> Date: Fri, 27 Jul 2007 11:33:51 +0900
>
> > If it does, how does the problem of marking the strings with _() in
> > C/C++ (or rather lack thereof), to get their translations looked up,
> > get solved?
>
> You mark them as dummies so that the extraction tool (typically
> xgettext but Emacs may need a special tool) will put them in the pot
> file. Then you arrange that they get gettextized at the point of use,
> as usual:
>
> /* This work is fiction; any resemblance to real Emacs identifiers
> is a pure coincidence. Except `gettext' plays itself. */
> docstring = gettext (fetch_docstring_from_DOC (index, docfile))
>
> or
>
> (let ((docstring (gettext (documentation-property symbol))))
> ;; format for display
> )
Sorry, I'm probably too dumb this morning, because I don't think I
follow. Or maybe I just don't know enough about the latest
developments in gettext.
Here's how the declaration of an Emacs primitive looks in current Emacs
sources:
DEFUN ("face-attribute-relative-p", Fface_attribute_relative_p,
Sface_attribute_relative_p,
2, 2, 0,
doc: /* Check whether a face attribute value is relative.
Specifically, this function returns t if the attribute ATTRIBUTE
with the value VALUE is relative.
A relative value is one that doesn't entirely override whatever is
inherited from another face. For most possible attributes,
the only relative value that users see is `unspecified'.
However, for :height, floating point values are also relative. */)
(attribute, value)
Lisp_Object attribute, value;
{
As you see, the doc string is just a C comment; after preprocessing,
it is completely gone. The make-docfile command gathers these
comments and puts them into etc/DOC, but there's no trace of them in
the binary, as you point out.
I would imagine that we can tweak make-docfile to generate a POT file,
as Andreas suggests, but the other part of gettext is to call some
function to replace the original string with its translation, when
that string needs to be presented to the user. How does one do that,
if the original string is not there to begin with?
What am I missing here?
next prev parent reply other threads:[~2007-07-27 11:12 UTC|newest]
Thread overview: 120+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-26 1:05 A system for localizing documentation strings Jean-Christophe Helary
2007-07-26 3:18 ` Eli Zaretskii
2007-07-26 3:29 ` Fwd: " Jean-Christophe Helary
2007-07-26 11:54 ` Kenichi Handa
2007-07-26 13:28 ` Jean-Christophe Helary
2007-07-27 0:30 ` Kenichi Handa
2007-07-27 1:18 ` Jean-Christophe Helary
2007-07-26 12:13 ` Fwd: " Eli Zaretskii
2007-07-26 13:51 ` Jean-Christophe Helary
2007-07-26 14:50 ` Jason Rumney
2007-07-26 15:27 ` Jean-Christophe Helary
2007-07-26 15:41 ` Jason Rumney
2007-07-26 15:49 ` Jean-Christophe Helary
2007-07-26 16:15 ` Jason Rumney
2007-07-26 16:25 ` Jean-Christophe Helary
2007-07-26 16:28 ` Jean-Christophe Helary
2007-07-26 16:44 ` Jason Rumney
2007-07-27 5:04 ` Richard Stallman
2007-07-27 7:22 ` Jean-Christophe Helary
2007-07-27 7:49 ` David Kastrup
2007-07-27 7:52 ` David Kastrup
2007-07-27 11:16 ` Eli Zaretskii
2007-07-27 12:07 ` Kenichi Handa
2007-07-27 12:26 ` David Kastrup
2007-07-27 12:53 ` Kenichi Handa
2007-07-27 14:43 ` Jean-Christophe Helary
2007-07-28 14:11 ` Richard Stallman
2007-07-27 16:03 ` Henrik Enberg
2007-07-27 14:09 ` Werner LEMBERG
2007-07-27 18:47 ` Eli Zaretskii
2007-07-27 11:37 ` David Kastrup
2007-07-28 14:11 ` Richard Stallman
2007-07-26 15:10 ` Eli Zaretskii
2007-07-26 15:42 ` Jean-Christophe Helary
2007-07-26 16:03 ` Jason Rumney
2007-07-26 16:23 ` Jean-Christophe Helary
2007-07-27 5:04 ` Richard Stallman
2007-07-26 19:34 ` Eli Zaretskii
2007-07-26 19:54 ` David Kastrup
2007-07-26 15:36 ` Fwd: " Andreas Schwab
2007-07-26 19:09 ` Eli Zaretskii
[not found] ` <871weuk228.fsf@uwakimon.sk.tsukuba.ac.jp>
2007-07-27 9:53 ` Andreas Schwab
2007-07-27 11:14 ` Eli Zaretskii
2007-07-27 11:43 ` Andreas Schwab
2007-07-27 11:59 ` Eli Zaretskii
2007-07-27 12:17 ` Andreas Schwab
2007-07-27 18:36 ` Eli Zaretskii
2007-07-27 14:56 ` Jan Djärv
2007-07-27 15:18 ` Jason Rumney
2007-07-27 15:28 ` Jan Djärv
2007-07-27 15:59 ` Jean-Christophe Helary
2007-07-27 16:09 ` Fwd: " Jason Rumney
2007-07-27 17:53 ` Jan Djärv
2007-07-28 3:13 ` Jean-Christophe Helary
2007-07-27 16:14 ` Fwd: " David Kastrup
2007-07-27 16:55 ` Jason Rumney
2007-07-27 12:27 ` Kenichi Handa
2007-07-27 15:00 ` Jan Djärv
2007-07-27 11:12 ` Eli Zaretskii [this message]
2007-07-27 11:45 ` Andreas Schwab
2007-07-27 12:18 ` Stephen J. Turnbull
2007-07-27 12:08 ` Eli Zaretskii
2007-07-27 16:24 ` Richard Stallman
2007-07-27 2:16 ` Summary (Re: A system for localizing documentation strings) Jean-Christophe Helary
2007-07-27 5:44 ` Stefan Monnier
2007-07-27 7:24 ` David Reitter
2007-07-27 7:45 ` Stefan Monnier
2007-07-27 8:03 ` Jan Djärv
2007-07-27 8:18 ` Jason Rumney
2007-07-27 9:04 ` Jan Djärv
2007-07-27 9:22 ` David Kastrup
2007-07-27 9:39 ` Jan Djärv
2007-07-27 9:46 ` David Kastrup
2007-07-27 11:49 ` Eli Zaretskii
2007-07-27 15:11 ` Jan Djärv
2007-07-27 11:20 ` Eli Zaretskii
2007-07-27 14:52 ` Jan Djärv
2007-07-27 12:13 ` Jean-Christophe Helary
2007-07-27 15:16 ` Jan Djärv
2007-07-27 15:55 ` Jean-Christophe Helary
2007-07-27 8:21 ` David Kastrup
2007-07-27 9:08 ` Jan Djärv
2007-07-27 9:33 ` David Kastrup
2007-07-27 9:38 ` Jan Djärv
2007-07-27 11:05 ` Jean-Christophe Helary
2007-07-27 11:19 ` Lennart Borgman (gmail)
2007-07-27 11:23 ` Eli Zaretskii
2007-07-28 14:11 ` Richard Stallman
2007-07-27 11:08 ` Andreas Schwab
2007-07-27 11:15 ` Jean-Christophe Helary
2007-07-27 11:54 ` Eli Zaretskii
2007-07-27 11:59 ` Jason Rumney
2007-07-27 13:13 ` Jean-Christophe Helary
2007-07-27 13:42 ` David Kastrup
2007-07-27 14:12 ` Jean-Christophe Helary
2007-07-28 14:11 ` Richard Stallman
2007-07-28 22:49 ` David Kastrup
2007-07-27 15:07 ` Jan Djärv
2007-07-27 15:41 ` Jean-Christophe Helary
2007-07-27 16:11 ` Andreas Schwab
2007-07-28 2:57 ` Jean-Christophe Helary
2007-07-28 14:11 ` Richard Stallman
2007-07-27 16:24 ` Richard Stallman
2007-07-28 2:53 ` Jean-Christophe Helary
2007-07-29 2:22 ` Richard Stallman
2007-07-29 4:46 ` Jean-Christophe Helary
2007-07-29 16:55 ` M Jared Finder
2007-07-30 0:57 ` Jean-Christophe Helary
2007-07-30 16:43 ` Richard Stallman
2007-07-30 17:04 ` Jean-Christophe Helary
2007-07-31 3:38 ` Richard Stallman
2007-07-31 4:16 ` Jean-Christophe Helary
2007-07-31 6:05 ` Jan Djärv
2007-08-02 0:32 ` Jean-Christophe Helary
2007-08-02 23:43 ` Richard Stallman
2007-08-01 18:11 ` Davis Herring
2007-08-02 0:25 ` Jean-Christophe Helary
2007-08-02 5:47 ` Miles Bader
2007-07-27 5:04 ` Fwd: A system for localizing documentation strings Richard Stallman
2007-07-27 8:29 ` Jean-Christophe Helary
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=utzrqdrrp.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=fusion@mx6.tiki.ne.jp \
--cc=schwab@suse.de \
--cc=stephen@xemacs.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.