From: Jean-Christophe Helary <fusion@mx6.tiki.ne.jp>
To: emacs-devel@gnu.org
Subject: Re: A system for localizing documentation strings
Date: Thu, 26 Jul 2007 22:51:54 +0900 [thread overview]
Message-ID: <F5AF7EB3-20BE-455D-99AA-0A039A238A30@mx6.tiki.ne.jp> (raw)
In-Reply-To: <E1IE2Dk-0001Tu-Gx@fencepost.gnu.org>
On 26 juil. 07, at 21:13, Eli Zaretskii wrote:
>> From: Jean-Christophe Helary <fusion@mx6.tiki.ne.jp>
>> Date: Thu, 26 Jul 2007 12:29:19 +0900
>>
>> I was told by Eli Zaretskii that such discussions should better take
>> place here, hence my forward from help-gnu-emacs@gnu.org
>
> Thanks.
>
>> To offer a practical possibility for interactive localization we'd
>> need a function that dynamically generates output instead of the
>> "optional-documentation..." string. This function would take a number
>> of paired arguments:
>>
>> (docfun
>> source-language-1 source-language-1-documentation-string
>> source-language-2 source-language-2-documentation-string
>> etc ...)
>>
>> for ex:
>>
>> (docfun
>> EN "optional-documentation in EN..."
>> FR "documentation optionnelle en FR...")
>
> I don't like this implementation idea, because it would require the
> user to byte-compile Lisp files whenever a translation to another
> language is added. This would be very inconvenient, especially for
> *.el files that are preloaded when Emacs is built, because that would
> mean one must have the sources available nearby, and must run the
> build procedure and "make install". The latter step requires sysadmin
> privileges on many platforms, another inconvenience.
I see 2 types of .el files.
1) Those that come with the emacs distribution.
2) Those that can be installed in user space.
The distribution would come with the translated .el files and the
updates to the translation could be included in updates of the
distribution without requiring the user to build the distribution
when new translations come. Since the translations are in the code
there is little management necessary (unlike systems where the
localizations come in separate files).
For the .el files in user space, the author would maintain the file's
translation and users would be able to compile the file without any
specific problem.
> I think it's much better to have a separate translation file for each
> .el file. Such a translation file would be loaded on demand when
> documentation for symbols defined on that file is requested by the
> user. The translation file needs include only the names of the
> symbols and their doc strings for supported languages. (We could also
> have separate translation files for each language, but I think it
> won't be necessary, as the number of symbols on a single .el file is
> quite small.)
I don't think it is a good idea because it would put a bigger load on
the coder who would then have to write keys in the code and then
values in a separate file. That would impair understanding of the
code too. Besides for the fact that it would be a major departure
from the current code workflow.
>> (transfun function-name
>> source-language
>> target-language
>> reference-function-name ; should be a list
>> reference-file ; should be a list)
>>
>> The function-name declares which function has to be translated
>> The source-language declares from which language string the source
>> should be displayed
>
> Why do we need the source language?
Because as soon as we have a system that allows for localization we
can expect to have "native" code written and so we'll have to
reference the source language that _will_ be different from English.
We don't want people who don't master English to produce weird
English in their descriptions because the system implies
source=English. That would require the faulty English string to be
rewritten before proceeding to translation.
Also, we can expect to find translators who would be more familiar
with one source language than the other. If there is a Japanese
equivalent to an English description. I'd rather use the Japanese as
source and the English as reference to translate to French for exemple.
In the end, the translation needs to be recorded as a list of paired
strings for future reference. This is usually called a "translation
memory" and comes in different formats. A widely used one in the free
world being PO compendia, another one, mostly used in the translation
world is TMX (an XML dialect: Translation Memory eXchange). PO kind
of expects English to be the source, but my understanding is that
recent developments of gettext are making this a thing of the past.
TMX is totaly "multilingual".
>> What we need is provide 1) a way for coders to identify the necessary
>> strings for the translation 2) a way for translators to add
>> translated strings "the emacs way" 3) a modification of the display
>> procedures to take the new strings into account.
>
> Your number 3) is not described correctly: it's not the display that
> needs to be modified, it's the Emacs documentation commands. The
> documentation commands don't display anything, they just insert the
> doc text into a buffer, whether *Help* or minibuffer or something
> else. The Emacs redisplay engine then displays that buffer; however,
> if the text in the buffer to be displayed is already in French (say),
> that is what you will see after it is displayed.
Ok, sorry for my misunderstanding.
> So what is needed is to modify the documentation commands so that they
> will look up the translated text and display that text instead of the
> original English doc string.
That is correct. Except that we can't expect the English to be the
original anymore. Hence the necessity to specify what language the
strings are written in.
> Also, we should keep in mind that Lisp primitives (those
> implemented in
> C) have their doc strings as C comments, not as C strings. The
> infrastructure developed for Emacs l10n should provide solution for
> the primitives as well, and the solution will have to be different
> both from your suggestion above and from the traditional gettext-style
> message catalog.
Could that part be concieved separatly ?
I mean, we could start by having a modification in the documentation
commands and then see what that gives with catalogs (either in
the .el or separate, because in the end we could consider that the 2
solutions are valid depending on the scope of the .el file).
Jean-Christophe Helary
next prev parent reply other threads:[~2007-07-26 13:51 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 [this message]
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
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=F5AF7EB3-20BE-455D-99AA-0A039A238A30@mx6.tiki.ne.jp \
--to=fusion@mx6.tiki.ne.jp \
--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 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.