pirka 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd8b07fbbcff6ffb0afa5824c590651aac00cd8a2b9665f725a7214f5d88439d
4
- data.tar.gz: 900bf63e81f78901539030985876d186e8f730255fe22cd2c9804fe0604742b0
3
+ metadata.gz: e6a0fabb1219268964150de0c8cf2528693ccb71cf19ec58fd683b8d7184b767
4
+ data.tar.gz: 686cc35fcfc675d535837e2bf3cf884400c854104e1803d5b9fb6544d90b486c
5
5
  SHA512:
6
- metadata.gz: 516bc23835775ba8124bf4719d740a638f5880dabc2674db59181a549f4d0ebb51beef1f5c47c556327b441f8a1f14cfddba9a706c659179d93702ba56577020
7
- data.tar.gz: 8d8f556541e07db4c73dcf27a4330b78d22084302da1624acc07482c90b31916e318cef487e0b67d7f45e19913c6547959a6ebb73b1a12ed195ae5ac43118e3d
6
+ metadata.gz: f082a0ecff1a77e38bd3b61d1ba3298e7bcdab98000b70ac860c781279e8a79b0e34d8ec3777d3e4e27add832b2143419e1781a518e82763687b7792a0980822
7
+ data.tar.gz: 71f2dc6e6c8fde89a41a3d46c9350626cf18d2ed4b3035dc43e061e357ca0e5227ec5770d1d16ffeb589ec15c9fe4f31a5922f8c7177c333c86fe7387b433752
data/.gitignore CHANGED
@@ -6,3 +6,7 @@
6
6
  /vendor/cache/*.gem
7
7
  /gems/
8
8
  /coverage/
9
+ *.pot
10
+ *.mo
11
+ *.edit.po
12
+ *.po.time_stamp
@@ -1,4 +1,9 @@
1
- === 0.1.6 / Unreleased
1
+ === 0.1.7 / 2020-01-13
2
+
3
+ * Internationalize app
4
+ * Localize for Japanese
5
+
6
+ === 0.1.6 / 2020-01-01
2
7
 
3
8
  * Don't check `git` command existence by `which` command because Windows has `where` instead of `which`
4
9
 
data/Rakefile CHANGED
@@ -24,5 +24,11 @@ end
24
24
 
25
25
  require 'yard'
26
26
  require 'asciidoctor'
27
- YARD::Rake::YardocTask.new
27
+ YARD::Rake::YardocTask.new
28
28
  task :doc => :yard
29
+
30
+ require "rubygems/specification"
31
+ require "gettext/tools/task"
32
+ GetText::Tools::Task.define do |t|
33
+ t.spec = Gem::Specification.load("pirka.gemspec")
34
+ end
data/app.rb CHANGED
@@ -1,12 +1,15 @@
1
1
  require "optparse"
2
- require "pirka/version"
3
- require "pirka/config"
2
+ require "pirka"
4
3
 
5
4
  gem "epub-parser", ">= #{Pirka::EPUB_PARSER_VERSION}"
6
5
 
7
6
  module Pirka
8
7
  class App
9
- DESCRIPTION = "Pirka highlights source code syntax in EPUB files"
8
+ include GetText
9
+
10
+ bindtextdomain TEXT_DOMAIN
11
+
12
+ DESCRIPTION = _("Pirka highlights source code syntax in EPUB files")
10
13
  APPS = {}
11
14
 
12
15
  def initialize
@@ -20,6 +23,12 @@ module Pirka
20
23
  parse_options! argv
21
24
  app = APPS[argv.first] ? APPS[argv.shift] : Highlight
22
25
  app.new(@config).run(argv)
26
+ rescue => error
27
+ if $DEBUG
28
+ abort
29
+ else
30
+ abort error.message
31
+ end
23
32
  end
24
33
 
25
34
  private
@@ -30,32 +39,35 @@ module Pirka
30
39
  parser = OptionParser.new {|opt|
31
40
  opt.version = Pirka::VERSION
32
41
 
33
- opt.banner = <<EOB
34
- #{DESCRIPTION}
42
+ opt.banner = <<EOB % {description: DESCRIPTION, program_name: opt.program_name}
43
+ %{description}
35
44
 
36
- Usage: #{opt.program_name} [global options] [<command>] [options]
45
+ Usage: %{program_name} [global options] [<command>] [options]
37
46
  EOB
38
47
 
39
48
  opt.separator ""
40
- opt.separator "Global options:"
41
- opt.on "-c", "--config=FILE", "Config file. Defaults to #{Config.filepath}", Pathname do |path|
49
+ opt.separator _("Global options:")
50
+ opt.on "-c", "--config=FILE", _("Config file. Defaults to %{config_path}") % {config_path: Config.filepath}, Pathname do |path|
42
51
  config_path = path
43
52
  end
44
- opt.on "-s", "--data-home=DIRECTORY", "Directory to *SAVE* library data", Pathname do |path|
53
+ opt.on "-s", "--data-home=DIRECTORY", _("Directory to *SAVE* library data"), Pathname do |path|
45
54
  @tmp_opts["data_home"] = path
46
55
  end
47
- opt.on "-d", "--directory=DIRECTORY", "Directory to *SEARCH* library data.", "Specify multiple times to add multiple directories.", Pathname do |path|
56
+ opt.on "-d", "--directory=DIRECTORY", _("Directory to *SEARCH* library data."), _("Specify multiple times to add multiple directories."), Pathname do |path|
48
57
  @tmp_opts["additional_directories"] << path
49
58
  end
59
+ opt.on "--debug", _("Set debugging flag") do
60
+ $DEBUG = true
61
+ end
50
62
 
51
63
  opt.separator ""
52
- opt.separator "Commands:"
64
+ opt.separator _("Commands:")
53
65
  width = APPS.keys.collect(&:length).max
54
66
  APPS.each_pair do |command, app|
55
67
  opt.separator opt.summary_indent + command.ljust(width) +
56
68
  opt.summary_indent * 2 + app::DESCRIPTION
57
69
  end
58
- opt.separator "If command is ommitted, highlight is used with no option"
70
+ opt.separator _("If command is ommitted, highlight is used with no option")
59
71
  }
60
72
  parser.order! argv
61
73
  @config = config_path.file? ? Config.load_file(config_path) : Config.new
@@ -6,18 +6,18 @@ require "epub/searcher"
6
6
  require "rouge"
7
7
  require "rouge/lexers/fluentd"
8
8
  require "colored"
9
- require "pirka/library"
10
9
  require_relative "subcommand"
11
10
 
12
11
  module Pirka
13
12
  class App
14
13
  class Detect
15
14
  PROGRAM_NAME = "detect"
16
- DESCRIPTION = "Detects source code from EPUB file and generate library file"
17
- ARGS = %w[EPUB_FILE]
18
15
 
19
16
  include Subcommand
20
17
 
18
+ DESCRIPTION = _("Detects source code from EPUB file and generate library file")
19
+ ARGS = %w[EPUB_FILE]
20
+
21
21
  SELECTOR = "code"
22
22
 
23
23
  def initialize(config)
@@ -44,10 +44,10 @@ module Pirka
44
44
  option
45
45
  }.join(" ")
46
46
  @commands = {
47
- "s" => "skip",
48
- "q" => "quit",
49
- "c" => "show code",
50
- "o" => "show options"
47
+ "s" => _("skip"),
48
+ "q" => _("quit"),
49
+ "c" => _("show code"),
50
+ "o" => _("show options")
51
51
  }.collect {|(key, command)|
52
52
  "#{key})".bold << " " << command
53
53
  }.join(" ")
@@ -57,7 +57,7 @@ module Pirka
57
57
  parse_options! argv
58
58
 
59
59
  epub_path = argv.shift
60
- raise ArgumentError, 'Specify EPUB file' unless epub_path
60
+ raise ArgumentError, _('Specify EPUB file') unless epub_path
61
61
 
62
62
  begin
63
63
  # @todo Make this optional
@@ -66,7 +66,7 @@ module Pirka
66
66
  rescue LoadError
67
67
  end
68
68
  epub = EPUB::Parser.parse(epub_path)
69
- $stderr.puts "Detecting code from \"#{epub.title}\""
69
+ $stderr.puts _("Detecting code from \"%{title}\"").encode(__ENCODING__) % {title: epub.title}
70
70
 
71
71
  codelist = {}
72
72
  library = Library.new
@@ -118,9 +118,8 @@ module Pirka
118
118
  })
119
119
  end
120
120
  end
121
-
122
121
  path = library.save(@library_path)
123
- $stderr.puts "Library file was saved to:"
122
+ $stderr.puts _("Library file was saved to:")
124
123
  $stdout.puts path
125
124
  end
126
125
  end
@@ -133,10 +132,10 @@ module Pirka
133
132
  opt.on "-i", "--interactive" do
134
133
  @interactive = true
135
134
  end
136
- opt.on "-o", "--output=FILE", "File to save library data", Pathname do |path|
135
+ opt.on "-o", "--output=FILE", _("File to save library data"), Pathname do |path|
137
136
  @library_path = path
138
137
  end
139
- opt.on "-s", "--selector=SELECTOR", "CSS selector to detect source code element. Defaults to #{SELECTOR.dump}." do |selector|
138
+ opt.on "-s", "--selector=SELECTOR", _("CSS selector to detect source code element. Defaults to %{selector}.") % {selector: SELECTOR.dump} do |selector|
140
139
  @selector = selector
141
140
  end
142
141
  end
@@ -163,7 +162,7 @@ module Pirka
163
162
  end
164
163
 
165
164
  def ask
166
- $stderr.print "Which language? "
165
+ $stderr.print _("Which language? ")
167
166
  $stdin.gets.chomp
168
167
  end
169
168
  end
@@ -5,19 +5,18 @@ require "epub/parser"
5
5
  require "epub/maker"
6
6
  require "rouge"
7
7
  require "rouge/lexers/fluentd"
8
- require "pirka/library"
9
- require "pirka/highlighter"
10
8
  require_relative "subcommand"
11
9
 
12
10
  module Pirka
13
11
  class App
14
12
  class Highlight
15
13
  PROGRAM_NAME = "highlight"
16
- DESCRIPTION = "Highlights source code in EPUB file"
17
- ARGS = %w[EPUB_FILE]
18
14
 
19
15
  include Subcommand
20
16
 
17
+ DESCRIPTION = _("Highlights source code in EPUB file")
18
+ ARGS = %w[EPUB_FILE]
19
+
21
20
  DUMMY_ORIGIN = Addressable::URI.parse("file:///")
22
21
  CSS_PATH = "pirka/style.css" # @todo Avoid conflict with existing item by other than Pirka
23
22
  CSS_CLASS_NAME = "pirka"
@@ -64,7 +63,7 @@ module Pirka
64
63
 
65
64
  # @todo Make this optional
66
65
  def prepare_epub(path)
67
- raise ArgumentError, 'Specify EPUB file' unless path
66
+ raise ArgumentError, _('Specify EPUB file') unless path
68
67
  begin
69
68
  require 'epub/maker/ocf/physical_container/zipruby'
70
69
  EPUB::OCF::PhysicalContainer.adapter = :Zipruby
@@ -77,7 +76,17 @@ module Pirka
77
76
  def find_library(epub)
78
77
  library = @library_path ? Library.load_file(@library_path) :
79
78
  Library.find_by_release_identifier(epub.release_identifier)
80
- raise RuntimeError, "Cannot find code list #{Library.filename(epub.release_identifier)} for #{epub.release_identifier}(#{epub.epub_file}) in any directory of #{Library.directories.join(", ")}" unless library
79
+ unless library
80
+ message_template = _("Cannot find code list %{library_file} for %{release_identifier}(%{epub_file}) in any directory of:\n%{search_dirs}")
81
+ .encode(__ENCODING__) # Needed for Windows non-ascii environment such as code page 932 a.k.a Windiws-31J a Shift_JIS variant encoding
82
+ message = message_template % {
83
+ library_file: Library.filename(epub.release_identifier),
84
+ release_identifier: epub.release_identifier,
85
+ epub_file: epub.epub_file,
86
+ search_dirs: Library.directories.collect {|path| "- #{path}"}.join("\n")
87
+ }
88
+ raise RuntimeError, message
89
+ end
81
90
  library
82
91
  end
83
92
 
@@ -100,7 +109,7 @@ module Pirka
100
109
  library.reverse_each do |(cfi, data)|
101
110
  lang = data["language"]
102
111
  unless lang
103
- warn "Language for #{cfi} is not detected"
112
+ warn _("Language for %{cfi} is not detected") % {cfi: cfi}
104
113
  next
105
114
  end
106
115
  itemref, elem, _ = EPUB::Searcher.search_by_cfi(epub, cfi)
@@ -169,7 +178,7 @@ module Pirka
169
178
  def parse_options!(argv)
170
179
  super do |opt|
171
180
  opt.separator ""
172
- opt.on "-l", "--library=FILE", "library file", Pathname do |path|
181
+ opt.on "-l", "--library=FILE", _("Library file"), Pathname do |path|
173
182
  @library_path = path
174
183
  end
175
184
  end
data/app/lib.rb CHANGED
@@ -1,13 +1,12 @@
1
- require "pirka/library"
2
-
3
1
  module Pirka
4
2
  class App
5
3
  class Lib
6
4
  PROGRAM_NAME = "lib"
7
- DESCRIPTION = "Show library infomation"
8
5
 
9
6
  include Subcommand
10
7
 
8
+ DESCRIPTION = _("Show library infomation")
9
+
11
10
  def run(argv)
12
11
  # show all
13
12
  # show remote repos
@@ -38,14 +37,7 @@ module Pirka
38
37
 
39
38
  def show_info(path)
40
39
  $stdout.puts Library.load_file(path).metadata.to_yaml
41
- $stdout.puts "library: #{path}"
42
- end
43
-
44
- private
45
-
46
- def parse_options!(argv)
47
- super do |opt|
48
- end
40
+ $stdout.puts "library: %{path}" % {path: path}
49
41
  end
50
42
  end
51
43
  end
@@ -1,9 +1,16 @@
1
+ require "pirka"
2
+
1
3
  module Pirka
2
4
  class App
3
5
  module Subcommand
6
+ include GetText
7
+
8
+ bindtextdomain TEXT_DOMAIN
9
+
4
10
  class << self
5
11
  def included(base)
6
12
  APPS[base::PROGRAM_NAME] = base
13
+ base.extend GetText
7
14
  end
8
15
  end
9
16
 
@@ -17,14 +24,14 @@ module Pirka
17
24
  # @todo Consider the case the subcommand has no option
18
25
  def parse_options!(argv)
19
26
  parser = OptionParser.new {|opt|
20
- usage = "Usage: #{opt.program_name} [options] #{self.class::PROGRAM_NAME}"
27
+ usage = "Usage: %{program_name} [options] %{subcommand_name}" % {program_name: opt.program_name, subcommand_name: self.class::PROGRAM_NAME}
21
28
  usage << " " << self.class::ARGS.join(" ") if self.class.const_defined?(:ARGS)
22
29
 
23
- opt.program_name = "#{opt.program_name} [global options] #{self.class::PROGRAM_NAME}"
24
- opt.banner = <<EOB
25
- #{self.class::DESCRIPTION}
30
+ opt.program_name = "%{program_name} [options] %{subcommand_name}" % {program_name: opt.program_name, subcommand_name: self.class::PROGRAM_NAME}
31
+ opt.banner = <<EOB % {description: self.class::DESCRIPTION, usage: usage}
32
+ %{description}
26
33
 
27
- #{usage}
34
+ %{usage}
28
35
  EOB
29
36
  yield opt if block_given?
30
37
  }
@@ -1,17 +1,17 @@
1
1
  require "English"
2
2
  require "pathname"
3
3
  require "uri"
4
- require "pirka/library"
5
4
  require_relative "subcommand"
6
5
 
7
6
  module Pirka
8
7
  class App
9
8
  class Update
10
9
  PROGRAM_NAME = "update"
11
- DESCRIPTION = "Update library files by remote files"
12
10
 
13
11
  include Subcommand
14
12
 
13
+ DESCRIPTION = _("Update library files by remote files")
14
+
15
15
  URI = ::URI.parse("https://gitlab.com/KitaitiMakoto/pirka-library.git")
16
16
 
17
17
  def run(argv)
@@ -21,15 +21,15 @@ module Pirka
21
21
  update_repository(URI, dir)
22
22
  else
23
23
  clone_repository(URI, dir)
24
- $stderr.puts "Library was cloned to:"
24
+ $stderr.puts _("Library was cloned to:")
25
25
  $stdout.puts dir
26
26
  @config.additional_directories << dir
27
27
  @config.library_repositories << URI
28
28
  begin
29
29
  @config.save
30
- $stderr.puts "and added to config file #{@config.filepath.to_s.dump}"
30
+ $stderr.puts _("and added to config file %{config_file}") % {config_file: @config.filepath.to_s.dump}
31
31
  rescue Errno::EACCESS => error
32
- $stderr.puts "Couldn't save config file to #{@config.filepath.to_s.dump}"
32
+ $stderr.puts _("Couldn't save config file to %{config_file}") % {config_file: @config.filepath.to_s.dump}
33
33
  $stderr.puts error
34
34
  end
35
35
  end
@@ -52,9 +52,9 @@ module Pirka
52
52
  end
53
53
 
54
54
  def run_command(command)
55
- $stderr.puts "Executing \`#{command}\`"
55
+ $stderr.puts _("Executing `%{command}`") % {command: command}
56
56
  output = `#{command}`
57
- raise "Failed to execute \`#{command}\`" unless $CHILD_STATUS.success?
57
+ raise _("Failed to execute `%{command}`") % {command: command} unless $CHILD_STATUS.success?
58
58
  output
59
59
  end
60
60
  end
@@ -1 +1,10 @@
1
1
  require 'pirka/version'
2
+ require "gettext"
3
+
4
+ module Pirka
5
+ TEXT_DOMAIN = Gem::Specification.load(File.join(__dir__, "../pirka.gemspec")).name
6
+ end
7
+
8
+ require "pirka/library"
9
+ require "pirka/config"
10
+ require "pirka/highlighter"
@@ -3,6 +3,10 @@ require "rouge/lexers/fluentd"
3
3
 
4
4
  module Pirka
5
5
  class Highlighter
6
+ include GetText
7
+
8
+ bindtextdomain TEXT_DOMAIN
9
+
6
10
  def markup(element, lang)
7
11
  # noop
8
12
  end
@@ -20,7 +24,7 @@ module Pirka
20
24
  @highlighter.markup(element, lang)
21
25
  lexer = ::Rouge::Lexer.find(lang) || ::Rouge::Lexer.guess(source: element.content)
22
26
  unless lexer
23
- warn "Cannot find lexer for #{lang}"
27
+ warn _("Cannot find lexer for %{lang}") % {lang: lang}
24
28
  return
25
29
  end
26
30
  element.inner_html = @formatter.format(lexer.lex(element.content)) # @todo Consider the case `element` has descendants
@@ -50,7 +54,7 @@ module Pirka
50
54
  def initialize(highlighter, params = {})
51
55
  @highlighter = highlighter
52
56
  @selector = params["selector"]
53
- raise "selector param not specified" unless @selector
57
+ raise _("selector param not specified") unless @selector
54
58
  end
55
59
 
56
60
  def markup(element, lang)
@@ -10,6 +10,10 @@ module Pirka
10
10
  #
11
11
  # @see https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
12
12
  class Library
13
+ include GetText
14
+
15
+ bindtextdomain TEXT_DOMAIN
16
+
13
17
  include Enumerable
14
18
 
15
19
  DIR_NAME = "pirka/local"
@@ -105,7 +109,7 @@ module Pirka
105
109
  end
106
110
 
107
111
  def filename
108
- raise "Release Identifier is not set" unless @metadata["Release Identifier"]
112
+ raise _("Release Identifier is not set") unless @metadata["Release Identifier"]
109
113
  self.class.filename(@metadata["Release Identifier"])
110
114
  end
111
115
 
@@ -17,6 +17,6 @@
17
17
 
18
18
  module Pirka
19
19
  # pirka version
20
- VERSION = "0.1.6"
21
- EPUB_PARSER_VERSION = "0.3.2"
20
+ VERSION = "0.1.7"
21
+ EPUB_PARSER_VERSION = "0.4.3"
22
22
  end
@@ -15,6 +15,7 @@ Gem::Specification.new do |gem|
15
15
  gem.homepage = "https://gitlab.com/KitaitiMakoto/pirka"
16
16
 
17
17
  gem.files = `git ls-files`.split($/)
18
+ gem.files += Dir.glob("{po,locale}/**/*")
18
19
 
19
20
  `git submodule --quiet foreach --recursive pwd`.split($/).each do |submodule|
20
21
  submodule.sub!("#{Dir.pwd}/",'')
@@ -35,6 +36,7 @@ Gem::Specification.new do |gem|
35
36
  gem.add_runtime_dependency 'rouge-lexers-fluentd'
36
37
  gem.add_runtime_dependency 'optparse-pathname'
37
38
  gem.add_runtime_dependency 'colored'
39
+ gem.add_runtime_dependency 'gettext'
38
40
 
39
41
  gem.add_development_dependency 'bundler'
40
42
  gem.add_development_dependency 'rake'
@@ -0,0 +1,126 @@
1
+ # Japanese translations for pirka package.
2
+ # Copyright (C) 2020 THE PACKAGE'S COPYRIGHT HOLDER
3
+ # This file is distributed under the same license as the pirka package.
4
+ # FIRST AUTHOR <EMAIL@ADDRESS>, 2020.
5
+ #
6
+ msgid ""
7
+ msgstr ""
8
+ "Project-Id-Version: pirka 0.1.6\n"
9
+ "Report-Msgid-Bugs-To: \n"
10
+ "PO-Revision-Date: 2020-01-12 21:56+0900\n"
11
+ "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12
+ "Language-Team: Japanese\n"
13
+ "Language: ja\n"
14
+ "MIME-Version: 1.0\n"
15
+ "Content-Type: text/plain; charset=UTF-8\n"
16
+ "Content-Transfer-Encoding: 8bit\n"
17
+ "Plural-Forms: nplurals=1; plural=0;\n"
18
+ "\n"
19
+
20
+ msgid "Pirka highlights source code syntax in EPUB files"
21
+ msgstr "Pirka(ピリカ)はEPUBファイル中のソースコードをシンタックスハイライトします"
22
+
23
+ msgid "Global options:"
24
+ msgstr "グローバルオプション:"
25
+
26
+ msgid "Config file. Defaults to %{config_path}"
27
+ msgstr "設定ファイル。デフォルトは %{config_path}"
28
+
29
+ msgid "Directory to *SAVE* library data"
30
+ msgstr "ライブラリーのデータを「保存」するディレクトリー"
31
+
32
+ msgid "Directory to *SEARCH* library data."
33
+ msgstr "ライブラリーのデータを「探」すディレクトリー"
34
+
35
+ msgid "Specify multiple times to add multiple directories."
36
+ msgstr "複数回指定することで複数のディレクトリーを追加できます"
37
+
38
+ msgid "Set debugging flag"
39
+ msgstr "デバッグフラグを設定"
40
+
41
+ msgid "Commands:"
42
+ msgstr "コマンド:"
43
+
44
+ msgid "If command is ommitted, highlight is used with no option"
45
+ msgstr "コマンドを省略した場合はオプションなしのhighlightが使われます"
46
+
47
+ msgid "Detects source code from EPUB file and generate library file"
48
+ msgstr "EPUBファイルからソースコードを検出し、ライブラリーファイルを生成します"
49
+
50
+ msgid "skip"
51
+ msgstr "スキップ"
52
+
53
+ msgid "quit"
54
+ msgstr "終了"
55
+
56
+ msgid "show code"
57
+ msgstr "コードを表示"
58
+
59
+ msgid "show options"
60
+ msgstr "選択肢を表示"
61
+
62
+ msgid "Specify EPUB file"
63
+ msgstr "EPUBファイルを指定してください"
64
+
65
+ msgid "Detecting code from \"%{title}\""
66
+ msgstr "『%{title}』からコードを検出中"
67
+
68
+ msgid "Library file was saved to:"
69
+ msgstr "ライブラリーファイルを以下の場所に保存しました:"
70
+
71
+ msgid "File to save library data"
72
+ msgstr "ライブラリーデータを保存するファイル"
73
+
74
+ msgid "CSS selector to detect source code element. Defaults to %{selector}."
75
+ msgstr "ソースコードの要素を検出するCSSセレクター。デフォルトは %{selector}"
76
+
77
+ msgid "Which language? "
78
+ msgstr "どの言語ですか? "
79
+
80
+ msgid "Highlights source code in EPUB file"
81
+ msgstr "EPUBファイル中のソースコードをシンタックスハイライトします"
82
+
83
+ msgid ""
84
+ "Cannot find code list %{library_file} for %{release_identifier}(%{epub_file}) "
85
+ "in any directory of:\n"
86
+ "%{search_dirs}"
87
+ msgstr ""
88
+ "%{release_identifier}(%{epub_file})用のコードリスト %{library_file} が以下のどのディレクトリーにも見付か"
89
+ "りませんでした:\n"
90
+ "%{search_dirs}"
91
+
92
+ msgid "Language for %{cfi} is not detected"
93
+ msgstr "%{cfi} の言語が検出されませんでした"
94
+
95
+ msgid "Library file"
96
+ msgstr "ライブラリーファイル"
97
+
98
+ msgid "Show library infomation"
99
+ msgstr "ライブラリーの情報を表示します"
100
+
101
+ msgid "Update library files by remote files"
102
+ msgstr "ライブラリーファイルをリモートファイルによって更新します"
103
+
104
+ msgid "Library was cloned to:"
105
+ msgstr "ライブラリーは以下にクローンされました:"
106
+
107
+ msgid "and added to config file %{config_file}"
108
+ msgstr "また、設定ファイルが %{config_file} に追加されました"
109
+
110
+ msgid "Couldn't save config file to %{config_file}"
111
+ msgstr "設定ファイルを %{config_file} に保存できませんでした"
112
+
113
+ msgid "Executing `%{command}`"
114
+ msgstr "`%{command}` を実行中"
115
+
116
+ msgid "Failed to execute `%{command}`"
117
+ msgstr "`%{command}` の実行に失敗しました"
118
+
119
+ msgid "Cannot find lexer for %{lang}"
120
+ msgstr "%{lang} 用のレクサーが見付かりません"
121
+
122
+ msgid "selector param not specified"
123
+ msgstr "selector パラメーターが指定されていません"
124
+
125
+ msgid "Release Identifier is not set"
126
+ msgstr "Release Identifierが設定されていません"
@@ -13,6 +13,7 @@ end
13
13
 
14
14
  require 'test/unit'
15
15
  require "test/unit/notify"
16
+ require "pirka"
16
17
 
17
18
  class Test::Unit::TestCase
18
19
  end
@@ -1,7 +1,6 @@
1
1
  require "helper"
2
2
  require "yaml"
3
3
  require "tmpdir"
4
- require "pirka/library"
5
4
  require "epub/cfi"
6
5
 
7
6
  class TestLibrary < Test::Unit::TestCase
@@ -1,5 +1,4 @@
1
1
  require 'helper'
2
- require 'pirka'
3
2
 
4
3
  class TestPirka < Test::Unit::TestCase
5
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pirka
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - KITAITI Makoto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-01 00:00:00.000000000 Z
11
+ date: 2020-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: epub-parser
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.3.2
19
+ version: 0.4.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.3.2
26
+ version: 0.4.3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: epub-maker
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -94,6 +94,20 @@ dependencies:
94
94
  - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: gettext
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :runtime
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
97
111
  - !ruby/object:Gem::Dependency
98
112
  name: bundler
99
113
  requirement: !ruby/object:Gem::Requirement
@@ -275,7 +289,12 @@ files:
275
289
  - lib/pirka/highlighter.rb
276
290
  - lib/pirka/library.rb
277
291
  - lib/pirka/version.rb
292
+ - locale/ja/LC_MESSAGES/pirka.mo
278
293
  - pirka.gemspec
294
+ - po/ja/pirka.edit.po
295
+ - po/ja/pirka.po
296
+ - po/ja/pirka.po.time_stamp
297
+ - po/pirka.pot
279
298
  - test/fixtures/YWJj.yaml
280
299
  - test/helper.rb
281
300
  - test/test_library.rb