I propose dropping the constraint from cr_items.locale to cr_locales and move it over to use ad_locales instead.
For existing values an upgrade script will be written that
- Creates a new locale2 column with a value of varchar(30) and a reference to ad_locales.locale
- For each existing locale, look up the locale in cr_locales, gets the nls_territory value, looks up the locale in ad_locales that belongs to this value (nls_charset) and store it in locale2
- Drop locale column
- Rename locale2 to locale.
This is in preperation for the support of multiple languages in ETP and XoWiki for the same document.