alphagov/whitehall — pull request #576 by tekin (2013-05-29 09:17:09+00:00)
Title: Non english world location news

Tracker https://www.pivotaltracker.com/story/show/45582477

This allows the creation of foreign language only world location news articles. All editions now have a "locale", which by default is English. This can be overridden for world location news articles such that the article will only be available in the language chosen. Because we cannot reliably generate slugs for foreign-language titles, these articles get a numeric slug.

To get this stuff to work I've had to move globalize3 to a newer version, plus hook into some of its internals to override the default behaviour for translation attribute fallbacks.

There is some JS code to enhance the UX when overriding the default language as well as to handle right-to-left languages when they are selected (@edds you might want to take a look at this stuff). Whilst I was at it, I updated translations such that those in RTL languages are now correctly rendered in admin.

There's lots more additional information and rationale in the commit messages so I won't repeat it here.

Note that this branch contains a migration that adds a column for the default locale to the editions table. That migration should be merged and deployed first to avoid any issues when the main changes are deployed.