lang::util::replace_adp_text_with_message_tags (public)

 lang::util::replace_adp_text_with_message_tags file_name mode [ keys ]

Defined in packages/acs-lang/tcl/lang-util-procs.tcl

Prepares an .adp-file for localization by inserting temporary hash-tags around text strings that looks like unlocalized plain text. Needless to say this is a little shaky so not all plain text is caught and the script may insert hash-tags around stuff that should not be localized. It is conservative though. There are two modes the script can be run in: - report : do *not* write changes to the file but return a report with suggested changes. - write : write changes in the file - it expects a list of keys and will insert them in the order implied by the report - a report is also returned.

Parameters:
file_name - The name of the adp file to do replacements in.
mode - Either report or write.
keys (optional) - A list of keys to use for the texts that may be provided in write mode. If the keys are not provided then autogenerated keys will be used. If a supplied key is the empty string this indicates that the corresponding text should be left untouched.
Returns:
The report is list of two lists: The first being a list of pairs (key, text with context) and the second is a list of suspious looking garbage. In report mode the keys are suggested keys and in write mode the keys are the keys supplied in the keys parameter.
Authors:
Christian Hvid
Peter Marklund
Jeff Davis

Partial Call Graph (max 5 caller/called nodes):
%3 test_util__replace_adp_text_with_message_tags util__replace_adp_text_with_message_tags (test acs-lang) lang::util::replace_adp_text_with_message_tags lang::util::replace_adp_text_with_message_tags test_util__replace_adp_text_with_message_tags->lang::util::replace_adp_text_with_message_tags lang::util::remove_gt_lt lang::util::remove_gt_lt (private) lang::util::replace_adp_text_with_message_tags->lang::util::remove_gt_lt lang::util::suggest_key lang::util::suggest_key (private) lang::util::replace_adp_text_with_message_tags->lang::util::suggest_key template::adp_array_variable_regexp template::adp_array_variable_regexp (public) lang::util::replace_adp_text_with_message_tags->template::adp_array_variable_regexp template::adp_array_variable_regexp_noquote template::adp_array_variable_regexp_noquote (public) lang::util::replace_adp_text_with_message_tags->template::adp_array_variable_regexp_noquote template::adp_variable_regexp template::adp_variable_regexp (public) lang::util::replace_adp_text_with_message_tags->template::adp_variable_regexp packages/acs-admin/www/apm/version-i18n-process-2.tcl packages/acs-admin/ www/apm/version-i18n-process-2.tcl packages/acs-admin/www/apm/version-i18n-process-2.tcl->lang::util::replace_adp_text_with_message_tags packages/acs-admin/www/apm/version-i18n-process.tcl packages/acs-admin/ www/apm/version-i18n-process.tcl packages/acs-admin/www/apm/version-i18n-process.tcl->lang::util::replace_adp_text_with_message_tags packages/acs-admin/www/apm/version-i18n.tcl packages/acs-admin/ www/apm/version-i18n.tcl packages/acs-admin/www/apm/version-i18n.tcl->lang::util::replace_adp_text_with_message_tags

Testcases:
util__replace_adp_text_with_message_tags
[ show source ]
Show another procedure: