--- a/src/pyams_default_theme/component/paragraph/contact.py Tue Nov 20 15:40:17 2018 +0100
+++ b/src/pyams_default_theme/component/paragraph/contact.py Tue Nov 20 16:08:56 2018 +0100
@@ -21,6 +21,7 @@
from pyams_content.features.renderer.interfaces import IContentRenderer
from pyams_default_theme.component.paragraph.interfaces.contact import IContactParagraphDefaultRendererSettings
from pyams_default_theme.features.renderer import BaseContentRenderer
+from pyams_i18n.interfaces import II18n
from pyams_skin.layer import IPyAMSLayer
from pyams_template.template import template_config
from pyams_utils.adapter import adapter_config, get_annotation_adapter
@@ -87,3 +88,10 @@
else:
context_attrs = ('name', 'photo', 'company', 'address', 'phone_number', 'contact_email')
i18n_context_attrs = ('title', 'charge',)
+
+ @property
+ def button_label(self):
+ label = II18n(self.settings).query_attribute('button_label', request=self.request)
+ if not label:
+ label = self.request.localizer.translate(_("contact-button-label", default="Contact"))
+ return label