Локализация. Проблема импорта.

Главные вкладки

Аватар пользователя Гость Гость (не проверено) 29 ноября 2006 в 12:01

Подскажите, в чем проблема, может кто сталкивался
в версии 4.7.4

При попытки импорта .po файла получаем ошибку:

* The translation import failed, because the file could not be read.
* The translation import of failed.

Что на сервере, что на локальном компьютере.
Причем в версии 4.7.2 все работало нормально.

Лучший ответ

Аватар пользователя Dutar Dutar 19 декабря 2006 в 14:53

У меня тоже похожая проблемка была, искал ответы но так и не нашел а решил проблему следующим образом:
залил на сервер через фтп в tmp

потом изменил в файле include\local.php
.......
/**
* Parses Gettext Portable Object file into an array
*
* param $file Object with properties of local file to parse
* author Jacobo Tarrio
*/
function _locale_import_read_po($file, $mode, $lang) {

$message = theme('placeholder', $file->filename);
$fd = fopen("tmp/ru.po", "rb"); // File will get closed by PHP on return
if (!$fd) {
drupal_set_message(t('The translation import failed, because the file %filename could not be read.', array('%filename' => $message)), 'error');
return FALSE;
}

$context = "COMMENT"; // Parser context: COMMENT, MSGID, MSGID_PLURAL, MSGSTR and MSGSTR_ARR
$current = array(); // Current entry being read
$plural = 0; // Current plural form
$lineno = 0; // Current line
............

залилось нормально

Комментарии

Аватар пользователя Dutar Dutar 19 декабря 2006 в 14:53

У меня тоже похожая проблемка была, искал ответы но так и не нашел а решил проблему следующим образом:
залил на сервер через фтп в tmp

потом изменил в файле include\local.php
.......
/**
* Parses Gettext Portable Object file into an array
*
* param $file Object with properties of local file to parse
* author Jacobo Tarrio
*/
function _locale_import_read_po($file, $mode, $lang) {

$message = theme('placeholder', $file->filename);
$fd = fopen("tmp/ru.po", "rb"); // File will get closed by PHP on return
if (!$fd) {
drupal_set_message(t('The translation import failed, because the file %filename could not be read.', array('%filename' => $message)), 'error');
return FALSE;
}

$context = "COMMENT"; // Parser context: COMMENT, MSGID, MSGID_PLURAL, MSGSTR and MSGSTR_ARR
$current = array(); // Current entry being read
$plural = 0; // Current plural form
$lineno = 0; // Current line
............

залилось нормально