honyaku 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4deb596d588ecdc949ec04c2c139bdd0c8d886c365aa9e5f980f21ffd0b986a
4
- data.tar.gz: 42749082904b0c7cfd8ce08b038c776a7e3c57cf22b37878a1e3145cf5878c7a
3
+ metadata.gz: 5120d9867dc1cc1e89b2c6d98426580fdc563268b17295a67b72215e1f1895ed
4
+ data.tar.gz: 4101e9ed1fb286429471dc786fe0badc19151c25991c259f6a9e348d0649b32d
5
5
  SHA512:
6
- metadata.gz: 0bab4819f367a8144255b85f6b1c5aa0b23b132d4dc02fe6cb2c7bad6bfbdc09f6904c833ee37849ad739275d4c03f6ee65fa7917de1e95c5c249ef562d82d28
7
- data.tar.gz: 8178c8117039fcb339476be232b109695d787a64346af4d64eb8bf3375c735494e563f1a44871acd01b534822de3cf9111b93b79a014100d9eab1033dc0ffba0
6
+ metadata.gz: ad12b80f4895a55f0b20e04d9f9ab48a5f194b85697cc3e171c395d50b7a69553fa6070a03ea833340d0fd3b1fb53a4cbab87aa38849aff4624eab0a022c6cc2
7
+ data.tar.gz: 560a02b95ac14f8f7210586a3488ed1f6e07eca6d50f83960cc702be913a0f31e91fe3a6e4fc7e0fbe376425880a47fbc59a4dc71be5166d83eb5c66107f31c5
data/README.md CHANGED
@@ -6,12 +6,10 @@ Honyaku was built using [Cursor Composer](https://docs.cursor.com/composer) with
6
6
 
7
7
  ## Features
8
8
 
9
- - Uses GPT-4 for high-quality translations (GPT-3.5-turbo optional for faster processing)
10
9
  - Preserves YAML structure, references, and interpolation variables
11
10
  - Supports translation rules via `.honyakurules` files
12
11
  - Handles large files through automatic chunking
13
12
  - Automatically fixes YAML formatting issues caused by the GPT
14
- - Supports backup creation before modifications
15
13
  - Smart file skipping to avoid unnecessary retranslation
16
14
 
17
15
  # Example Output
@@ -148,11 +146,6 @@ When invalid YAML is detected:
148
146
  2. Translation is retried if necessary
149
147
  3. Original file is preserved if fixes fail
150
148
 
151
- ### Model Selection
152
-
153
- - Default: GPT-4 (higher quality, slower)
154
- - Alternative: GPT-3.5-turbo (faster, less accurate)
155
-
156
149
  ## Development
157
150
 
158
151
  After checking out the repo:
data/lib/honyaku/cli.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require "thor"
2
2
  require "yaml"
3
+ require "fileutils"
3
4
  require "honyaku/translator"
4
5
 
5
6
  module Honyaku
@@ -117,6 +118,11 @@ module Honyaku
117
118
  puts "✅ Fixes complete!"
118
119
  end
119
120
 
121
+ desc "version", "Show Honyaku version"
122
+ def version
123
+ puts "Honyaku v#{Honyaku::VERSION}"
124
+ end
125
+
120
126
  private
121
127
 
122
128
  def find_translation_rules(start_path, target_locale = nil)
@@ -311,11 +317,6 @@ module Honyaku
311
317
  # Status reporting logic will go here
312
318
  end
313
319
 
314
- desc "version", "Show Honyaku version"
315
- def version
316
- puts "Honyaku v#{Honyaku::VERSION}"
317
- end
318
-
319
320
  def self.exit_on_failure?
320
321
  true
321
322
  end
@@ -47,7 +47,7 @@ module Honyaku
47
47
 
48
48
  loop do
49
49
  begin
50
- YAML.load(content)
50
+ YAML.safe_load(content, aliases: true)
51
51
  puts "✅ No more YAML errors found"
52
52
  return content
53
53
  rescue Psych::SyntaxError => e
@@ -238,4 +238,4 @@ module Honyaku
238
238
  base_prompt
239
239
  end
240
240
  end
241
- end
241
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Honyaku
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.2"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: honyaku
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-02-20 00:00:00.000000000 Z
11
+ date: 2025-05-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  requirements: []
91
- rubygems_version: 3.2.33
91
+ rubygems_version: 3.5.21
92
92
  signing_key:
93
93
  specification_version: 4
94
94
  summary: Translate your Rails application using OpenAI