[interchange-cvs] CVS notice: activity by jon

[email protected] [email protected]
Sun Jul 1 01:07:00 2001

CVS activity by user 'jon':
interchange/lib/Vend Interpolate.pm,, Parse.pm,,
Update of /var/cvs/interchange/lib/Vend
In directory interchange.redhat.com:/tmp/cvs-serv31033

Modified Files:
      Tag: DEV_4_7_0
	Interpolate.pm Parse.pm 
Log Message:
Added new core [msg] tag based on Stefan and Mike's ideas for doing
parse-time locale substitutions. Some examples follow.

Using message string key if available, and multiple-value printf replacement:

	arg.0="[data session username]"
	arg.1="[scratch wahnsinn]"
	User %s is approximately %s%% crazy.

Using [LC]-style inline translations with a single printf replacement:

	arg="[scratch wahnsinn]"
	inline=1    # can also use attribute 'lc' as an alias for inline
	This user has earned %s crazy points.
	[de_DE]Dieser Benutzer hat %s Wahnsinnspunkte verdient.[/de_DE]

Using a forced locale setting with no printf replacement:

	Thi%s will be tran%slated to German without any printf-ing.

(Note that forcing locale=something currently doesn't make any sense
in the admin UI, since usertag [mm-locale] erases $Vend::Cfg->{Locale_
repository} before it loads in the global locale, so there isn't any
other locale to switch to. Maybe it shouldn't do this?)

And probably just for fun, using a hash-based arglist, with printf string
substitutions ordered by sorted hash keys:

	A slightly nuttier example (with values %s and %s).

Commentary, corrections, and enhancements are of course welcome.
If everyone's ok with this and it tests out ok, I'll add it to the SDF