lang::util::escape_message_keys (public)

 lang::util::escape_message_keys text

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

Protect literal message-key references from localization. Keep the delimiters so unescape_message_keys can restore the original text after the last localization pass.

Parameters:
text (required)
Text containing literal message-key references.
Returns:
Text with message-key references protected.
See Also:

Partial Call Graph (max 5 caller/called nodes):
Class ::xowiki::formfield::FormField Class ::xowiki::formfield::FormField (public) lang::util::escape_message_keys lang::util::escape_message_keys Class ::xowiki::formfield::FormField->lang::util::escape_message_keys packages/bug-tracker/www/bug.tcl packages/bug-tracker/ www/bug.tcl packages/bug-tracker/www/bug.tcl->lang::util::escape_message_keys xo::escape_message_keys xo::escape_message_keys (public, deprecated) xo::escape_message_keys->lang::util::escape_message_keys lang::util::get_hash_indices lang::util::get_hash_indices (public) lang::util::escape_message_keys->lang::util::get_hash_indices

Testcases:
No testcase defined.
Source code:
    # A closing hash can also start a second reference. Repeat until
    # none of the remaining hashes form a message key.
    while {[llength [set matches [get_hash_indices $text]]]} {
        foreach match [lreverse $matches] {
            set last [lindex $match 1]
            set text [string replace $text $last $last "\x01#"]
        }
    }
    return $text
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-lang/tcl/lang-util-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: