09-03-2021 03:55 AM
In an Alfresco Share javascript file (my-tasks.js) they use this.msg() all over the place. I was wondering where I can find any documentation on this function. More specifically I would want to know how and where the labels are defined (and how to define custom ones).
Some examples:
this.msg("title.editTask"); this.msg("label.taskSummary); this.msg("workflow.no_message");
09-03-2021 05:44 AM
Good morning.
This is something related to i18n. As far as I remember, you'll need to define your own show-custom-message.properties, which contains the definition of your own custom properties, something like e.g.:
alfresco.tutorials.doclib.action.showCustomMessage.text=Showing custom message for {0} and {1} alfresco.tutorials.doclib.action.showCustomMessage.label=Show Message
Then from your development, you can access like this:
fn: function org_alfresco_training_onShowCustomMessage(file) { Alfresco.util.PopupManager.displayMessage( { text: this.msg("alfresco.tutorials.doclib.action.showCustomMessage.text", file.displayName, Alfresco.constants.USERNAME) }); }
I think there's no specific documentation for this but you can find more info of these examples here and here. You can find some documentation here as well.
Cheers,
Cristina.
Explore our Alfresco products with the links below. Use labels to filter content by product module.