Index: openacs-4/packages/acs-admin/www/apm/version-i18n-process-2.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-i18n-process-2.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/acs-admin/www/apm/version-i18n-process-2.tcl 13 Oct 2003 11:53:27 -0000 1.10 +++ openacs-4/packages/acs-admin/www/apm/version-i18n-process-2.tcl 13 Oct 2003 14:35:47 -0000 1.11 @@ -11,8 +11,18 @@ {number_of_keys:integer,notnull ""} {replace_p:array ""} {message_keys:array ""} + skip_button:optional } +if { [info exists skip_button] } { + # The user wants to skip the file so remove it from the file and redirect + # to processing the next one + ad_returnredirect "version-i18n-process?[export_vars -url {version_id {files:multiple {[lrange $files 1 end]}} file_action:multiple}]" + ad_script_abort +} + +error hej + # Create the message key list # The list is needed since replace_adp_tags_with_message_tags proc below takes a list of # keys to do replacements with where an empty key means no replacement. Index: openacs-4/packages/acs-admin/www/apm/version-i18n-process.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-i18n-process.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-admin/www/apm/version-i18n-process.adp 10 Oct 2003 16:03:36 -0000 1.6 +++ openacs-4/packages/acs-admin/www/apm/version-i18n-process.adp 13 Oct 2003 14:35:47 -0000 1.7 @@ -29,7 +29,8 @@
- + +
Index: openacs-4/packages/acs-admin/www/apm/version-i18n.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/apm/version-i18n.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-admin/www/apm/version-i18n.tcl 19 Nov 2002 09:09:11 -0000 1.6 +++ openacs-4/packages/acs-admin/www/apm/version-i18n.tcl 13 Oct 2003 14:35:47 -0000 1.7 @@ -9,6 +9,7 @@ version_id:integer,notnull {pre_select_files_p "1"} {show_status_p "0"} + {only_text_p "0"} {file_type adp} } @@ -28,7 +29,7 @@ set relative_path [ad_make_relative_path $file] # Get statistics on number of message tags - if { $show_status_p } { + if { $show_status_p || $only_text_p } { set file_id [open $file r] set file_contents [read $file_id] @@ -58,8 +59,21 @@ set status_string "" } + set add_file_p 1 + # If we are showing adp:s and we are only showing adp:s with texts to translate, check if + # this file has any texts + if { [string equal $file_type "adp"] && $only_text_p } { + if { $number_of_text_snippets == "0" } { + set add_file_p 0 + } + + ns_log Notice "pm debug $relative_path add_file_p=$add_file_p only_text_p=$only_text_p number_of_text_snippets=$number_of_text_snippets" + } + # Checkbox label in first element and value in second - lappend file_option_list [list "$relative_path $status_string" $relative_path] + if { $add_file_p } { + lappend file_option_list [list "$relative_path $status_string" $relative_path] + } if { $pre_select_files_p } { lappend adp_preselect_list $relative_path @@ -107,26 +121,32 @@ } if { $pre_select_files_p } { - set pre_select_filter "Unselect all files" + set pre_select_filter "Unselect all checkboxes" } else { - set pre_select_filter "Select all files" + set pre_select_filter "Select all checkboxes" } if { $show_status_p } { - set status_filter "Hide I18N status of files" + set status_filter "Hide I18N status of files" } else { - set status_filter "Show I18N status of files" + set status_filter "Show I18N status of files" } switch -- $file_type { adp { - set file_type_filter "Show adp files | Show tcl files | Show sql files" + if { $only_text_p } { + set text_only_filter "all adp files / only apd files with translatable text" + } else { + set text_only_filter "all adp files / only apd files with translatable text" + } + + set file_type_filter "Show adp files: $text_only_filter | Show tcl files | Show sql files" } tcl { - set file_type_filter "Show adp files | Show tcl files | Show sql files" + set file_type_filter "Show adp files | Show tcl files | Show sql files" } sql { - set file_type_filter "Show adp files | Show tcl files | Show sql files" + set file_type_filter "Show adp files | Show tcl files | Show sql files" } }