Home › Forum › Problemi Vari con WP › Bug WordPress Italiano – impossibile generare in automatico il file wp-config
-
AutorePost
-
-
29 Giugno 2010 alle 14:32 #14328niccolotapparoPartecipante
Buongiorno,
Scrivo per segnalare un bug nella versione italiana di wordpress 2.9.2. Il file è /wp-admin/setup-config.php linea 169 in poi.
foreach ($configFile as $line_num => $line) {
switch (substr($line,0,16)) {
case "define('DB_NAME'":
fwrite($handle, str_replace("putyourdbnamehere", $dbname, $line));
break;
case "define('DB_USER'":
fwrite($handle, str_replace("'usernamehere'", "'$uname'", $line));
break;
case "define('DB_PASSW":
fwrite($handle, str_replace("'yourpasswordhere'", "'$passwrd'", $line));
break;
case "define('DB_HOST'":
fwrite($handle, str_replace("localhost", $dbhost, $line));
break;
case '$table_prefix =':
fwrite($handle, str_replace('wp_', $prefix, $line));
break;
}
}
queste linee di codice appartengono alla versione eng 2.8.6 e non sono compatibili con la versione 2.9.2. infatti nella eng 2.9.2 troviamo:
foreach ($configFile as $line_num => $line) {
switch (substr($line,0,16)) {
case "define('DB_NAME'":
$configFile[$line_num] = str_replace("putyourdbnamehere", $dbname, $line);
break;
case "define('DB_USER'":
$configFile[$line_num] = str_replace("'usernamehere'", "'$uname'", $line);
break;
case "define('DB_PASSW":
$configFile[$line_num] = str_replace("'yourpasswordhere'", "'$passwrd'", $line);
break;
case "define('DB_HOST'":
$configFile[$line_num] = str_replace("localhost", $dbhost, $line);
break;
case '$table_prefix =':
$configFile[$line_num] = str_replace('wp_', $prefix, $line);
break;
}
}
immagino che sia un errore dovuto ad un copia-incolla o qualcosa di simile. Questo causa l’impossibilità di generare in automatico il file /wp-config.php, in quanto si va a scrivere su un file handler che viene aperto successivamente. Nella 2.8.6 ENG, infatti, prima veniva aperto l’handler, quindi si scrivevano le righe una ad una. Nella 2.9.2, invece, viene scritto tutto su vettore, quindi si scrive il vettore su file.`
-
29 Giugno 2010 alle 15:12 #74646wollyAmministratore del forum
in realtà quel file non viene tradotto, la distro viene generata in automatico da wordpress.prg quando terminiamo la traduzione, facciamo presente il problema agli sviluppatori di wordpress.
grazie della segnalazione.
-
29 Giugno 2010 alle 15:27 #74647niccolotapparoPartecipante
Non pensavo che la generazione fosse automatica. In effetti mi sembrava molto strano che il problema fosse di origine “manuale”, probabilmente sarà stato un qualche problema di merge.
-
29 Giugno 2010 alle 15:33 #74648wollyAmministratore del forum
funziona in questo modo, noi traduciamo il file po e creiamo il mo, poi trduciamo alcuni file come wp-config-sample il readme e poco altro, poi facciamo il commit sull’SVN di wordpress.
A questo punto abbiamo un accesso su it.wordpress.org dove lanciamo la generazione automatica del file zip localizzato in italiano.
Probabilemtne c’è stato qualche problema nel commit che forse (speriamo sia cosà¬) non aveva alcuni file del core aggiornati.
-
29 Giugno 2010 alle 15:49 #74650SteveAglAmministratore del forum
NO si tratta di un problema “manuale” perchè la distro viene creata a partire dai file di WP più una serie di traduzioni… la generazione è automatica iforse il problema è nel config… che tradotto da noi ha qualche problema… con la 3.0 verificherò che non si ripeta tale difetto.
-
29 Giugno 2010 alle 15:52 #74651SteveAglAmministratore del forum
Il file setup config contine delle strinhe non traducibili col file di localizzazione e per errore non sono state apportate le modifiche della 2.9.2 … la 3.0 ne vedrà à appunto una nuova versione si tratta di uno dei pochissimi file (2) che contengono traduzioni manuali perchè non generabili da pot…
-
29 Giugno 2010 alle 22:29 #74663niccolotapparoPartecipante
Ho capito. Avevo letto il codex riguardo alle traduzioni, infatti avevo notato che setup-config.php non usa il framework gettext. Solo che non sapevo se si trattasse di un commit o merge svn sballato, oppure un errore in fase di traduzione.
Sono la persona in AlterVista delegata agli aggiornamenti/modifiche di wordpress e, siccome stiamo aspettando la vostra release per render disponibile l’aggiornamento, se avete bisogno di una mano con il test della nuova versione italiana contattatemi pure. Purtroppo non mi ero accorto prima di questo problema perché ad ogni nuova versione effettuiamo un aggiornamento e non un’installazione da zero.
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.