lib/pomo.rb in grosser-pomo-0.4.1 vs lib/pomo.rb in grosser-pomo-0.5.0

- old
+ new

@@ -1,3 +1,10 @@ require 'pomo/po_file' module Pomo + extend self + + 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 end \ No newline at end of file