require 'mustache'
require 'alephant/views'
require 'hashie'
require 'json'
require 'i18n'

module Alephant::Views
  class Base < Mustache
    attr_accessor :data

    def initialize(data = {})
      @data = Hashie::Mash.new data
    end

    def locale
      :en
    end

    def t(key, params = {})
      I18n.locale = locale
      prefix = /\/([^\/]+)\./.match(template_file)[1]
      I18n.translate("#{prefix}.#{key}", params)
    end

    def self.inherited(subclass)
      ::Alephant::Views.register(subclass)
    end
  end
end


require 'mustache'
require 'alephant/views'
require 'hashie'
require 'json'
require 'i18n'

module Alephant::Views
  class Base < Mustache
    attr_accessor :data

    def initialize(data = {})
      @data = Hashie::Mash.new data
    end

    def locale
      :en
    end

    def t(key, params = {})
      I18n.locale = locale
      prefix = /\/([^\/]+)\.mustache/.match(template_file)[1]
      I18n.translate("#{prefix}.#{key}", params)
    end

    def self.inherited(subclass)
      ::Alephant::Views.register(subclass)
    end
  end
end


Change regex so it only picks up the filename for the template, as in production the path has 'election-data-renderer.jar' in it so 'election-data-renderer' was picked up
Change regex so it only picks up the filename for the template, as in production the path has 'election-data-renderer.jar' in it so 'election-data-renderer' was picked up
