I'm revisiting some old work for the live-build package in Debian, right now specifically looking at a patch relating to grub2 theming. The menu includes submenus and text of title-text and a label defined in the theme changes per menu/submenu. The way I tackled this at the time was to simply create a copy of the entire theme file for each menu/submenu with altered text and switching the theme used for each.
This obviously is not ideal; It would be much better to have one theme file and be able to set the text property as appropriate as a part of defining each menu. Possibly even enabling/disabling different labels. I am lost as to how much of this is really possible though. Consulting the grub docs ([1]), section 7.3.6 describes an `id` property that can be assigned to each component (such as a label) and the concept of the "GUI component tree". It mentions that "The ID can be used by scripts to refer to various components in the GUI component tree", but fails to demonstrate anywhere how on earth one can actually do this and so far I have failed to find anything online about it... [1]: https://www.gnu.org/software/grub/manual/grub/grub.html
