Issue #1809962 by Jose Reyero, sun: Move some locale updates to update.inc for a safe language upgrade.
parent
1bb21b5b7c
commit
92a5b29970
|
@ -399,6 +399,19 @@ function update_prepare_d8_language() {
|
|||
// array.
|
||||
variable_set('language_default', (array) $language_default);
|
||||
}
|
||||
|
||||
// Add column to track customized string status to locales_target.
|
||||
// When updating in a non-English language, the locale translation system is
|
||||
// triggered, which attempts to query string translations already.
|
||||
if (db_table_exists('locales_target') && !db_field_exists('locales_target', 'customized')) {
|
||||
$spec = array(
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0, // LOCALE_NOT_CUSTOMIZED
|
||||
'description' => 'Boolean indicating whether the translation is custom to this site.',
|
||||
);
|
||||
db_add_field('locales_target', 'customized', $spec);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -512,19 +512,6 @@ function locale_update_8005() {
|
|||
db_add_primary_key('locales_target', array('language', 'lid'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Add column to track customized string status to locales_target.
|
||||
*/
|
||||
function locale_update_8006() {
|
||||
$spec = array(
|
||||
'type' => 'int',
|
||||
'not null' => TRUE,
|
||||
'default' => 0, // LOCALE_NOT_CUSTOMIZED
|
||||
'description' => 'Boolean indicating whether the translation is custom to this site.',
|
||||
);
|
||||
db_add_field('locales_target', 'customized', $spec);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert language_negotiation_* variables to use the new callbacks.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue