I figured it out, it's actually pretty simple. There's just one line you need to add and one you need to change in the existing code. Let me know if this works for you!
for i in visible_items:
$ color = i.kwargs.get("color", None)
$ hover = i.kwargs.get("hover", None)
$ tooltip_text = i.kwargs.get("tooltip_text", None) # Optional
## Add this line
$ caption = "{s}" + i.caption + "{/s}"
## Modify this line
textbutton (caption if not i.kwargs.get("sensitive", True) else i.caption):
action i.action
sensitive i.kwargs.get("sensitive", True)
...