Index: openacs-4/packages/acs-lang/bin/check-catalog.sh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/bin/check-catalog.sh,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-lang/bin/check-catalog.sh 7 Nov 2002 08:30:38 -0000 1.7 +++ openacs-4/packages/acs-lang/bin/check-catalog.sh 10 Nov 2002 20:07:15 -0000 1.8 @@ -2,7 +2,7 @@ # # Check consistency of the en_US message catalog of the given package. # Checks that the set of keys in the message catalog is identical to the -# set of keys in the adp, info, and tcl files in the package. +# set of keys in the adp, info, sql, and tcl files in the package. # Also checks that the info in the catalog filename matches info in # its xml content (package_key, locale and charset). # @@ -23,10 +23,10 @@ find -iname '*.tcl' | xargs ${script_path}/mygrep \ "(?ms)\[_\s+(?:\[ad_conn locale\]\s+)?\"?${package_key}\.$catalog_key\"?" \ || \ - find -regex '.*\.\(info\|adp\)' | xargs ${script_path}/mygrep \ + find -regex '.*\.\(info\|adp\|sql\|tcl\)' | xargs ${script_path}/mygrep \ "#${package_key}\.$catalog_key#" \ || \ - echo "Warning key $catalog_key in catalog file not found in any adp or tcl file" + echo "Warning key $catalog_key in catalog file not found in any adp, info, sql, or tcl file" done } Index: openacs-4/packages/acs-lang/tcl/lang-util-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-lang/tcl/lang-util-procs.tcl,v diff -u -r1.13 -r1.14 --- openacs-4/packages/acs-lang/tcl/lang-util-procs.tcl 7 Nov 2002 18:02:32 -0000 1.13 +++ openacs-4/packages/acs-lang/tcl/lang-util-procs.tcl 10 Nov 2002 20:07:16 -0000 1.14 @@ -268,19 +268,22 @@ # Replace the message tag with a message key lookup in the file regexp {\.([^.]+)$} $file match file_ending - switch $file_ending { - adp { + switch -regexp -- $file_ending { + {^(adp|sql)$} { regsub [message_tag_regexp] \ $modified_file_contents \ "#${package_key}.${unique_key}#" \ modified_file_contents } - tcl { + {^tcl$} { regsub [message_tag_regexp] \ $modified_file_contents \ "\[_ ${package_key}.${unique_key}\]" \ modified_file_contents } + {.*} { + error "Unknown ending $file_ending of file $file, aborting" + } } }