Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

version bump

  • Loading branch information...
commit e1aa8570c6c9b177cbfa1882b682b6e1666fd3fd 1 parent 5de628e
Jason Toy authored
Showing with 18 additions and 2 deletions.
  1. +3 −1 README.md
  2. +1 −1  lib/cld/version.rb
  3. +14 −0 spec/cld_spec.rb
View
4 README.md
@@ -1,6 +1,6 @@
# Compact Language Detection
-Blazing-fast langauge detection for Ruby provided by
+Blazing-fast language detection for Ruby provided by
Google Chrome's Compact Language Detector.
## How to Use
@@ -30,3 +30,5 @@ $ bundle
## Thanks
Thanks to the Chrome authors, and to Mike McCandless for writing a Python version.
+
+Licensed the same as Chrome. Jason Toy
View
2  lib/cld/version.rb
@@ -1,3 +1,3 @@
module CLD
- VERSION = "0.4.0"
+ VERSION = "0.5.0"
end
View
14 spec/cld_spec.rb
@@ -18,6 +18,20 @@
it { subject[:code].should eq("fr") }
it { subject[:reliable].should be_true }
end
+
+ context "Simplified Chinese text" do
+ subject { CLD.detect_language("你好吗箭体") }
+
+ it { subject[:name].should eq("Chinese") }
+ it { subject[:code].should eq("zh") }
+ end
+
+ context "Traditional Chinese text" do
+ subject { CLD.detect_language("你好嗎繁體") }
+
+ it { subject[:name].should eq("ChineseT") }
+ it { subject[:code].should eq("zh-TW") }
+ end
context "Unknown text" do
subject { CLD.detect_language("") }
Please sign in to comment.
Something went wrong with that request. Please try again.