Sha256: 8b8aabba91dee168d9c62dd89b0e39e82a3258492cab9ca1fcd78b60215a51c4

Contents?: true

Size: 475 Bytes

Versions: 28

Compression:

Stored size: 475 Bytes

Contents

module Locomotive::Wagon

  class PullTranslationsCommand < PullBaseCommand

    def _pull
      translations = api_client.translations.all.inject({}) do |hash, translation|
        hash[translation.key] = translation.values
        hash
      end

      unless translations.empty?
        write_to_file(translations_filepath, dump(translations))
      end
    end

    private

    def translations_filepath
      File.join('config', 'translations.yml')
    end

  end

end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
locomotivecms_wagon-2.4.1 lib/locomotive/wagon/commands/pull_sub_commands/pull_translations_command.rb
locomotivecms_wagon-2.4.0 lib/locomotive/wagon/commands/pull_sub_commands/pull_translations_command.rb
locomotivecms_wagon-2.4.0.rc2 lib/locomotive/wagon/commands/pull_sub_commands/pull_translations_command.rb
locomotivecms_wagon-2.4.0.rc1 lib/locomotive/wagon/commands/pull_sub_commands/pull_translations_command.rb
locomotivecms_wagon-2.3.0 lib/locomotive/wagon/commands/pull_sub_commands/pull_translations_command.rb
locomotivecms_wagon-2.3.0.rc1 lib/locomotive/wagon/commands/pull_sub_commands/pull_translations_command.rb
locomotivecms_wagon-2.2.0 lib/locomotive/wagon/commands/pull_sub_commands/pull_translations_command.rb
locomotivecms_wagon-2.2.0.rc3 lib/locomotive/wagon/commands/pull_sub_commands/pull_translations_command.rb
locomotivecms_wagon-2.2.0.rc2 lib/locomotive/wagon/commands/pull_sub_commands/pull_translations_command.rb
locomotivecms_wagon-2.2.0.rc1 lib/locomotive/wagon/commands/pull_sub_commands/pull_translations_command.rb
locomotivecms_wagon-2.2.0.beta1 lib/locomotive/wagon/commands/pull_sub_commands/pull_translations_command.rb
locomotivecms_wagon-2.1.1 lib/locomotive/wagon/commands/pull_sub_commands/pull_translations_command.rb
locomotivecms_wagon-2.1.0 lib/locomotive/wagon/commands/pull_sub_commands/pull_translations_command.rb
locomotivecms_wagon-2.1.0.rc5 lib/locomotive/wagon/commands/pull_sub_commands/pull_translations_command.rb
locomotivecms_wagon-2.1.0.rc4 lib/locomotive/wagon/commands/pull_sub_commands/pull_translations_command.rb
locomotivecms_wagon-2.1.0.rc3 lib/locomotive/wagon/commands/pull_sub_commands/pull_translations_command.rb
locomotivecms_wagon-2.0.1 lib/locomotive/wagon/commands/pull_sub_commands/pull_translations_command.rb
locomotivecms_wagon-2.0.0 lib/locomotive/wagon/commands/pull_sub_commands/pull_translations_command.rb
locomotivecms_wagon-2.0.0.rc8 lib/locomotive/wagon/commands/pull_sub_commands/pull_translations_command.rb
locomotivecms_wagon-2.0.0.rc7 lib/locomotive/wagon/commands/pull_sub_commands/pull_translations_command.rb