Class: FluentTools::PoCLI
- Inherits:
-
Thor
- Object
- Thor
- FluentTools::PoCLI
- Defined in:
- lib/fluent_tools/cli.rb
Overview
CLI commands for PO (GNU gettext) conversion
Instance Method Summary collapse
Instance Method Details
#from_fluent(input, output) ⇒ Object
55 56 57 58 59 60 61 62 |
# File 'lib/fluent_tools/cli.rb', line 55 def from_fluent(input, output) command_executor = CommandExecutor.new command_executor.fluent_to_po(input, output, locale: [:locale]) puts "Successfully converted #{input} to #{output}" rescue Error => e puts "Error: #{e.message}" exit 1 end |
#to_fluent(input, output) ⇒ Object
71 72 73 74 75 76 77 78 |
# File 'lib/fluent_tools/cli.rb', line 71 def to_fluent(input, output) command_executor = CommandExecutor.new command_executor.po_to_fluent(input, output) puts "Successfully converted #{input} to #{output}" rescue Error => e puts "Error: #{e.message}" exit 1 end |