
| Autor |
Nachricht |
Bohemen
phpBB2.de User


Anmeldungsdatum: 16.07.2003
Beiträge: 85
Wohnort: Stockholm/Sweden
|
Verfasst am:
So 05 Feb, 2006 02:22 |
  |
| Gnapponico hat folgendes geschrieben: |
I saw it...but...following all the instructions aixos posted...
but...
If in my lang_english folder there are 47 files... in lang_italian one there are 47 too... and... the admin navigation menu doesn't resume...
I've no ideas!
I used a check lang files script in order to compare all the missing strings of the two languages... and...
Look at this...
http://www.biotecnologiemediche.unito.it/check_lang_files.php
any ideas?
[ EDIT ]
ok... I found the error file...
I've downloaded my on-line board and installed in local ...well... in the ACP I've got some errors concerning a single file lanuage... I forgot some " \' " and now... the pane right is back!
thnx a lot 4 help...  |
Great...where do you find the language checker files ?? looks great |
|
|
    |
 |
Google
|
Verfasst am:
|
 |
|
|
 |
Gnapponico
phpBB2.de User


Anmeldungsdatum: 07.07.2004
Beiträge: 123
Wohnort: Torino, Italy
|
Verfasst am:
So 05 Feb, 2006 16:13 |
  |
mmm.... I don't remeber... (a Fully Modded MOD...may be...)
but...if you want...I post it...
It's in italian... if you need an English version...I'll translate it...
save this code in a php file (check_lang.php, 4 ex.)
| Code: |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;">
<meta http-equiv="Content-Style-Type" content="text/css">
<title> phpBB2 Plus :: Compare Language Files</title>
<script language="JavaScript" type="text/javascript">
<!--
window.status="Compare Language Files installed on this board"
// -->
</script>
<link rel="stylesheet" href="templates/subSilver/subSilver.css" type="text/css">
<style type="text/css">
<!--
body { background: url(templates/subSilver/images/background.gif) repeat-x; }
-->
</style>
</head>
<body>
<table width="95%" align="center" cellpadding="2" cellspacing="2">
<tr>
<td height="110"><a href="_2do_check_lang_files.php"><img src="templates/subSilver/images/logo_phpBB.gif" border="0"></a></td>
<td align="center"><span class="headtitle"><i>Comparing PhpBB2 Language Files</i></span></td>
</tr>
</table>
<br />
<table width="50%" align="center" cellpadding="3" cellspacing="1" class="forumline">
<tr>
<th class="thHead">Important Announcement</th>
</tr>
<tr>
<td class="row1">Due to some files containing functions, they can not be compared using this script.<br />
</td>
</tr>
</table>
<br />
<?php
define('IN_PHPBB', true);
define('IN_SMILIESUPLOAD_LANG', true);
define('IN_PRILLIAN_LANG', true);
define('IN_CONTACT_LANG', true);
// $board_config['default_lang'] =
// $phpEx =
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$phpEx = 'php';
$dirname = './language';
$lang = array();
function format_text($in)
{
$text = addslashes($in);
$code_entities_match = array('#<#', '#>#', '#"#', '#:#', '#\[#', '#\]#', '#\(#', '#\)#', '#\{#', '#\}#');
$code_entities_replace = array('<', '>', '"', ':', '[', ']', '(', ')', '{', '}');
$text = preg_replace($code_entities_match, $code_entities_replace, $text);
$text = str_replace(" ", " ", $text);
// now Replace 2 spaces with " " to catch odd #s of spaces.
$text = str_replace(" ", " ", $text);
// Replace tabs with " " so tabbed code indents sorta right without making huge long lines.
$text = str_replace("\t", " ", $text);
return nl2br($text);
}
function compare_files($source_lang, $dest_lang, $file_var)
{
global $dirname, $lang;
$lang = array();
print_r("<table width='100%' cellspacing='1' cellpadding='3' border='0' class='forumline' align='center'><th class='thTop'>Comparing Language File - " . $file_var . ".php</th></tr>");
print_r("<tr><td class='row1'><span class='maintitle'>- lang_" . $file_var . ".php</span><br />");
include($dirname . '/' . $source_lang . '/lang_' . $file_var . '.php');
$board_config['default_lang'] = $source_lang ;
$phpbb_root_path = './';
$phpEx = 'php';
$lang_entry_src = array();
$num_entries_src = 0;
@reset($lang);
while( list($key, $value) = each($lang) )
{
$lang_entry_src['key'][$num_entries_src] = $key;
$lang_entry_src['value'][$num_entries_src] = $value;
$num_entries_src++;
}
$lang = array();
print_r("Analizing and comparing to: <b>" . $dest_lang . "/lang_" . $file_var . ".php</b></td></tr><tr><td class='row2'>");
include($dirname . '/' . $dest_lang . '/lang_' . $file_var . '.php');
$board_config['default_lang'] = $dest_lang ;
$phpbb_root_path = './';
$phpEx = 'php';
$lang_entry_dst = array();
$num_entries_dst = 0;
@reset($lang);
while( list($key, $value) = each($lang) )
{
$lang_entry_dst['key'][$num_entries_dst] = $key;
$lang_entry_dst['value'][$num_entries_dst] = $value;
$num_entries_dst++;
}
$missing = array();
// Variabili di lingua Mancanti
for ($i = 0; $i < $num_entries_src; $i++)
{
if (!in_array($lang_entry_src['key'][$i], $lang_entry_dst['key']))
{
$missing['key'][] = $lang_entry_src['key'][$i];
$missing['value'][] = $lang_entry_src['value'][$i];
}
}
$not_needed = array();
// Variabili di lingua non più necessarie
for ($i = 0; $i < $num_entries_dst; $i++)
{
if (!in_array($lang_entry_dst['key'][$i], $lang_entry_src['key']))
{
$not_needed['key'][] = $lang_entry_dst['key'][$i];
$not_needed['value'][] = $lang_entry_dst['value'][$i];
}
}
// Elenca le variabili di lingua
print_r("<b>These Language Variables are <span style='color=#FF0000'>missing</span> from " . $dest_lang . "/lang_" . $file_var .".php</b><br />");
for ($i = 0; $i < count($missing['key']); $i++)
{
print_r("<span class=\"gensmall\">\$lang['" . $missing['key'][$i] . "'] = '" . format_text($missing['value'][$i]) . "';</span><br />");
}
print_r("<br /><b>These Language Variables are <span style='color=#FF0000'>no longer needed</span> in " . $dest_lang . "/lang_" . $file_var .".php</b><br />");
for ($i = 0; $i < count($not_needed['key']); $i++)
{
print_r("<span class=\"gensmall\">\$lang['" . $not_needed['key'][$i] . "'] = '" . format_text($not_needed['value'][$i]) . "';</span><br />");
}
print_r("</td></tr></table><br />");
}
$dir = opendir($dirname);
while ( $file = readdir($dir) )
{
if ( ereg("^lang_", $file) && !ereg("^lang_english", $file) && !is_file($dirname . '/' . $file) && !is_link($dirname . '/' . $file) )
{
compare_files('lang_english', $file, 'admin');
compare_files('lang_english', $file, 'admin_album');
compare_files('lang_english', $file, 'admin_attach');
compare_files('lang_english', $file, 'admin_hacks_list');
compare_files('lang_english', $file, 'admin_link');
compare_files('lang_english', $file, 'admin_pafiledb');
compare_files('lang_english', $file, 'admin_priv_msgs');
compare_files('lang_english', $file, 'admin_voting');
compare_files('lang_english', $file, 'admin_wpm');
compare_files('lang_english', $file, 'arcade');
compare_files('lang_english', $file, 'banner');
compare_files('lang_english', $file, 'bbcode');
compare_files('lang_english', $file, 'clown_album');
compare_files('lang_english', $file, 'color_groups');
compare_files('lang_english', $file, 'countdown');
compare_files('lang_english', $file, 'ctracker');
compare_files('lang_english', $file, 'dbmtnc');
compare_files('lang_english', $file, 'extend_announces');
compare_files('lang_english', $file, 'extend_categories_hierarchy');
compare_files('lang_english', $file, 'extend_merge');
compare_files('lang_english', $file, 'extend_meta_tags');
compare_files('lang_english', $file, 'extend_mods_settings');
compare_files('lang_english', $file, 'extend_post_icons');
compare_files('lang_english', $file, 'extend_ranks');
compare_files('lang_english', $file, 'extend_split_topic_type');
compare_files('lang_english', $file, 'extend_topic_calendar');
compare_files('lang_english', $file, 'faq');
compare_files('lang_english', $file, 'faq_attach');
compare_files('lang_english', $file, 'hierarchy_album');
compare_files('lang_english', $file, 'jr_admin');
compare_files('lang_english', $file, 'kb');
compare_files('lang_english', $file, 'main');
compare_files('lang_english', $file, 'main_album');
compare_files('lang_english', $file, 'main_attach');
compare_files('lang_english', $file, 'main_link');
compare_files('lang_english', $file, 'main_mini_cal');
compare_files('lang_english', $file, 'news');
compare_files('lang_english', $file, 'pafiledb');
compare_files('lang_english', $file, 'prune_users');
compare_files('lang_english', $file, 'statistics');
compare_files('lang_english', $file, 'weblog_admin');
compare_files('lang_english', $file, 'weblog_main');
compare_files('lang_english', $file, 'xs');
}
}
print_r("<div align='center' class='copyright'>Language Checker by <a href='http://www.opentools.de' target='_blank' class='copyright'>Acyd Burn</a> © 2002, 2003<br />Modified for <a href='http://www.phpbb2.de' target='_blank' class='copyright'>phpBB2 Plus</a></div>");
?> |
it's a usefull tool...
enjoy!  |
_________________
Zuletzt bearbeitet von Gnapponico am So 05 Feb, 2006 18:59, insgesamt 2-mal bearbeitet |
|
    |
 |
Bohemen
phpBB2.de User


Anmeldungsdatum: 16.07.2003
Beiträge: 85
Wohnort: Stockholm/Sweden
|
Verfasst am:
So 05 Feb, 2006 18:32 |
  |
Great....english version please....  |
|
|
    |
 |
Gnapponico
phpBB2.de User


Anmeldungsdatum: 07.07.2004
Beiträge: 123
Wohnort: Torino, Italy
|
Verfasst am:
So 05 Feb, 2006 19:00 |
  |
topic modified...
now..it's the english versione...for phpBB plus 1.53 beta... (and the others plus...I added some lang files to compare...) |
_________________
|
|
    |
 |
Bohemen
phpBB2.de User


Anmeldungsdatum: 16.07.2003
Beiträge: 85
Wohnort: Stockholm/Sweden
|
Verfasst am:
So 05 Feb, 2006 19:08 |
  |
GREAT nice script |
|
|
    |
 |
|
|
|
|
Gehe zu Seite Zurück 1, 2
|
Nächstes Thema anzeigen
Vorheriges Thema anzeigen
Du kannst keine Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum nicht antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen. Du kannst Dateien in diesem Forum nicht posten Du kannst Dateien in diesem Forum herunterladen
|
|
|