Note that all template functions output the HTML string. This means you can specify not only the text content, but also various visual indicators, icons, etc.

In case you want to have the different labels for each type of tasks, you can add the conditions into the template functions.

The template will be called for each task that is displayed in the gantt, providing the task object as an argument of the template function. That allows you to inspect the current item and return appropriate content depending of the type or other properties of the task.