twitter_cldr_js 2.2.0 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/History.txt +8 -0
- data/README.md +11 -1
- data/Rakefile +4 -5
- data/lib/assets/javascripts/twitter_cldr/af.js +208 -98
- data/lib/assets/javascripts/twitter_cldr/ar.js +208 -98
- data/lib/assets/javascripts/twitter_cldr/be.js +211 -101
- data/lib/assets/javascripts/twitter_cldr/bg.js +208 -98
- data/lib/assets/javascripts/twitter_cldr/bn.js +208 -98
- data/lib/assets/javascripts/twitter_cldr/ca.js +208 -98
- data/lib/assets/javascripts/twitter_cldr/cs.js +208 -98
- data/lib/assets/javascripts/twitter_cldr/cy.js +208 -98
- data/lib/assets/javascripts/twitter_cldr/da.js +208 -98
- data/lib/assets/javascripts/twitter_cldr/de.js +208 -98
- data/lib/assets/javascripts/twitter_cldr/el.js +208 -98
- data/lib/assets/javascripts/twitter_cldr/en-GB.js +1994 -0
- data/lib/assets/javascripts/twitter_cldr/en.js +206 -96
- data/lib/assets/javascripts/twitter_cldr/es.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/eu.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/fa.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/fi.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/fil.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/fr.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/ga.js +212 -101
- data/lib/assets/javascripts/twitter_cldr/gl.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/he.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/hi.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/hr.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/hu.js +210 -99
- data/lib/assets/javascripts/twitter_cldr/id.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/is.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/it.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/ja.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/ko.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/lv.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/msa.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/nl.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/no.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/pl.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/pt.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/ro.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/ru.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/sk.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/sq.js +212 -101
- data/lib/assets/javascripts/twitter_cldr/sr.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/sv.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/ta.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/th.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/tr.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/uk.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/ur.js +210 -99
- data/lib/assets/javascripts/twitter_cldr/vi.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/zh-cn.js +209 -98
- data/lib/assets/javascripts/twitter_cldr/zh-tw.js +209 -98
- data/lib/twitter_cldr/js/compiler.rb +24 -5
- data/lib/twitter_cldr/js/mustache/bundle.coffee +6 -0
- data/lib/twitter_cldr/js/mustache/parsers/number_parser.coffee +103 -0
- data/lib/twitter_cldr/js/renderers/base.rb +2 -0
- data/lib/twitter_cldr/js/renderers/parsers/number_parser.rb +34 -0
- data/lib/twitter_cldr/js/renderers.rb +4 -0
- data/lib/twitter_cldr/js/tasks/tasks.rb +15 -3
- data/lib/twitter_cldr/js/version.rb +2 -2
- data/lib/twitter_cldr/js.rb +0 -3
- data/spec/js/parsers/number_parser.spec.js +211 -0
- data/spec/js/utilities.spec.js +0 -3
- data/twitter_cldr_js.gemspec +7 -6
- metadata +25 -47
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 45132ca6e3f24f38fe4166b2504ce434dd02efd3
|
4
|
+
data.tar.gz: 66934f3e44714b90cc2f6b037135d9569287738c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ce5aea98baa5fc37a9eee9c5936c3021dbe78376f88729496a68ae8c1fc1558ed67a808724bf1ae17fa626f9b17b957c757671cd787bbdde1958275a2bb1c42f
|
7
|
+
data.tar.gz: 61924baf1a704ba61dda1490c65855581473a7255b7c62c97000436cd860d364f419dbfdf378e50007ac4d50fb4190ee176f1b34b7d3f941ead412465dc4bf86
|
data/History.txt
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
=== 2.2.2
|
2
|
+
|
3
|
+
* Removing rake version requirement.
|
4
|
+
|
5
|
+
=== 2.2.1
|
6
|
+
|
7
|
+
* Marking compilation dependencies as needed for development only (eg. rubyracer, uglifier, coffeescript, etc).
|
8
|
+
|
1
9
|
=== 2.2.0
|
2
10
|
|
3
11
|
* Upgrading to twitter-cldr-rb 2.4.0, which contains an upgrade to CLDR v23.
|
data/README.md
CHANGED
@@ -12,6 +12,16 @@ Currently, twitter-cldr-js supports the following:
|
|
12
12
|
5. Plural rules
|
13
13
|
6. Bidirectional reordering
|
14
14
|
|
15
|
+
## Installation
|
16
|
+
|
17
|
+
Add twitter-cldr-js to your Gemfile:
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
gem 'twitter_cldr_js', :require => 'twitter_cldr/js'
|
21
|
+
```
|
22
|
+
|
23
|
+
If you're not using bundler, run `gem install twitter_cldr_js` and then require `twitter_cldr/js` somewhere in your project. Note that twitter-cldr-js isn't really designed to run outside of Rails. If you need the JavaScript functionality it provides but aren't using Rails, consider copying the compiled JavaScript files (lib/assets/javascripts/twitter_cldr/*.js) into your project by hand instead of using this gem directly.
|
24
|
+
|
15
25
|
## Usage with Rails
|
16
26
|
|
17
27
|
twitter-cldr-js provides a single `.js` file per locale. You can include a locale-specific version (eg. Spanish) in your JavaScript manifest (`app/assets/javascripts/application.js`) like this:
|
@@ -23,7 +33,7 @@ twitter-cldr-js provides a single `.js` file per locale. You can include a loca
|
|
23
33
|
This will make the Spanish version of twitter-cldr-js available to the JavaScript in your app. If your app supports multiple languages however, this single-locale approach won't be much use. Instead, require the right file with `javascript_include_tag` for example in a view or a layout:
|
24
34
|
|
25
35
|
```ruby
|
26
|
-
<%= javascript_include_tag "twitter_cldr/#{
|
36
|
+
<%= javascript_include_tag "twitter_cldr/#{I18n.locale}.js" %>
|
27
37
|
```
|
28
38
|
|
29
39
|
### Dates and Times
|
data/Rakefile
CHANGED
@@ -31,11 +31,10 @@ end
|
|
31
31
|
|
32
32
|
desc 'Run JavaScript specs'
|
33
33
|
task "spec:js" do
|
34
|
-
ENV["LOCALES"] = "en"
|
34
|
+
ENV["LOCALES"] = "en,ar"
|
35
35
|
Rake::Task["twitter_cldr:js:update"].invoke
|
36
36
|
|
37
37
|
puts "\nJasmine Specs"
|
38
|
-
failures = 0
|
39
38
|
|
40
39
|
if `which jasmine-node`.strip.empty?
|
41
40
|
puts "ERROR: You need to install jasmine-node to run JavaScript tests:"
|
@@ -44,12 +43,12 @@ task "spec:js" do
|
|
44
43
|
else
|
45
44
|
puts `jasmine-node #{File.dirname(__FILE__)} --junitreport`
|
46
45
|
doc_files = Dir.glob(File.join(File.dirname(__FILE__), "reports/**"))
|
46
|
+
failures = 0
|
47
47
|
|
48
48
|
doc_files.each do |doc_file|
|
49
49
|
doc = REXML::Document.new(File.read(doc_file))
|
50
|
-
failures
|
51
|
-
sum
|
52
|
-
sum
|
50
|
+
failures = doc.elements.to_a("testsuites/testsuite").inject(0) do |sum, element|
|
51
|
+
sum + element.attributes["failures"].to_i
|
53
52
|
end
|
54
53
|
end
|
55
54
|
|