Module: GetPomo

Extended by:
GetPomo
Included in:
GetPomo
Defined in:
lib/get_pomo.rb,
lib/get_pomo/mo_file.rb,
lib/get_pomo/po_file.rb,
lib/get_pomo/version.rb,
lib/get_pomo/translation.rb

Defined Under Namespace

Classes: MoFile, PoFile, Translation

Constant Summary collapse

VERSION =
"0.6.2"

Class Method Summary collapse

Class Method Details

.unique_translations(translations) ⇒ Object



7
8
9
10
11
# File 'lib/get_pomo.rb', line 7

def self.unique_translations(translations)
  last_seen_at_index = {}
  translations.each_with_index {|translation,index|last_seen_at_index[translation.msgid]=index}
  last_seen_at_index.values.sort.map{|index| translations[index]}
end