Plantillas

This commit is contained in:
Jesús Pavón Abián
2026-02-01 21:10:46 +01:00
parent b14bff2d0e
commit 93d37ab3e8
5 changed files with 345 additions and 157 deletions
+14
View File
@@ -15,6 +15,15 @@ class AccountSettingsDialog(wx.Dialog):
self.ask_before_boost.SetValue(bool(ask_before_boost))
sizer.Add(self.ask_before_boost, 0, wx.ALL, 8)
templates_box = wx.StaticBoxSizer(wx.StaticBox(panel, wx.ID_ANY, _("Templates")), wx.VERTICAL)
self.template_post = wx.Button(panel, wx.ID_ANY, _("Edit template for posts"))
self.template_person = wx.Button(panel, wx.ID_ANY, _("Edit template for persons"))
self.template_notification = wx.Button(panel, wx.ID_ANY, _("Edit template for notifications"))
templates_box.Add(self.template_post, 0, wx.ALL, 4)
templates_box.Add(self.template_person, 0, wx.ALL, 4)
templates_box.Add(self.template_notification, 0, wx.ALL, 4)
sizer.Add(templates_box, 0, wx.EXPAND | wx.ALL, 8)
# Buttons
btn_sizer = self.CreateSeparatedButtonSizer(wx.OK | wx.CANCEL)
@@ -31,3 +40,8 @@ class AccountSettingsDialog(wx.Dialog):
"ask_before_boost": self.ask_before_boost.GetValue(),
}
def set_template_labels(self, post_template, person_template, notification_template):
self.template_post.SetLabel(_("Edit template for posts. Current template: {}").format(post_template))
self.template_person.SetLabel(_("Edit template for persons. Current template: {}").format(person_template))
self.template_notification.SetLabel(_("Edit template for notifications. Current template: {}").format(notification_template))