lang::util::suggest_key (private)

 lang::util::suggest_key text

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

Suggest a key for given text.

Parameters:
text

Partial Call Graph (max 5 caller/called nodes):
%3 lang::util::convert_to_i18n lang::util::convert_to_i18n (public) lang::util::suggest_key lang::util::suggest_key lang::util::convert_to_i18n->lang::util::suggest_key lang::util::replace_adp_text_with_message_tags lang::util::replace_adp_text_with_message_tags (public) lang::util::replace_adp_text_with_message_tags->lang::util::suggest_key lang::util::replace_temporary_tags_with_lookups lang::util::replace_temporary_tags_with_lookups (public) lang::util::replace_temporary_tags_with_lookups->lang::util::suggest_key

Testcases:
No testcase defined.
Source code:
    regsub -all " " $text "_" key

    # Do not allow . in the key as dot is used as a separator to qualify a key
    # with the package key. The prepending with package key is done at a later
    # stage
    regsub -all {[^-a-zA-Z0-9_]} $key "" key

    # is this key too long?

    if { [string length $key] > 20 } {
        set key "lt_[string range $key 0 20]"
    }
    return $key
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: