Hello!

I just exported a .po file from a drupal 7 site (via the admin/config/regional/translate/export page) and tried to import it on a new drupal 7 site via admin/config/regional/translate/import
After a view seconds however, I get an SQL error message:

Warning: html_entity_decode() expects parameter 1 to be string, array given in decode_entities() (line 459 of /usr/www/users/lisavr/v2/staging/public_html/includes/unicode.inc).
Warning: strlen() expects parameter 1 to be string, array given in drupal_validate_utf8() (line 1587 of /usr/www/users/lisavr/v2/staging/public_html/includes/bootstrap.inc).
Warning: html_entity_decode() expects parameter 1 to be string, array given in decode_entities() (line 459 of /usr/www/users/lisavr/v2/staging/public_html/includes/unicode.inc).
PDOException: SQLSTATE[21S01]: Insert value list does not match column list: 1136 Column count doesn't match value count at row 1: INSERT INTO {locales_target} (lid, language, translation, plid, plural) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2_0, :db_insert_placeholder_2_1, :db_insert_placeholder_3, :db_insert_placeholder_4); Array ( [:db_insert_placeholder_0] => 10479 [:db_insert_placeholder_1] => de [:db_insert_placeholder_3] => 0 [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_2_0] => [:db_insert_placeholder_2_1] => Daten über verfügbare Aktualisierungen wurden für @count Projekte überprüft. ) in _locale_import_one_string_db() (line 1112 of /usr/www/users/lisavr/v2/staging/public_html/includes/locale.inc).

I tried with both options, "Strings in the uploaded file replace existing ones, new ones are added. The plural format is updated." and "Existing strings and the plural format are kept, only new strings are added."

I did not alter the .po file in any way. Any ideas? Has anyone had that problem? Any help would be appreciated! Thanks!

Comments

Version: 7.22 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Status: Active » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.