unepwcmc/SAPI — pull request #221 by agnessa (2014-02-19 16:44:03+00:00)
Title: [#65555822] localised auto notes

This finalises dynamic content translations and builds on translated ranks & change types.

I used this data for testing:
UPDATE change_types SET display_name_en = 'listing', display_name_es = 'inclusión'
WHERE name = 'ADDITION';
UPDATE change_types SET display_name_en = 'reservation', display_name_es = 'reserva'
WHERE name = 'RESERVATION';
UPDATE change_types SET display_name_en = 'reservation withdrawn', display_name_es = 'reserva retirada'
WHERE name = 'RESERVATION_WITHDRAWN';
UPDATE change_types SET display_name_en = 'deletion', display_name_es = 'supresión'
WHERE name = 'DELETION';
UPDATE ranks SET display_name_es = 'Reino' WHERE name = 'KINGDOM';
UPDATE ranks SET display_name_es = 'Filo' WHERE name = 'PHYLUM';
UPDATE ranks SET display_name_es = 'Clase' WHERE name = 'CLASS';
UPDATE ranks SET display_name_es = 'Orden' WHERE name = 'ORDER';
UPDATE ranks SET display_name_es = 'Familia' WHERE name = 'FAMILY';
UPDATE ranks SET display_name_es = 'Género' WHERE name = 'GENUS';
UPDATE ranks SET display_name_es = 'Especie' WHERE name = 'SPECIES';

1. rake db:migrate
2. rebuild_listing_changes_mview()
3. rake tmp:clear

It is worth remembering that this change needs to be properly resolved when we merge develop in (or the other way round), because in develop the SQL functions which calculate auto notes are defined in a different file (db / helpers / 000_helpers.sql)