Sha256: 771ff4a015ee14c2e1cf13fcb5acbfd21d55e799fe868f8ad3ea896223d4f7fa
Contents?: true
Size: 1.03 KB
Versions: 7
Compression:
Stored size: 1.03 KB
Contents
# frozen_string_literal: true module Decidim module TermCustomizer module Context # A context object resolves and stores the translation context for # different application contexts. Contexts can be e.g. # - Controller context, which is used to display translations in # controller messages and the views. # - Job context, which is used to display messages within jobs, mainly # when sending emails. # # The initialization method gets the data for the context which is used # to resolve the translation context objects (organization, participatory # space and component). These are then used to load the correct # translations for each context based on the translation set constraints. class Base attr_reader :organization, :space, :component def initialize(data) @data = data # Implement the resolve! method in the sub-classes resolve! end protected attr_reader :data end end end end
Version data entries
7 entries across 7 versions & 1 rubygems