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):
- Testcases:
- test_message_register, locale_language_fallback, localize