Index: openacs-4/packages/acs-lang/tcl/localization-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/localization-procs.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/acs-lang/tcl/localization-procs.tcl 11 Aug 2003 16:18:11 -0000 1.10 +++ openacs-4/packages/acs-lang/tcl/localization-procs.tcl 18 Aug 2003 08:03:43 -0000 1.11 @@ -340,28 +340,30 @@ } { # All localization message keys have a certain prefix set message_key "acs-lang.localization-$key" - - return [lang::message::lookup $locale $message_key] + + # Set upvar level to -1 so that no attempt is made to interpolate variables + # into the string + return [lang::message::lookup $locale $message_key {} {} -1] } ad_proc -public lc_time_fmt { datetime fmt {locale ""} } { - Formats a time for the specified locale. + Formats a time for the specified locale. @param datetime Strictly in the form "YYYY-MM-DD HH24:MI:SS". Formulae for calculating day of week from the Calendar FAQ (http://www.tondering.dk/claus/calendar.html) - @param fmt An ISO 14652 LC_TIME style formatting string: + @param fmt An ISO 14652 LC_TIME style formatting string. The highlighted functions localize automatically based on the user's locale; other strings will use locale-specific text but not necessarily locale-specific formatting.
    
       %a           FDCC-set's abbreviated weekday name.
       %A           FDCC-set's full weekday name.
       %b           FDCC-set's abbreviated month name.
       %B           FDCC-set's full month name.
-      %c           FDCC-set's appropriate date and time
-                   representation.
+      %c           FDCC-set's appropriate date and time
+                   representation.
       %C           Century (a year divided by 100 and truncated to
                    integer) as decimal number (00-99).
       %d           Day of the month as a decimal number (01-31).
@@ -381,10 +383,10 @@
       %M           Minute as a decimal number (00-59).
       %n           A  character.
       %p           FDCC-set's equivalent of either AM or PM.
-      %r           12-hour clock time (01-12) using the AM/PM
-                   notation.
-      %q           Long date without weekday (OpenACS addition to the standard)
-      %Q           Long date with weekday (OpenACS addition to the standard)
+      %r           Hours and minutes using 12-hour clock AM/PM
+                   notation, e.g. '06:12 AM'. 
+      %q           Long date without weekday (OpenACS addition to the standard)
+      %Q           Long date with weekday (OpenACS addition to the standard)
       %S           Seconds as a decimal number (00-61).
       %t           A  character.
       %T           24-hour clock time in the format HH:MM:SS.
@@ -396,12 +398,11 @@
       %w           Weekday as a decimal number (0(Sunday)-6).
       %W           Week number of the year (Monday as the first day of
                    the week) as a decimal number (00-53).
-      %x           FDCC-set's appropriate date representation.
-      %X           FDCC-set's appropriate time representation.
+      %x           FDCC-set's appropriate date representation.
+      %X           FDCC-set's appropriate time representation.
       %y           Year (offset from %C) as a decimal number (00-99).
       %Y           Year with century as a decimal number.
-      %Z           Time-zone name, or no characters if no time zone is
-                   determinable.
+      %Z           The connection's timezone, e.g. 'America/New_York'.
       %%           A  character.
     
See also
man strftime
on a UNIX shell prompt for more of these abbreviations. @@ -480,7 +481,7 @@ set percent_match(I) {[lc_leading_zeros [lc_time_drop_meridian $lc_time_hours] 2]} set percent_match(w) {[expr $lc_time_day_no]} set percent_match(y) {[lc_leading_zeros [expr $lc_time_year%100] 2]} - set percent_match(Z) {} + set percent_match(Z) [lang::conn::timezone] # Straight (localian) lookups set percent_match(a) {[lindex [lc_get -locale $locale "abday"] $lc_time_day_no]}