Project

General

Profile

Download (811 Bytes) Statistics
| Branch: | Tag: | Revision:

hammer-cli-csv / lib / hammer_cli_csv / i18n.rb @ f92e695a

1
require 'hammer_cli/i18n'
2

    
3
module HammerCLICsv
4
  module I18n
5

    
6
    class LocaleDomain < HammerCLI::I18n::LocaleDomain
7

    
8
      def translated_files
9
        Dir.glob(File.join(File.dirname(__FILE__), '../**/*.rb'))
10
      end
11

    
12
      def locale_dir
13
        File.join(File.dirname(__FILE__), '../../locale')
14
      end
15

    
16
      def domain_name
17
        'hammer-cli-csv'
18
      end
19
    end
20

    
21
  end
22
end
23

    
24
HammerCLI::I18n.add_domain(HammerCLICsv::I18n::LocaleDomain.new)
25

    
26
FastGettext.add_text_domain('hammer-cli-csv',
27
                            :path => File.expand_path("../../../locale", __FILE__),
28
                            :type => :po,
29
                            :ignore_fuzzy => true,
30
                            :report_warning => false
31
                           )
32
FastGettext.default_text_domain = 'hammer-cli-csv'