hudmol/archivesspace — pull request #395 by payten (2013-04-23 06:17:58+00:00)
Title: [Delivers #47583643] Introduce new mechanism to interpolate JSONModel objects in I18n locale messages and hook it up for Archival Records

The main work in this PR is the introduction of the JSONModelI18nWrapper which wraps a JSONModel hash and allows interpolation with the I18n locate strings via the %{accession.title} notation. This allows us to define more meaningful messages in the I18n ymls.

I've updated the Repository, Accession, Resource, Archival Object, Digital Object and Digital Object Component messages for a variety of actions including create, update, suppression, delete, transfer...

While doing this work I can across a few bugs and tackled them too... namely:
- HTML was not being escaped in some widgets e.g. when in a title was executed by the linker and tree widgets -- these strings are now escaped correctly.
- Fix broken I18n paths for newly dynamic enumerations on read only templates.
- Fix exception 'incompatible character encodings: ASCII-8BIT and UTF-8' being thrown when UTF8 characters are stored in the flash message and then rendered after a redirect.