Index: openacs-4/packages/acs-lang/www/admin/message-usage-include.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/www/admin/message-usage-include.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-lang/www/admin/message-usage-include.tcl 7 Aug 2017 23:47:57 -0000 1.7 +++ openacs-4/packages/acs-lang/www/admin/message-usage-include.tcl 29 Dec 2017 11:26:06 -0000 1.8 @@ -7,8 +7,10 @@ set full_key "$package_key.$message_key" -# Since acs-lang.localization- messages use the lc_get proc (that leaves out the acs-lang.localization- part) -# for lookups we need a special regexp for them +# Since acs-lang.localization- messages use the lc_get proc (that +# leaves out the acs-lang.localization- part) for lookups we need a +# special regexp for them + if { [string match "acs-lang.localization-*" $full_key] } { set grepfor "${full_key}|lc_get \[\"\{\]?[string range $message_key [string length "localization-"] end]\[\"\}\]?" } else { @@ -17,15 +19,15 @@ multirow create message_usage file code -with_catch errmsg { - exec find $::acs::rootdir -type f -regex ".*\\.\\(info\\|adp\\|sql\\|tcl\\)" -follow | xargs egrep "$grepfor" 2>/dev/null -} { - #error "find $::acs::rootdir -type f -regex \".*\\.\\(info\\|adp\\|sql\\|tcl\\)\" -follow | xargs egrep \"${full_key_pattern}\"" +ad_try { + exec find $::acs::rootdir -type f -regex ".*\\.\\(info\\|adp\\|sql\\|tcl\\)" -follow \ + | xargs egrep "$grepfor" 2>/dev/null - foreach line [split $errmsg "\n"] { +} on error {errorMsg} { + foreach line [split $errorMsg "\n"] { if { [string first "child process exited abnormally" $line] == -1 } { set colon [string first ":" $line] - + multirow append message_usage \ [string range $line 0 $colon-1] \ [string trim [string range $line $colon+1 end]]