WIP: i18n editor, start apple wallet generation

This commit is contained in:
Kara Engelhardt
2026-04-15 18:59:32 +02:00
parent c48d30919f
commit 9064069cf3
10 changed files with 689 additions and 62 deletions

View File

@@ -26,6 +26,9 @@ def get_layout_variables(event):
| {"poweredby": {"label": _("pretix-Logo")}}, # TODO: image upload
}
def get_editor_variables(event):
return {t: {vid: {"label": v.get("label"), "editor_sample": v.get("editor_sample")} for vid,v in vs.items()} for t,vs in get_layout_variables(event).items()}
# TODO: should this even be a list view?
class LayoutListView(EventPermissionRequiredMixin, ListView):
@@ -61,7 +64,7 @@ class LayoutEditorView(DetailView):
context["styles"] = {
style.identifier: style.asdict() for style in self.get_platform_styles()
}
context["variables"] = get_layout_variables(self.request.event)
context["variables"] = get_editor_variables(self.request.event)
context['locales'] = {l: dict(settings.LANGUAGES).get(l, l) for l in self.request.event.settings.get('locales')}
return context