ununiga 1.0.3 → 1.0.4

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
  SHA1:
3
- metadata.gz: b8ed609a7765abb9b795d537e32fb9fbbb0c311d
4
- data.tar.gz: 1cb2c593186f7c6ef0f741198738e0ee88d16ab0
3
+ metadata.gz: fabcda8ad00cd40d307b34b49a8cb48523bf59ef
4
+ data.tar.gz: 7add0e36c31e84f339ca25394f6447ae0af041fb
5
5
  SHA512:
6
- metadata.gz: 0b006f84c3b58d5b05e82af55f1633385ec6cb97d7caca032585eb26b5dffe69e77cbf5a82f93f51442e4ba1da2b2af49bb31ba8bc94a200a87f15f21b4f45cf
7
- data.tar.gz: aa05c9c954390447392d858fc7ca10104cfa7f02bc5cadde5275afca9670a0f5ba31f4d7bc766534e0b192a81b5335c4ebefa6ebfa282d2a1527ed0cceec6775
6
+ metadata.gz: aa2c902e38ed457f282716bb4b23ee3401edf87e754ff530b0e70c761e61f23b2c576eedea25f7f80e672f460bd722791414dbda52ab2e7b6d69d78cdfa82e38
7
+ data.tar.gz: cab0ea373216b648cead438b2f8b109cf02041e6dfaf48f2b97f0ee331e296675ca79856e9da766484f30a40f701cc147725764ad6d332eedaba18a144886800
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ununiga (1.0.1)
4
+ ununiga (1.0.3)
5
5
 
6
6
  GEM
7
7
  remote: http://www.rubygems.org/
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  # ununiga[은는이가]
5
5
 
6
- 은는이가는 한글의 자소분리를 분리하고 조사를 찾아주는 역할을 합니다.
6
+ 은는이가는 한글의 자소를 분리하고 적절한 조사를 찾아주는 역할을 합니다.
7
7
  I18n의 Backend 모듈도 제공합니다.
8
8
 
9
9
  ## Installation
@@ -17,8 +17,8 @@ require 'ununiga'
17
17
 
18
18
  Ununiga::JosaPicker.takewell("레일즈와(과) 쟝고은(는) 싸우지 않습니다.")
19
19
  # => "레일즈와 쟝고는 싸우지 않습니다."
20
- Ununiga::JosaPicker.takewell("트위터(으)로 로그인합니다.")
21
- # => "페이스북로 로그인합니다."
20
+ Ununiga::JosaPicker.takewell("페이스북(으)로 로그인합니다.")
21
+ # => "페이스북으로 로그인합니다."
22
22
 
23
23
  picker = Ununiga::JosaPicker.new("레일즈은(는) 루비을(를) 사용합니다.")
24
24
  picker.takewell
@@ -46,7 +46,7 @@ links:
46
46
 
47
47
  # Rails의 ActiveModel/ActiveRecord의 Validation을 사용할 경우
48
48
  errors:
49
- # 디폴트는 `%{attribute} %{message}`형식으로 띄워쓰기가 되어 있으며로 format을 붙여쓰기로 변경해줍니다.
49
+ # 디폴트는 `%{attribute} %{message}`형식으로 띄워쓰기가 되어 있으므로 format을 붙여쓰기로 변경해줍니다.
50
50
  foramt: "%{attribute}%{message}"
51
51
  messages:
52
52
  accepted: 을(를) 반드시 확인해야 합니다.
@@ -7,7 +7,7 @@ module Ununiga::I18n
7
7
  end
8
8
 
9
9
  def transform(entry)
10
- if !entry.is_a?(Hash) && I18n.locale.to_s =~ /ko|ko_KR/i
10
+ if entry.is_a?(String) && I18n.locale.to_s =~ /ko|ko_KR/i
11
11
  return Ununiga::JosaPicker.new(entry).takewell
12
12
  end
13
13
  entry
@@ -1,7 +1,7 @@
1
1
  require 'ununiga/jaso_splitter'
2
2
 
3
3
  module Ununiga
4
- # 한글 초성, 중성, 종성 분리기
4
+ # 한글 조사 변경 클래스
5
5
  class JosaPicker
6
6
  JOSAS = [%w(은 는),
7
7
  %w(이 가),
@@ -53,7 +53,6 @@ module Ununiga
53
53
  end
54
54
  end
55
55
 
56
- # JOSAS의 element가 온다.
57
56
  def josa_convension(josa)
58
57
  if josa[0].size == 1
59
58
  ["#{josa[0]}(#{josa[1]})", "#{josa[1]}(#{josa[0]})"]
@@ -1,3 +1,3 @@
1
1
  module Ununiga
2
- VERSION = '1.0.3'
2
+ VERSION = '1.0.4'
3
3
  end
data/test/test.yml CHANGED
@@ -2,4 +2,8 @@ ko:
2
2
  someone_pay: '%{name}이(가) 돈을 냅니다.'
3
3
  someone_eat_something: '%{name}은(는) %{meal}을(를) 먹습니다.'
4
4
  do_something_with_someone: '%{name1}와(과) %{name2}은(는) %{doing}을(를) 합니다.'
5
+ float_value: 234.234234
6
+ nested_value:
7
+ first: '1'
8
+ second: '2'
5
9
 
@@ -22,5 +22,8 @@ class JosaTransformerTest < Minitest::Unit::TestCase
22
22
  assert_equal '정하와 민정은 디자인을 합니다.', I18n.t(:do_something_with_someone, name1: '정하', name2: '민정', doing: '디자인')
23
23
  end
24
24
 
25
-
25
+ def test_not_string_locale_value
26
+ assert_equal 234.234234, I18n.t(:float_value)
27
+ assert_equal ({ first: '1', second: '2' }), I18n.t(:nested_value)
28
+ end
26
29
  end
data/ununiga.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'ununiga'
3
- s.version = '1.0.3'
3
+ s.version = '1.0.4'
4
4
  s.date = '2016-01-25'
5
5
  s.summary = 'Support Jaso and Josa(Korean Language specific function)'
6
6
  s.description = '한글 자소 분리 및 적절한 조사를 찾아주어 번역해줍니다.'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ununiga
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jaehyun Shin