comp.lang.ada
 help / color / mirror / Atom feed
From: "Pascal Obry" <p.obry@wanadoo.fr>
Subject: Re: Programming for the World in Ada95
Date: 2000/02/16
Date: 2000-02-16T19:15:01+00:00	[thread overview]
Message-ID: <88esvl$nlb$1@wanadoo.fr> (raw)
In-Reply-To: m3n1p13cmy.fsf@ns59.infomatch.bc.ca

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1439 bytes --]


Ray Blaak a �crit dans le message ...
>"${critical_count} critical things are in the ${total_count} bad things
here"
>
>The upshot is that the messages package now needs to allow the
specification of
>values for the placeholders, using name/value pairs:
>
>  type Replacement is private:
>  type Replacements is array (<>) of Replacement;
>
>  function Subst(Name, Value : in String) return Replacement;
>
>  function Translate
>      (message : in Translatable_Message; parameters : in Replacements)
>        return String;
>  -- I prefer Translate or Lookup instead of Display_Message, since you
might
>  -- need the translated string for many purposes, e.g. logging, error
>  -- messages, on a button, in a menu, etc.  I also suggest
>  -- Translatable_Message or something similar, since the text is not
>  -- necessarily for errors.


A function very close to this one could be found in my Template_Parser
package. Nice plug isn't it :)

I use it all the time to parse Web page template containing tags to be
replaced
by some values before sending it back to the Web server.

Pascal.

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--|
--| "The best way to travel is by means of imagination"







  parent reply	other threads:[~2000-02-16  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-14  0:00 Programming for the World in Ada95 John J Cupak Jr
2000-02-14  0:00 ` Ehud Lamm
2000-02-14  0:00 ` Larry Kilgallen
2000-02-16  0:00   ` Robert A Duff
2000-02-14  0:00 ` Gautier
2000-02-15  0:00 ` Jean-Pierre Rosen
2000-02-15  0:00   ` Marin D. Condic
2000-02-15  0:00     ` Ray Blaak
2000-02-16  0:00       ` Pascal Obry
2000-02-16  0:00         ` Ray Blaak
2000-02-16  0:00       ` Nick Roberts
2000-02-16  0:00       ` Pascal Obry [this message]
2000-02-16  0:00       ` Larry Kilgallen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox