air18n 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -191,7 +191,7 @@ module Air18n
191
191
  if stats[:is_paid] && stats[:usd_amount] > 0
192
192
  stats[:description] = "Translator payout "
193
193
  stats[:description] << "for #{Date::MONTHNAMES[today_last_month.month]} #{today_last_month.year}. "
194
- stats[:description] << "(#{stats[:activity][:word_count_translations]} translated words and #{stats[:activity][:word_count_verifications]} verified words in #{stats[:activity][:num_translations]} translated and #{stats[:activity][:num_verifications]} verified #{Airbnb::I18n.decode_locale(stats[:locale])} phrases.)"
194
+ stats[:description] << "(#{stats[:activity][:word_count_translations]} translated words and #{stats[:activity][:word_count_verifications]} verified words in #{stats[:activity][:num_translations]} translated and #{stats[:activity][:num_verifications]} verified #{stats[:locale]} phrases.)"
195
195
 
196
196
  stats[:line_item] = LineItem.new(
197
197
  :user_id => stats[:user_id],
@@ -300,18 +300,16 @@ module Air18n
300
300
  is_stale
301
301
  end
302
302
 
303
- # For every PhraseTranslation in Airbnb::I18n::TRANSLATED_LOCALES, resets
303
+ # For every PhraseTranslation in the specific list of locales, resets
304
304
  # is_latest and is_stale columns based on phrases.updated_at and
305
305
  # phrase_translations.created_at dates.
306
- #
307
- # This is used by the migration that adds these columns.
308
- def self.reset_latest_and_stale_flags_from_timestamps
306
+ def self.reset_latest_and_stale_flags_from_timestamps(locales)
309
307
  phrase_id_to_updated_at = {}
310
308
  Phrase.find_each do |phrase|
311
309
  phrase_id_to_updated_at[phrase.id] = phrase.updated_at
312
310
  end
313
311
 
314
- Airbnb::I18n::TRANSLATED_LOCALES.each do |locale|
312
+ locales.each do |locale|
315
313
  # Output progress to console in case of running this on console.
316
314
  puts "Resetting flags for #{locale}..."
317
315
  latest_translations = PhraseTranslation.select("max(id) as max_id").where("locale='#{locale}'").group(:phrase_id).collect{|e| e.max_id}.to_set
@@ -1,3 +1,3 @@
1
1
  module Air18n
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/make_gem CHANGED
@@ -1,4 +1,8 @@
1
1
  # Run this to push the new version of the gem to rubygems!
2
- v=0.0.5
2
+ v=0.0.6
3
3
  gem build air18n.gemspec
4
4
  gem push air18n-${v}.gem
5
+
6
+ # To add new owners, get an existing owner to add you as an owner. They'll run
7
+ # for example:
8
+ # gem owner --add ocelot@gmail.com air18n
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.0.5
4
+ version: 0.0.6
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-05-11 00:00:00.000000000 Z
16
+ date: 2012-05-15 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: i18n