Sha256: b21a71901dfac11008102a3091d55447e8cb6c29e4a9c4eedd6b24965ed1f3db
Contents?: true
Size: 674 Bytes
Versions: 10
Compression:
Stored size: 674 Bytes
Contents
# frozen_string_literal: true require "erb" module ReactOnRails module Locales class ToJs < Base def initialize super end private def file_format "js" end def template_translations <<-JS.strip_heredoc export const translations = #{@translations}; JS end def template_default <<-JS.strip_heredoc import { defineMessages } from 'react-intl'; const defaultLocale = \'#{default_locale}\'; const defaultMessages = defineMessages(#{@defaults}); export { defaultMessages, defaultLocale }; JS end end end end
Version data entries
10 entries across 10 versions & 1 rubygems