air18n 0.0.5 → 0.0.6
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.
- data/lib/air18n/phrase_translation.rb +4 -6
- data/lib/air18n/version.rb +1 -1
- data/make_gem +5 -1
- metadata +2 -2
@@ -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 #{
|
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
|
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
|
-
|
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
|
data/lib/air18n/version.rb
CHANGED
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.
|
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.
|
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-
|
16
|
+
date: 2012-05-15 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: i18n
|