Gnus development mailing list
 help / color / mirror / Atom feed
From: visigoth@naiad.fac.cs.cmu.edu
Subject: Re: Internationalization
Date: 10 Nov 1996 19:25:42 -0500	[thread overview]
Message-ID: <vpdu3qxqxyx.fsf@naiad.fac.cs.cmu.edu> (raw)
In-Reply-To: Lars Magne Ingebrigtsen's message of 10 Nov 1996 16:31:18 +0100

Lars Magne Ingebrigtsen <larsi@ifi.uio.no> writes:

> If such a thing was to be done, how should one do it?  Has there been
> done work in this area for other Elisp packages?
> 
> Hm...  One could create mappings from the English prompts and messages
> to the current countries' prompts and messages, using a hash table.
> Providing that the different messages are unique in English.  Then one
> just has to wrap all string in the source code with `(gnus-map "The
> string")', and the `gnus-map' function could use a hash table built
> from the tranlation file for the country during loadup...  Hm...  How
> should the translations be specified in the translation files?  Uhm,
> that could be done easily enough, with just about any syntax, with the
> English originals as comments.  The skeleton translation file(s) could
> be generated automatically by just looking for the `gnus-map' calls in
> the source files...

This sounds like an interesting way to start--I suspect that it would
be useful after a time to move the English version out to a file as
well.  So you would have something like:

(in gnus-art.el, lines around 386:)

	(format prompt (if (and gnus-number-of-articles-to-be-saved
                                (> gnus number-of-articles-to-be-saved 1))
                           (format (gnus-get-trans 'these-articles)
                                   gnus-number-of-articles-to-be-saved)
                        (gnus-get-trans 'this-article)))

On the other hand--that's really damned ugly.  Hmm.  It would be nice
if there were some better guarantee that things still work even when a
string changes, that would be good.  Maybe use a combination of these
two strategies.

(gnus-map "these %d articles" 'these-articles)

So this would use "these %d articles" if the language was set to use
the default strings, or look it up from the translation list using the
symbol.  This way, if the string changes, the symbol can stay the
same.  If it changes drastically, it's perhaps easier to recall that
it needs to be changed elsewhere, too.

And finally, you could also do something like:

gnus-text-these-D-articles => "these %d articles" or the
translation--and have a loaded file which sets up the mappings.  I
suppose this just wastes a lot of namespace, though.

The real problem is that anything that's easy to convert to from
having the quotes in-line has the consistency problem--and any other
method sort of uglifies things.  <frown>

And the real problem, unfortunately, is documentation strings.

John.



  parent reply	other threads:[~1996-11-11  0:25 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-10 15:31 Internationalization Lars Magne Ingebrigtsen
1996-11-10 17:05 ` Internationalization Andy Eskilsson
1996-11-10 17:51   ` Internationalization Kai Grossjohann
1996-11-10 19:02 ` Internationalization David Kågedal
1996-11-11  6:27   ` Internationalization Steinar Bang
1996-11-11 15:20   ` Internationalization Lars Magne Ingebrigtsen
1996-11-11  0:25 ` visigoth [this message]
1996-11-11 15:25   ` Internationalization Lars Magne Ingebrigtsen
1996-11-11 22:19     ` Internationalization David Moore
1996-11-12 22:45       ` Internationalization Lars Magne Ingebrigtsen
1996-11-11 12:14 ` Internationalization Robert Bihlmeyer
1996-11-11 12:50 ` Internationalization Per Abrahamsen
1996-11-11 15:14   ` Internationalization William Perry
1996-11-11 15:24     ` Internationalization Per Abrahamsen
1996-11-11 22:01   ` Internationalization François Pinard
1996-11-12 10:58     ` Internationalization Per Abrahamsen
1996-11-12 15:59       ` Internationalization François Pinard
1996-11-12 16:57         ` Internationalization Ulrich Drepper
     [not found]           ` <rjwwvqgxz1.fsf@babbage.dina.kvl.dk>
     [not found]             ` <x7ralyf6rx.fsf@myware.rz.uni-karlsruhe.de>
     [not found]               ` <rj3eydhwx5.fsf@babbage.dina.kvl.dk>
1996-11-14 12:28                 ` Internationalization François Pinard
1996-11-12 22:07         ` Internationalization Lars Magne Ingebrigtsen
1996-11-13 19:19           ` Internationalization Jan Vroonhof
1996-11-13 22:05             ` Internationalization William Perry
1996-11-14 19:27               ` Internationalization Ralph Schleicher
1996-11-12 20:12   ` Internationalization Jan Vroonhof
1996-11-11 21:35 ` Internationalization François Pinard
1996-11-12  1:57   ` Internationalization Ulrich Drepper
1996-11-12 19:56   ` Internationalization Lars Magne Ingebrigtsen
1996-11-12 22:40     ` Internationalization Ulrich Drepper
2002-10-20 21:21     ` Internationalization François Pinard
1996-11-17 22:59 ` Internationalization Ralph Schleicher

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=vpdu3qxqxyx.fsf@naiad.fac.cs.cmu.edu \
    --to=visigoth@naiad.fac.cs.cmu.edu \
    /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.
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 NNTP newsgroup(s).