lang::message::register (public)

 lang::message::register [ -update_sync ] \
    [ -upgrade_status upgrade_status ] [ -conflict ] \
    [ -comment comment ] [ -object_id object_id ] locale package_key \
    message_key message

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

Registers a message for a given locale and package. Inserts the message key into the database if it doesn't already exists. Inserts the message itself in the given locale into the database if it doesn't exist and updates it if it does. Also updates the cache with the message.

Switches:
-update_sync (boolean) (optional)
If this switch is provided the sync_time of the message will be set to current time. The sync time for a message should only be not null when we know that message in catalog file and db are identical (in sync). This message is then used as a merge base for message catalog upgrades. For more info, see the lang::catalog::upgrade proc.
-upgrade_status (defaults to "no_upgrade") (optional)
Set the upgrade status of the new message to "added", "updated", "deleted". Defaults to "no_upgrade".
-conflict (boolean) (optional)
Set this switch if the upgrade represents a conflict between changes made in the database and in catalog files.
-comment (optional)
-object_id (optional)
Bind this message key to an acs_object, so that upon deletion, the message key will be removed as well.
Parameters:
locale - Locale or language of the message. If a language is supplied, the default locale for the language is looked up.
package_key - The package key of the package that the message belongs to.
message_key - The key that identifies the message within the package.
message - The message text
Authors:
Jeff Davis
Peter Marklund
Bruno Mattarollo <bruno.mattarollo@ams.greenpeace.org>
Christian Hvid

See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 test_locale_language_fallback locale_language_fallback (test acs-lang) lang::message::register lang::message::register test_locale_language_fallback->lang::message::register test_localize localize (test acs-lang) test_localize->lang::message::register test_test_message_register test_message_register (test acs-lang) test_test_message_register->lang::message::register ad_conn ad_conn (public) lang::message::register->ad_conn db_0or1row db_0or1row (public) lang::message::register->db_0or1row db_boolean db_boolean (public) lang::message::register->db_boolean db_dml db_dml (public) lang::message::register->db_dml db_map db_map (public) lang::message::register->db_map _mr _mr (private, deprecated) _mr->lang::message::register lang::catalog::import_messages lang::catalog::import_messages (private) lang::catalog::import_messages->lang::message::register lang::catalog::translate lang::catalog::translate (private) lang::catalog::translate->lang::message::register lang::message::revert lang::message::revert (private) lang::message::revert->lang::message::register lang::test::execute_upgrade lang::test::execute_upgrade (private) lang::test::execute_upgrade->lang::message::register

Testcases:
test_message_register, locale_language_fallback, localize
[ show source ]
Show another procedure: