So far i found 2 causes of duplicated messages (duplicate message definition) when updating po files(rake updatepo)
- Subclassing — hard to fix, official manual says: ” write a model per a file(modelname.rb)”, which helped me really…not.. adding common columns id/created_at/updated_at to untranslated colums can help
GetText::ActiveRecordParser.init( :untranslate_columns => %w[id created_at updated_at user_id] )
You can also limit the classes that will be parsed with :activerecord_classes = [‘name’], which will be used like current_class =~ /class.*name /, so one could add wildcards and stuff.
- Observers: deactivate them in environment.rb while updating
While trying through these options, remember to always clenup or delete your old pot file, or updatepo can never succeed.
BTW: never try to use :use_classes => false,