From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.devel Subject: Re: A system for localizing documentation strings Date: Thu, 26 Jul 2007 15:50:00 +0100 Message-ID: <46A8B498.1070502@gnu.org> References: <795F38F4-7253-47DC-97DD-53BED4F0AB97@mx6.tiki.ne.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1185461415 16543 80.91.229.12 (26 Jul 2007 14:50:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 26 Jul 2007 14:50:15 +0000 (UTC) Cc: emacs-devel@gnu.org To: Jean-Christophe Helary Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 26 16:50:13 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IE4fM-0004GT-6w for ged-emacs-devel@m.gmane.org; Thu, 26 Jul 2007 16:50:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IE4fL-0004fv-RX for ged-emacs-devel@m.gmane.org; Thu, 26 Jul 2007 10:50:11 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IE4fI-0004bf-D5 for emacs-devel@gnu.org; Thu, 26 Jul 2007 10:50:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IE4fG-0004ZO-QJ for emacs-devel@gnu.org; Thu, 26 Jul 2007 10:50:08 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IE4fG-0004ZL-OV for emacs-devel@gnu.org; Thu, 26 Jul 2007 10:50:06 -0400 Original-Received: from outmail1.freedom2surf.net ([194.106.33.237]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IE4fG-0005mK-Az for emacs-devel@gnu.org; Thu, 26 Jul 2007 10:50:06 -0400 Original-Received: from [127.0.0.1] (i-83-67-23-108.freedom2surf.net [83.67.23.108]) by outmail1.freedom2surf.net (Postfix) with ESMTP id 2AD4151C52; Thu, 26 Jul 2007 15:50:05 +0100 (BST) User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) In-Reply-To: X-detected-kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:75574 Archived-At: Jean-Christophe Helary wrote: > 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. It need not be a major departure. The "keys" can be the function and variable names (where both exist with the same name, we'd need some way to differentiate). The "default" docstring (English) could remain with the function or variable definition, so nothing need change in the lisp files. Keeping the translations in separate files makes it easier to update them separately from the Emacs release cycle. Eventually we will reach a point where the translations don't change separately from Emacs, but for at least a few Emacs releases there will be new translations and corrections to translations appearing much quicker than the Emacs release cycle, and it would be useful if users could take advantage of th= em. If the translated doc string format is a lisp form, then we have a lot of flexibility in how we arrange the files. Small lisp extensions distributed separately from Emacs would have the option to include their translations in the same file as the code, and larger packages would have the option of having a file per language. Eg: (define-docstring-translation '(:function example-function) 'ja "=E8=AA=9E= =E4=BE=8B") The other requirement would be for a lisp file to declare where its translations are, and for the user to be able to add more later: (provide-translations 'example-feature '(ja es fr) "example-translations"= ) where example-feature corresponds to the provide statement in the file, and translations for Japanese, Spanish and French are in "example-translations.el"