air18n 0.1.38 → 0.1.39

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.
@@ -479,8 +479,8 @@ module Air18n
479
479
  end
480
480
  end
481
481
 
482
- [(translation_pair[:source_word_count] * proportion_translated).round,
483
- (translation_pair[:source_word_count] * proportion_verified).round]
482
+ [(translation_pair[:source_word_count] * proportion_translated).ceil,
483
+ (translation_pair[:source_word_count] * proportion_verified).floor]
484
484
  end
485
485
 
486
486
  def self.get_translation_pairs(user_id, from_date, to_date)
@@ -1,3 +1,3 @@
1
1
  module Air18n
2
- VERSION = "0.1.38"
2
+ VERSION = "0.1.39"
3
3
  end
@@ -519,7 +519,7 @@ describe Air18n::PhraseTranslation do
519
519
  [[8, 0], # "" -> "urgle burgle", user 5
520
520
  [0, 0], # same translator making an edit, user 5
521
521
  [0, 8], # different translator verifying, user 6
522
- [9, 4], # edit of stale phrase; 2/3 words changed, 2/3*13=8.66; rounds to 9, user 5
522
+ [9, 4], # edit of stale phrase; 2/3 words changed, 2/3*13=8.66; ceils to 9, user 5
523
523
  [0, 13], # verification, user 6
524
524
  [13, 0], # 3 new words; 3/3 words changed, 3/3*13=13, user 5
525
525
  [0, 0], # Tweak of a translation that was done in past by same person, user 5
@@ -600,8 +600,8 @@ describe Air18n::PhraseTranslation do
600
600
  :phrase_key=>'find_a_place_to_stay'
601
601
  }
602
602
  words_translated, words_verified = Air18n::PhraseTranslation.word_counts_from_translation_pair(pair)
603
- words_translated.should == 0 # 1 / 17 * 5 = 0.29, rounds to 0
604
- words_verified.should == 5
603
+ words_translated.should == 1 # 1 / 17 * 5 = 0.29, ceils to 1
604
+ words_verified.should == 4
605
605
 
606
606
  pair = {
607
607
  :translation=>"泊まりたい所、見つかるよ。",
@@ -615,7 +615,7 @@ describe Air18n::PhraseTranslation do
615
615
  :phrase_key=>'find_a_place_to_stay'
616
616
  }
617
617
  words_translated, words_verified = Air18n::PhraseTranslation.word_counts_from_translation_pair(pair)
618
- words_translated.should == 1 # 3 / 17 * 5 = 0.88, rounds to 1
618
+ words_translated.should == 1 # 3 / 17 * 5 = 0.88, ceils to 1
619
619
  words_verified.should == 4
620
620
 
621
621
  # Test that Greek works. There was once a bug where word segmentation
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: air18n
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.38
4
+ version: 0.1.39
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2012-11-20 00:00:00.000000000 Z
16
+ date: 2012-11-21 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: i18n