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):
- Testcases:
- util__replace_adp_text_with_message_tags