1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-05 23:25:30 +02:00

- adding a file which displays duplicate language keys

- removed a few duplicates with equal contents [Bug #1193]


git-svn-id: file:///svn/phpbb/trunk@5904 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Nils Adermann 2006-05-12 23:45:27 +00:00
parent 08e708f76b
commit 215693d897
18 changed files with 138 additions and 38 deletions

View File

@ -99,7 +99,7 @@
</select></td>
</tr>
<tr>
<td class="row1" width="40%"><b>{L_DIMENSIONS}: </b><br /><span class="gensmall">{L_DIMENSIONS_EXPLAIN}</span></td>
<td class="row1" width="40%"><b>{L_INCLUDE_DIMENSIONS}: </b><br /><span class="gensmall">{L_DIMENSIONS_EXPLAIN}</span></td>
<td class="row2"><input type="radio" name="imgsize" value="1"<!-- IF IMAGE_SIZE --> checked="checked"<!-- ENDIF --> /> {L_YES}&nbsp;&nbsp;<input type="radio" name="imgsize" value="0"<!-- IF not IMAGE_SIZE --> checked="checked"<!-- ENDIF --> /> {L_NO}</td>
</tr>
<tr>

View File

@ -0,0 +1,131 @@
<html>
<head>
<title>Duplicate Language Keys</title>
</head>
<body>
<?php
// -------------------------------------------------------------
//
// $Id$
//
// @copyright (c) 2005 phpBB Group
// @license http://opensource.org/licenses/gpl-license.php GNU Public License
//
// -------------------------------------------------------------
// Thanks to arod-1
define('IN_PHPBB', 1);
$phpEx = substr(strrchr(__FILE__, '.'), 1);
$phpbb_root_path='./../';
include($phpbb_root_path . 'common.'.$phpEx);
$mode = request_var('mode', '');
$modules = find_modules($phpbb_root_path . 'language/en');
$kkeys = $keys = array();
$langdir = dirname(__FILE__);
if (isset($lang))
{
unset($lang);
}
foreach($modules as $module)
{
require_once("$langdir$module");
if (isset($lang))
{
$kkeys[$module] = $lang;
$keys[] = $module;
unset($lang);
}
}
$equal = $case = $diff = 0;
$output = array();
while ($module = array_shift($keys))
{
$keys_1 = array_keys($kkeys[$module]);
foreach ($keys as $other_module)
{
$keys_2 = array_keys($kkeys[$other_module]);
foreach(array_intersect($keys_1, $keys_2) as $dup)
{
if ($kkeys[$module][$dup] == $kkeys[$other_module][$dup])
{
$compare = "Equal";
$equal++;
}
elseif (strcasecmp($kkeys[$module][$dup], $kkeys[$other_module][$dup]) == 0)
{
$compare = "Differ in case";
$case++;
}
else
{
$compare = "'{$kkeys[$module][$dup]}' - '{$kkeys[$other_module][$dup]}'";
$diff++;
}
$color = '';
if ((basename($module) == "common.$phpEx") || (basename($other_module) == "common.$phpEx"))
{
$color = ' style="color:#B00000;"';
}
switch ($mode)
{
case 'module':
$output[$module][] = "<tr$color><td>" . ((isset($output[$module])) ? '&nbsp;' : "<b>$module</b>" ) . "</td><td>$dup</td><td>$other_module</td><td>$compare</td></tr>";
break;
default:
$output[$dup][] = "<tr$color><td><b>$dup</b></td><td>$module</td><td>$other_module</td><td>$compare</td></tr>";
break;
}
}
}
}//var_dump($output);
echo "<p><a href=\"lang_duplicates.php\">By Key</a> <a href=\"lang_duplicates.php?mode=module\">By Module</a></p><p>Equal: <b>$equal</b>, Differ in case only: $case, differ in content: $diff</p>";
switch ($mode)
{
case 'module':
echo "<table cellpadding=\"4\"><tr><th>Key</th><th>First File</th><th>Second File</th><th>Difference</th></tr>";
foreach ($output as $module => $html)
{
echo implode('', $html);
}
break;
default:
ksort($output);
echo "<table cellpadding=\"4\"><tr><th>File</th><th>Key</th><th>Conflicting File</th><th>Difference</th></tr>";
foreach ($output as $dup)
{
echo implode('', $dup);
}
break;
}
echo "</table>";
function find_modules($dirname)
{
$list = glob("$dirname/*.php");
foreach(glob("$dirname/*", GLOB_ONLYDIR) as $name)
{
$list = array_merge($list, find_modules($name));
}
return $list;
}
?>
</body>
</html>

View File

@ -45,7 +45,6 @@ $lang = array_merge($lang, array(
'ALLOW_SELECTED_FORUMS' => 'Only Forums selected below',
'ASSIGNED_EXTENSIONS' => 'Assigned Extensions',
'ASSIGNED_GROUP' => 'Assigned Group',
'ATTACHMENTS' => 'Attachments',
'ATTACH_EXTENSIONS_URL' => 'Extensions',
'ATTACH_EXT_GROUPS_URL' => 'Extension Groups',
'ATTACH_MAX_FILESIZE' => 'Maximum filesize',

View File

@ -199,7 +199,6 @@ $lang = array_merge($lang, array(
'DEACTIVATE' => 'Deactivate',
'DIMENSIONS' => 'Dimensions',
'DISABLE' => 'Disable',
'DISPLAY' => 'Display',
'DOWNLOAD' => 'Download',
'DOWNLOAD_AS' => 'Download as',
'DOWNLOAD_STORE' => 'Download or Store file',

View File

@ -47,7 +47,6 @@ $lang = array_merge($lang, array(
'BACKUP_SUCCESS' => 'The backup file has been created successfully',
'STORE_AND_DOWNLOAD' => 'Store and Download',
'ACP_RESTORE' => 'Restore',
'ACP_RESTORE_EXPLAIN' => 'This will perform a full restore of all phpBB tables from a saved file. You can <u>either</u> upload the backup file via this form or upload it manually to a location on the server. If your server supports it you may use a gzip or bzip2 compressed text file and it will automatically be decompressed. <b>WARNING</b> This will overwrite any existing data. The restore may take a long time to process please do not move from this page till it is complete.',
'SELECT_FILE' => 'Select a file',
'RESTORE_OPTIONS' => 'Restore options',

View File

@ -55,7 +55,6 @@ $lang = array_merge($lang, array(
'ENABLE_RECENT_EXPLAIN' => 'If set to yes topics made to this forum will be shown in the active topics list.',
'ENABLE_TOPIC_ICONS' => 'Enable Topic Icons',
'FOLDER' => 'Folder',
'FORUM_ADMIN' => 'Forum Administration',
'FORUM_ADMIN_EXPLAIN' => 'In phpBB3 there are no categories, everything is forum based. Each forum can have an unlimited number of sub-forums and you can determine whether each may be posted to or not (i.e. whether it acts like an old category). Here you can add, edit, delete, lock, unlock individual forums as well as set certain additional controls. If your posts and topics have got out of sync you can also resynchronise a forum.',
'FORUM_AUTO_PRUNE' => 'Enable Auto-Pruning',
@ -70,7 +69,6 @@ $lang = array_merge($lang, array(
'FORUM_EDIT_EXPLAIN' => 'The form below will allow you to customise this forum. Please note that moderation and post count controls are set via forum permissions for each user or usergroup.',
'FORUM_IMAGE' => 'Forum Image',
'FORUM_IMAGE_EXPLAIN' => 'Location, relative to the phpBB root directory, of an image to associate with this forum.',
'FORUM_LINK' => 'Forum Link',
'FORUM_LINK_EXPLAIN' => 'Full URL (including the protocol, for example http://) to location clicking this forum will take the user.',
'FORUM_LINK_TRACK' => 'Track Link Redirects',
'FORUM_LINK_TRACK_EXPLAIN' => 'Records the number of times a forum link was clicked.',
@ -83,7 +81,6 @@ $lang = array_merge($lang, array(
'FORUM_PASSWORD_EXPLAIN' => 'Defines a password for this forum, use the permission system in preference.',
'FORUM_PASSWORD_MISMATCH' => 'The passwords you entered did not match.',
'FORUM_RESYNCED' => 'Forum "%s" successfully resynced',
'FORUM_RULES' => 'Forum Rules',
'FORUM_RULES_EXPLAIN' => 'Forum Rules are displayed at any page within the given forum.',
'FORUM_RULES_LINK' => 'Link to Forum Rules',
'FORUM_RULES_LINK_EXPLAIN' => 'You are able to enter the URL of the page/post containing your forum rules here. This setting will override the Forum Rules text you specified.',
@ -122,8 +119,6 @@ $lang = array_merge($lang, array(
'REDIRECT_ACL' => 'Now you are able to %sset permissions%s for this forum.',
'RESYNC' => 'Sync',
'SUBFORUM' => 'Subforum',
'TYPE_CAT' => 'Category',
'TYPE_FORUM' => 'Forum',
'TYPE_LINK' => 'Link',

View File

@ -56,11 +56,7 @@ $lang = array_merge($lang, array(
'GROUP_DETAILS' => 'Group details',
'GROUP_DST' => 'Group daylight savings',
'GROUP_EDIT_EXPLAIN' => 'Here you can edit an existing group. You can change its name, description and type (open, closed, etc.). You can also set certain groupwide options such as colouration, rank, etc. Changes made here override users current settings. Please note that group members can alter their avatar unless you set appropriate user permissions.',
'GROUP_ERR_DESC_LONG' => 'Group description too long.',
'GROUP_ERR_TYPE' => 'Inappropriate group type specified.',
'GROUP_ERR_USERNAME' => 'No group name specified.',
'GROUP_ERR_USERS_EXIST' => 'The specified users are already members of this group',
'GROUP_ERR_USER_LONG' => 'Group name too long.',
'GROUP_HIDDEN' => 'Hidden',
'GROUP_LANG' => 'Group language',
'GROUP_LEAD' => 'Group leaders',
@ -95,7 +91,6 @@ $lang = array_merge($lang, array(
'NO_GROUP' => 'No group specified',
'NO_PERMISSIONS' => 'Do not copy permissions',
'NO_USERS' => 'The requested users do not exist',
'SPECIAL_GROUPS' => 'Predefined groups',
'SPECIAL_GROUPS_EXPLAIN' => 'Pre-defined groups are special groups, they cannot be deleted or directly modified. However you can still add users and alter basic settings. By clicking "Default" you can set the relevant group to the default for all its members.',

View File

@ -78,7 +78,6 @@ $lang = array_merge($lang, array(
'CURRENT_ICONS' => 'Current icons',
'CURRENT_SMILIES' => 'Current smilies',
'DELETE_ALL' => 'Delete all',
'DISPLAY_ON_POSTING' => 'Display on posting',
'EDIT_ICONS' => 'Edit Icons',

View File

@ -32,7 +32,6 @@ if (empty($lang) || !is_array($lang))
$lang = array_merge($lang, array(
'ACP_PRUNE_USERS_EXPLAIN' => 'Here you can delete (or deactivate) users from you board. This can be done in a variety of ways; by post count, last activity, etc. Each of these criteria can be combined, i.e. you can prune users last active before 2002-01-01 with fewer than 10 posts. Alternatively you can enter a list of users directly into the text box, any criteria entered will be ignored. Take care with this facility! Once a user is deleted there is no way back.',
'DEACTIVATE' => 'Deactivate',
'DEACTIVATE_DELETE' => 'Deactivate or delete',
'DEACTIVATE_DELETE_EXPLAIN' => 'Choose whether to deactivate users or delete them entirely, note there is no undo!',
'DELETE_USERS' => 'Delete',

View File

@ -30,7 +30,6 @@ if (empty($lang) || !is_array($lang))
$lang = array_merge($lang, array(
'ACP_SEARCH_INDEX_EXPLAIN' => 'Here you can manage the search backend\'s indexes. Since you normally use only one backend you should delete all indexes that you do not make use of. After altering some of the search settings (e.g. the number of minimum/maximum chars) it might be worth recreating the index so it reflects those changes.',
'ACP_SEARCH_SETTINGS' => 'Search Settings',
'ACP_SEARCH_SETTINGS_EXPLAIN' => 'Here you can define what search backend will be used for indexing posts and performing searches. You can set various options that can influence how much processing these actions require. Some of these settings are the same for all search engine backends.',
'CONFIRM_SEARCH_BACKEND' => 'Are you sure you wish to switch to a different search backend? After changing the search backend you will have to create an index for the new search backend. If you don\'t plan on switching back to the old search backend you can also delete the old backend\'s index in order to free system resources.',

View File

@ -77,8 +77,6 @@ $lang = array_merge($lang, array(
'EDIT_TEMPLATE_STORED_DB' => 'The template file was unwritable so the template set is now stored in the database containing the modified file.',
'EXPORT' => 'Export',
'FROM' => 'from', // "Create new style .... from ..."
'IMAGE_CONFIGURATION' => 'Image configuration',
'IMAGE_WIDTH' => 'Image width',
'IMAGE_HEIGHT' => 'Image height',
@ -231,7 +229,7 @@ $lang = array_merge($lang, array(
'IMAGE' => 'Image',
'CURRENT_IMAGE' => 'Current Image',
'SELECTED_IMAGE' => 'Selected Image',
'DIMENSIONS' => 'Include dimensions',
'INCLUDE_DIMENSIONS' => 'Include dimensions',
'DIMENSIONS_EXPLAIN' => 'Selecting yes here will include width/height parameters.',
'IMAGE_PARAMETER' => 'Parameter',
'IMAGE_VALUE' => 'Value',

View File

@ -106,7 +106,6 @@ $lang = array_merge($lang, array(
'USER_SIG_UPDATED' => 'User signature successfully updated',
'USER_TOOLS' => 'Basic tools',
'WARNINGS' => 'Warnings',
'WARNINGS_EXPLAIN' => 'You can directly alter the warnings this users has received.',
));

View File

@ -220,12 +220,6 @@ $lang = array_merge($lang, array(
'LAST_POST' => 'Last Post',
'LAST_UPDATED' => 'Last Updated',
'LDAP_DN' => 'LDAP base dn',
'LDAP_DN_EXPLAIN' => 'This is the Distinguished Name, locating the user information, e.g. o=My Company,c=US',
'LDAP_SERVER' => 'LDAP server name',
'LDAP_SERVER_EXPLAIN' => 'If using LDAP this is the name or IP address of the server.',
'LDAP_UID' => 'LDAP uid',
'LDAP_UID_EXPLAIN' => 'This is the key under which to search for a given login identity, e.g. uid, sn, etc.',
'LEGEND' => 'Legend',
'LOCATION' => 'Location',
'LOCK_POST' => 'Lock Post',
@ -330,7 +324,7 @@ $lang = array_merge($lang, array(
'POSTS' => 'Posts',
'POST_BY_FOE' => 'This post was made by <b>%1$s</b> who is currently on your ignore list. To display this post click %2$sHERE%3$s.',
'POST_DAY' => '%.2f posts per day',
'POST_DETAILS' => 'Post Details',
'POST_DETAILS' => 'Post details',
'POST_NEW_TOPIC' => 'Post new topic',
'POST_PCT' => '%.2f%% of all posts',
'POST_REPORTED' => 'Click to view report',
@ -397,7 +391,7 @@ $lang = array_merge($lang, array(
'SEARCH' => 'Search',
'SEARCH_ADV' => 'Advanced Search',
'SEARCH_ADV_EXPLAIN' => 'View the advanced search options',
'SEARCH_KEYWORDS' => 'Enter search keywords',
'SEARCH_KEYWORDS' => 'Search for keywords',
'SEARCHING_FORUMS' => 'Searching forums',
'SEARCH_ACTIVE_TOPICS' => 'View active topics',
'SEARCH_FOR' => 'Search for',
@ -494,7 +488,7 @@ $lang = array_merge($lang, array(
'VIEWING_FAQ' => 'Viewing FAQ',
'VIEWING_MEMBERS' => 'Viewing member details',
'VIEWING_ONLINE' => 'Viewing who is online',
'VIEWING_PROFILE' => 'Viewing member profile',
'VIEWING_MEMBER_PROFILE' => 'Viewing member profile',
'VIEWING_UCP' => 'Viewing user control panel',
'VIEWS' => 'Views',
'VIEW_BOOKMARKS' => 'View bookmarks',

View File

@ -235,7 +235,6 @@ $lang = array_merge($lang, array(
'POST_APPROVED_SUCCESS' => 'The selected post has been approved',
'POST_DELETED_SUCCESS' => 'The selected post has been successfully removed from the database',
'POST_DISAPPROVED_SUCCESS' => 'The selected post has been disapproved',
'POST_DETAILS' => 'Post details',
'POST_LOCKED_SUCCESS' => 'Post locked successfully',
'POST_NOT_EXIST' => 'The post you requested does not exist',
'POST_REPORTED_SUCCESS' => 'This post has been successfully reported',

View File

@ -63,10 +63,8 @@ $lang = array_merge($lang, array(
'CANNOT_POST_STICKY' => 'Sorry but you cannot post sticky topics.',
'CHANGE_TOPIC_TO' => 'Change topic type to',
'CLOSE_TAGS' => 'Close Tags',
'CLOSE_WINDOW' => 'Close Window',
'CURRENT_TOPIC' => 'Current Topic',
'DAYS' => 'Days',
'DELETE_FILE' => 'Delete File',
'DELETE_MESSAGE' => 'Delete Message',
'DELETE_MESSAGE_CONFIRM' => 'Are you sure you want to delete this message?',

View File

@ -59,13 +59,12 @@ $lang = array_merge($lang, array(
'SEARCHED_TOPIC' => 'Searched topic',
'SEARCH_ALL_TERMS' => 'Search for all terms or use query as entered',
'SEARCH_ANY_TERMS' => 'Search for any terms',
'SEARCH_AUTHOR' => 'Search for Author',
'SEARCH_AUTHOR' => 'Search for author',
'SEARCH_AUTHOR_EXPLAIN' => 'Use * as a wildcard for partial matches',
'SEARCH_FIRST_POST' => 'First post of topics only',
'SEARCH_FORUMS' => 'Search in forums',
'SEARCH_FORUMS_EXPLAIN' => 'Select the forum or forums you wish to search in. For speed all subforums can be searched by selecting the parent and setting enable search subforums below.',
'SEARCH_IN_RESULTS' => 'Search these results',
'SEARCH_KEYWORDS' => 'Search for Keywords',
'SEARCH_KEYWORDS_EXPLAIN' => 'Place <b>+</b> in front of a word which must be found and <b>-</b> in front of a word which must not be found. If you place <b>|</b> in front of words, each result has to contain at least one of these words. Use * as a wildcard for partial matches',
'SEARCH_MSG_ONLY' => 'Message text only',
'SEARCH_OPTIONS' => 'Search Options',

View File

@ -127,7 +127,6 @@ $lang = array_merge($lang, array(
'DEFAULT_SMILIES' => 'Enable smilies by default',
'DEFINED_RULES' => 'Defined Rules',
'DELETED_TOPIC' => 'Topic has been removed',
'DELETE_ALL' => 'Delete all',
'DELETE_ATTACHMENT' => 'Delete Attachment',
'DELETE_ATTACHMENTS' => 'Delete Attachments',
'DELETE_ATTACHMENT_CONFIRM' => 'Are you sure you want to delete this attachment?',
@ -400,7 +399,6 @@ $lang = array_merge($lang, array(
'UCP_ZEBRA_FOES' => 'Foes',
'UCP_ZEBRA_FRIENDS' => 'Friends',
'UNKNOWN_FOLDER' => 'Unknown Folder',
'UNREAD_MESSAGES' => 'Unread Messages',
'UNWATCH_MARKED' => 'Unwatch marked',
'UPLOAD_AVATAR_FILE' => 'Upload from your machine',
'UPLOAD_AVATAR_URL' => 'Upload from a URL',

View File

@ -239,7 +239,7 @@ while ($row = $db->sql_fetchrow($result))
break;
case 'memberlist':
$location = (strpos($row['session_page'], 'mode=viewprofile') !== false) ? $user->lang['VIEWING_PROFILE'] : $user->lang['VIEWING_MEMBERS'];
$location = (strpos($row['session_page'], 'mode=viewprofile') !== false) ? $user->lang['VIEWING_MEMBER_PROFILE'] : $user->lang['VIEWING_MEMBERS'];
$location_url = "memberlist.$phpEx$SID";
break;