air18n 0.1.7 → 0.1.8

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.
@@ -155,8 +155,13 @@ module Air18n
155
155
  else
156
156
  monthly_phrase_ids_word_counts_by_type = { false => {}, true => {} }
157
157
  days.each do |_, phrase_ids_word_counts_by_type|
158
- [false, true].each do |is_verification|
159
- monthly_phrase_ids_word_counts_by_type[is_verification].merge!(phrase_ids_word_counts_by_type[is_verification])
158
+ monthly_phrase_ids_word_counts_by_type[false].merge!(phrase_ids_word_counts_by_type[false])
159
+ end
160
+ days.each do |_, phrase_ids_word_counts_by_type|
161
+ phrase_ids_word_counts_by_type[true].each do |phrase_id, word_count|
162
+ if !monthly_phrase_ids_word_counts_by_type[false].include?(phrase_id)
163
+ monthly_phrase_ids_word_counts_by_type[true][phrase_id] = word_count
164
+ end
160
165
  end
161
166
  end
162
167
  activity = construct_activity_new(monthly_phrase_ids_word_counts_by_type)
@@ -219,7 +224,7 @@ module Air18n
219
224
  # of a set of translations and verifications, in (is verification bool) => (phrase id =>
220
225
  # English phrase value map).
221
226
  #
222
- # TODO(jkb) remove in September 2012.
227
+ # Only used by old payment computing method.
223
228
  def self.construct_activity(phrase_ids_values_by_type)
224
229
  {}.tap do |activity|
225
230
  activity[:num_translations], activity[:word_count_translations] = translation_word_count(phrase_ids_values_by_type[false])
@@ -230,7 +235,7 @@ module Air18n
230
235
  # Helper method for construct_activity which counts words in a set of
231
236
  # translations or verifications, in phrase id => English phrase value map.
232
237
  #
233
- # TODO(jkb) remove in September 2012.
238
+ # Only used by old payment computing method.
234
239
  def self.translation_word_count(phrase_ids_to_values)
235
240
  [phrase_ids_to_values.count, segment(phrase_ids_to_values.values.join(' ')).size]
236
241
  end
@@ -1,3 +1,3 @@
1
1
  module Air18n
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
data/make_gem CHANGED
@@ -1,5 +1,5 @@
1
1
  # Run this to push the new version of the gem to rubygems!
2
- v=0.1.7
2
+ v=0.1.8
3
3
  gem build air18n.gemspec
4
4
  gem push air18n-${v}.gem
5
5
 
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.7
4
+ version: 0.1.8
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-08-30 00:00:00.000000000 Z
16
+ date: 2012-09-05 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: i18n