Index: openacs-4/packages/notifications/tcl/notification-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/notifications/tcl/notification-procs.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/packages/notifications/tcl/notification-procs.tcl 13 Jan 2008 13:49:02 -0000 1.15 +++ openacs-4/packages/notifications/tcl/notification-procs.tcl 13 Sep 2009 23:54:42 -0000 1.16 @@ -50,13 +50,27 @@ } ad_proc -public get_intervals { + {-localized:boolean} {-type_id:required} } { - return a list of intervals that are associated with a given notification type - (not all intervals are available to all notification types). - The fields for each interval is: name, interval_id, n_seconds. + return a list of intervals that are associated with a given notification type + (not all intervals are available to all notification types). + The fields for each interval is: name, interval_id, n_seconds. + If the localized flag is set, then the name of the interval will be localized. } { - return [db_list_of_lists select_intervals {}] + set intervals [db_list_of_lists select_intervals {}] + if { $localized_p } { + # build pretty names for intervals + set intervals_pretty [list] + foreach elm $intervals { + set elm_name [lindex $elm 0] + set elm_id [lindex $elm 1] + lappend intervals_pretty [list [_ notifications.${elm_name}] $elm_id] + } + return $intervals_pretty + } else { + return $intervals + } } ad_proc -public get_delivery_methods {