@@ -156,123 +156,14 @@ function _locale_import_po($file, $lang, $mode) {
returnFALSE;
}
// Check if we can get the strings from the file
if(!($strings=_locale_import_read_po($file))){
drupal_set_message(t('The translation file %filename appears to contain errors and could not be read.',array('%filename'=>theme('placeholder',$file->filename))),'error');
returnFALSE;
}
// Get strings from file (returns on failure after a partial import, or on success)
db_query("UPDATE {locales_meta} SET plurals = %d, formula = '%s' WHERE locale = '%s'",$nplurals,$plural,$lang);
}
else{
db_query("UPDATE {locales_meta} SET plurals = %d, formula = '%s' WHERE locale = '%s'",0,'',$lang);
}
}
else{
if(!$headerdone){
drupal_set_message(t('The translation file %filename appears to have a missing or malformed header.',array('%filename'=>theme('placeholder',$file->filename))),'error');