language: Add translation-domain

This allows you to set the translation domain of a blueprint file.
This commit is contained in:
James Westman 2023-12-12 19:31:07 -06:00
parent c5fa33363f
commit e261180dcc
6 changed files with 72 additions and 2 deletions

View file

@ -12,7 +12,10 @@ class XmlOutput(OutputFormat):
return xml.result
def _emit_ui(self, ui: UI, xml: XmlEmitter):
xml.start_tag("interface")
if domain := ui.translation_domain:
xml.start_tag("interface", domain=domain.domain)
else:
xml.start_tag("interface")
self._emit_gtk_directive(ui.gtk_decl, xml)