class Locomotive::Wagon::SyncTranslationsCommand
Private Instance Methods
translations_filepath()
click to toggle source
# File lib/locomotive/wagon/commands/sync_sub_commands/sync_translations_command.rb, line 15 def translations_filepath File.join('data', env.to_s, 'translations.json') end
write_translations(translations)
click to toggle source
# File lib/locomotive/wagon/commands/sync_sub_commands/sync_translations_command.rb, line 9 def write_translations(translations) write_to_file(translations_filepath, JSON.neat_generate(translations, { sort: true, short: false, padding: 1, object_padding: 1, after_colon: 1, after_comma: 1, wrap: 20, aligned: false })) end