alphagov/content-store — pull request #81 by heathd (2014-11-27 14:47:21+00:00)
Title: Use link in the appropriate locale

We have introduced a 'locale' field for content items. When resolving
related links we would like to load the link which has the same locale
as the current content item, by preference. If that is not available we
fall back on the english item.

Note: we have adjusted the index on content item to add the locale
field. It will be necessary to create the new index and drop the old
index using the following commands:

$ rake db:mongoid:create_indexes
$ rake db:mongoid:remove_indexes

For reference: http://mongoid.org/en/mongoid/docs/indexing.html

Story: https://trello.com/c/R6AR8Oic/52-the-content-store-resolves-the-most-appropriate-translation-for-a-given-thing-in-the-links-hash