Sha256: b52c28e8b122d8f80c3aac7dea7342db703adab096f8373e0701645366449607
Contents?: true
Size: 752 Bytes
Versions: 16
Compression:
Stored size: 752 Bytes
Contents
# frozen_string_literal: true module Decidim module Plans module DiffRenderer class Content < Base protected def i18n_scope "activemodel.attributes.plan" end # Lists which attributes will be diffable and how # they should be rendered. def attribute_types { body: :i18n } end def generate_label(_attribute) translated_attribute(version.item.section.body) end def generate_i18n_label(_attribute, locale) label = translated_attribute(version.item.section.body, locale) return label if display_locale "#{label} (#{locale_name(locale)})" end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems