mirror of
https://github.com/e107inc/e107.git
synced 2025-04-21 21:21:54 +02:00
Merge pull request #1934 from MikeyGMT/mikey1610_10
#6 Cleanup Admin Languages and Lancheck
This commit is contained in:
commit
cd6bcc64b0
e107_admin
e107_languages/English
@ -139,7 +139,7 @@ if(isset($_POST['submit']))
|
||||
}
|
||||
else
|
||||
{
|
||||
$caption = LAN_CHECK_PAGE_TITLE.' - '.LAN_CHECK_24;
|
||||
$caption = LAN_CHECK_PAGE_TITLE.' - '.LAN_SUMMARY;
|
||||
$mes->addSuccess(sprintXXX(str_replace("[x]", "%s", LAN_CHECK_23), basename($writeit)));
|
||||
}
|
||||
fclose($writeit);
|
||||
@ -242,7 +242,7 @@ if(isset($_POST['language_sel']) && isset($_POST['language']))
|
||||
|
||||
$text .= "
|
||||
<fieldset id='core-lancheck-theme'>
|
||||
<legend>".LAN_CHECK_22."</legend>
|
||||
<legend>".LAN_THEME."</legend>
|
||||
<table class='table adminlist'>
|
||||
<colgroup>
|
||||
<col style='width: 25%' />
|
||||
@ -286,7 +286,7 @@ if(isset($_POST['language_sel']) && isset($_POST['language']))
|
||||
}
|
||||
|
||||
|
||||
$ns->tablerender(LAN_CHECK_25, $mes->render(). $text);
|
||||
$ns->tablerender(LAN_THEMES, $mes->render(). $text);
|
||||
|
||||
|
||||
|
||||
@ -1057,7 +1057,7 @@ class lancheck
|
||||
// Themes -------------
|
||||
$theme_header = "<table class='table table-striped'>
|
||||
<tr>
|
||||
<td class='fcaption'>".LAN_CHECK_22."</td>
|
||||
<td class='fcaption'>".LAN_THEME."</td>
|
||||
<td class='fcaption'>".LAN_CHECK_16."</td>
|
||||
<td class='fcaption'>".$lan."</td>
|
||||
<td class='fcaption'>".LAN_OPTIONS."</td></tr>";
|
||||
@ -1114,7 +1114,7 @@ class lancheck
|
||||
|
||||
$mes->add($message, $mesStatus);
|
||||
|
||||
// $ns -> tablerender(LAN_CHECK_24.": ".$lan,$message);
|
||||
// $ns -> tablerender(LAN_SUMMARY.": ".$lan,$message);
|
||||
|
||||
|
||||
|
||||
@ -1122,10 +1122,10 @@ class lancheck
|
||||
$ret['text'] = $mes->render();
|
||||
|
||||
$tabs = array(
|
||||
'core' => array('caption'=>'Front', 'text'=> $core_text),
|
||||
'admin' => array('caption'=> LAN_ADMIN, 'text'=>$core_admin),
|
||||
'plugin' => array('caption'=> ADLAN_CL_7, 'text'=>$plug_text),
|
||||
'theme' => array('caption'=> LAN_CHECK_25, 'text'=>$theme_text),
|
||||
'core' => array('caption'=> LAN_CHECK_26, 'text'=>$core_text),
|
||||
'admin' => array('caption'=> LAN_ADMIN, 'text'=>$core_admin),
|
||||
'plugin' => array('caption'=> ADLAN_CL_7, 'text'=>$plug_text),
|
||||
'theme' => array('caption'=> LAN_THEMES, 'text'=>$theme_text),
|
||||
);
|
||||
|
||||
$ret['text'] .= e107::getForm()->tabs($tabs);
|
||||
@ -1137,7 +1137,7 @@ class lancheck
|
||||
$ns -> tablerender(LANG_LAN_21.SEP.$lan.SEP.LAN_CHECK_2, $core_text);
|
||||
$ns -> tablerender(LAN_CHECK_3.": ".$lan."/admin", $core_admin);
|
||||
$ns -> tablerender(ADLAN_CL_7, $plug_text);
|
||||
$ns -> tablerender(LAN_CHECK_25, $theme_text); */
|
||||
$ns -> tablerender(LAN_THEMES, $theme_text); */
|
||||
//TODO Add a return statement here.
|
||||
}
|
||||
|
||||
@ -1847,12 +1847,12 @@ class lancheck
|
||||
$rowamount = round(strlen($trans['orig'][$sk])/34)+1;
|
||||
$hglt1=""; $hglt2="";
|
||||
if ($trans['tran'][$sk] == "" && $trans['orig'][$sk]!="") {
|
||||
$hglt1="<span class='label label-danger label-important e-tip' title='Missing' >";
|
||||
$hglt1="<span class='label label-danger label-important e-tip' title='".LAN_MISSING."'>";//Missing
|
||||
$hglt2="</span>";
|
||||
}
|
||||
elseif($trans['tran'][$sk] == $trans['orig'][$sk])
|
||||
{
|
||||
$hglt1="<span class='label label-warning e-tip' title='Identical' >";
|
||||
$hglt1="<span class='label label-warning e-tip' title='".LAN_CHECK_28."'>";//Identical
|
||||
$hglt2="</span>";
|
||||
}
|
||||
$text .="<tr>
|
||||
|
@ -79,7 +79,7 @@ if(!empty($_GET['iframe']))
|
||||
|
||||
if(e_DEVELOPER == true)
|
||||
{
|
||||
$this->adminMenu['main/deprecated'] = array('caption'=>'Deprecated LANs', 'perm'=>'0');
|
||||
$this->adminMenu['main/deprecated'] = array('caption'=>LANG_LAN_04, 'perm'=>'0');
|
||||
}
|
||||
|
||||
}
|
||||
@ -986,14 +986,14 @@ class lanDeveloper
|
||||
$new = $this->disableUnused($data);
|
||||
if(file_put_contents($_POST['disable-unused-lanfile'],$new))
|
||||
{
|
||||
$mes->addSuccess("Overwriting ".$_POST['disable-unused-lanfile']);
|
||||
$mes->addSuccess(LANG_LAN_135.$_POST['disable-unused-lanfile']);//Overwriting
|
||||
}
|
||||
else
|
||||
{
|
||||
$mes->addError("Couldn't overwrite ".$_POST['disable-unused-lanfile']);
|
||||
$mes->addError(LANG_LAN_136.$_POST['disable-unused-lanfile']);//Couldn't overwrite
|
||||
}
|
||||
|
||||
$ns->tablerender("Processed".SEP.$_POST['disable-unused-lanfile'],$mes->render()."<pre>".htmlentities($new)."</pre>");
|
||||
$ns->tablerender(LANG_LAN_137.SEP.$_POST['disable-unused-lanfile'],$mes->render()."<pre>".htmlentities($new)."</pre>");//Processed
|
||||
}
|
||||
|
||||
|
||||
@ -1035,7 +1035,7 @@ class lanDeveloper
|
||||
|
||||
if(!is_readable($scr))
|
||||
{
|
||||
$mes->addError("Not Readable: ".$scr);
|
||||
$mes->addError(LAN_NOTREADABLE.$scr);
|
||||
// $script = $scriptname; // matching files. lan_xxxx.php and xxxx.php
|
||||
}
|
||||
}
|
||||
@ -1158,10 +1158,10 @@ class lanDeveloper
|
||||
|
||||
$text .= "
|
||||
<tr>
|
||||
<td><div class='alert-info alert alert-block'>Hold down CTRL key to select multiple.<br />eg. To check <b>lan_signup.php</b> you'll want to also select <b>signup_shortcodes.php</b> and <b>signup_template.php</b>.</div></td>
|
||||
<td><div class='alert-info alert alert-block'>".LANG_LAN_140."</div></td>
|
||||
<td class='form-inline'>
|
||||
<select name='deprecatedLans[]' multiple style='height:200px'>
|
||||
<option value=''>Select Script...</option>";
|
||||
<option value=''>".LANG_LAN_141."</option>";
|
||||
|
||||
|
||||
$omit = array('languages','\.png','\.gif','handlers');
|
||||
@ -1176,7 +1176,7 @@ class lanDeveloper
|
||||
$srch = array(e_ADMIN,e_PLUGIN, e_CORE, e_BASE );
|
||||
|
||||
|
||||
$text .= "<optgroup label='Admin Area'>";
|
||||
$text .= "<optgroup label='".LAN_ADMIN."'>";
|
||||
foreach($lans as $script=>$lan)
|
||||
{
|
||||
if(in_array(basename($lan),$exclude))
|
||||
@ -1189,7 +1189,7 @@ class lanDeveloper
|
||||
|
||||
$text .= "</optgroup>";
|
||||
|
||||
$text .= "<optgroup label='Root'>";
|
||||
$text .= "<optgroup label='".LAN_ROOT."'>";
|
||||
foreach($root as $script=>$lan)
|
||||
{
|
||||
if(in_array(basename($lan),$exclude))
|
||||
@ -1203,7 +1203,7 @@ class lanDeveloper
|
||||
$text .= "</optgroup>";
|
||||
|
||||
|
||||
$text .= "<optgroup label='Templates'>";
|
||||
$text .= "<optgroup label='".LAN_TEMPLATES."'>";
|
||||
foreach($templates as $script=>$lan)
|
||||
{
|
||||
if(in_array(basename($lan),$exclude))
|
||||
@ -1216,7 +1216,7 @@ class lanDeveloper
|
||||
|
||||
$text .= "</optgroup>";
|
||||
|
||||
$text .= "<optgroup label='Shortcodes'>";
|
||||
$text .= "<optgroup label='".LAN_SHORTCODES."'>";
|
||||
foreach($shortcodes as $script=>$lan)
|
||||
{
|
||||
if(in_array(basename($lan),$exclude))
|
||||
@ -1228,7 +1228,8 @@ class lanDeveloper
|
||||
}
|
||||
|
||||
$text .= "</optgroup>";
|
||||
|
||||
|
||||
//TODO LANs - not sure if this can be replaced with LANS?
|
||||
$depOptions = array(
|
||||
1 => "Script > Lan File",
|
||||
0 => "Script < Lan File"
|
||||
@ -1249,7 +1250,7 @@ class lanDeveloper
|
||||
";
|
||||
|
||||
$selected = ($_POST['deprecatedLanFile'][0] == 'auto') ? "selected='selected'" :"";
|
||||
$text .= "<option value='auto' {$selected}>Auto-Detect</option><optgroup label='Specific LAN file:'>\n";
|
||||
$text .= "<option value='auto' {$selected}>".LANG_LAN_142."</option><optgroup label='".LANG_LAN_143."'>\n";//Auto-Detect
|
||||
|
||||
foreach($_SESSION['languageTools_lanFileList'] as $val)
|
||||
{
|
||||
@ -1277,7 +1278,7 @@ class lanDeveloper
|
||||
$text .= "</select>";
|
||||
|
||||
// $frm->select('deprecatedLanFile',$_SESSION['languageTools_lanFileList'], $_POST['deprecatedLanFile'],'class=select&useValues=1','Select Language File (optional)').
|
||||
$text .= $frm->admin_button('searchDeprecated',"Check",'other');
|
||||
$text .= $frm->admin_button('searchDeprecated',LAN_GO,'other');
|
||||
// $text .= "<span class='field-help'>".(count($lans) + count($plugs))." files found</span>";
|
||||
$text .= "
|
||||
</td>
|
||||
@ -1405,7 +1406,7 @@ class lanDeveloper
|
||||
if($disabled)
|
||||
{
|
||||
$text .= ADMIN_WARNING_ICON;
|
||||
$label = " <span class='label label-important label-danger'>Must be re-enabled</span>";
|
||||
$label = " <span class='label label-important label-danger'>".LANG_LAN_144."</span>";//Must be re-enabled
|
||||
$this->errors++;
|
||||
// $text .= "blabla";
|
||||
// $class = 'alert alert-warning';
|
||||
@ -1413,7 +1414,7 @@ class lanDeveloper
|
||||
elseif($reverse == true)
|
||||
{
|
||||
$value = ADMIN_TRUE_ICON;
|
||||
$value .= " Line:<b>".implode(", ",$found[$file]['count']) ."</b> "; // "' Found";
|
||||
$value .= " ".LAN_LINE."<b>".implode(", ",$found[$file]['count']) ."</b> "; // "' Found";
|
||||
foreach($found[$file]['line'] as $defLine)
|
||||
{
|
||||
$text .= print_a($defLine, true);
|
||||
@ -1422,7 +1423,7 @@ class lanDeveloper
|
||||
}
|
||||
else
|
||||
{
|
||||
$text .= " Line:<b>".implode(", ",$found[$file]['count']) ."</b> "; // "' Found";
|
||||
$text .= " ".LAN_LINE.":<b>".implode(", ",$found[$file]['count']) ."</b> "; // "' Found";
|
||||
}
|
||||
|
||||
}
|
||||
@ -1450,7 +1451,7 @@ class lanDeveloper
|
||||
else
|
||||
{
|
||||
// $color = "background-color:yellow";
|
||||
$value = "<a href='#' title=\"Missing\">".ADMIN_WARNING_ICON."</a>";
|
||||
$value = "<a href='#' title=".LAN_MISSING.">".ADMIN_WARNING_ICON."</a>";
|
||||
$this->errors++;
|
||||
$label = "<span class='label label-important label-danger'>".LANG_LAN_131."</span>";
|
||||
// $class = "alert alert-warning";
|
||||
@ -1461,7 +1462,7 @@ class lanDeveloper
|
||||
{
|
||||
// $color = "background-color:pink";
|
||||
$class = ' ';
|
||||
$label = " <span class='label label-important label-danger'>Unused</span>";
|
||||
$label = " <span class='label label-important label-danger'>".LAN_UNUSED."</span>";
|
||||
$text .= "-";
|
||||
$this->errors++;
|
||||
}
|
||||
@ -1496,7 +1497,7 @@ class lanDeveloper
|
||||
{
|
||||
$color = "font-style:italic";
|
||||
$class = 'muted text-important ';
|
||||
$label .= " <span class='label label-inverse'>Disabled</span>";
|
||||
$label .= " <span class='label label-inverse'>".LAN_DISABLED."</span>";
|
||||
}
|
||||
|
||||
if(empty($found) && $disabled === true)
|
||||
@ -1561,11 +1562,11 @@ class lanDeveloper
|
||||
$tmp = is_array($lanfile) ? $lanfile : explode(",", $lanfile);
|
||||
foreach($tmp as $scr)
|
||||
{
|
||||
$mes->addDebug("Script: ".$scr);
|
||||
$mes->addDebug("Script : ".$scr);
|
||||
|
||||
if(!file_exists($scr))
|
||||
{
|
||||
$mes->addError("reverse Mode: ".LANG_LAN_121." ".$scr);
|
||||
$mes->addError("Reverse Mode: ".LANG_LAN_121." ".$scr);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -1578,7 +1579,7 @@ class lanDeveloper
|
||||
}
|
||||
else
|
||||
{
|
||||
$mes->addDebug("NORMAL MODE ");
|
||||
$mes->addDebug("NORMAL MODE ");
|
||||
$lanDefines = '';
|
||||
foreach($lanfile as $arr)
|
||||
{
|
||||
@ -1592,7 +1593,7 @@ class lanDeveloper
|
||||
{
|
||||
if(!file_exists($scr))
|
||||
{
|
||||
$mes->addError("Normal mode: ".LANG_LAN_121." ".$scr);
|
||||
$mes->addError(LANG_LAN_148.": ".LANG_LAN_121." ".$scr);
|
||||
continue;
|
||||
}
|
||||
$compare[$scr] = file_get_contents($scr);
|
||||
@ -1607,12 +1608,12 @@ class lanDeveloper
|
||||
|
||||
if(!$compare)
|
||||
{
|
||||
$mes->addError("Line ".__LINE__.": ".LANG_LAN_121." ".$script);
|
||||
$mes->addError(LAN_LINE." ".__LINE__.": ".LANG_LAN_121." ".$script);
|
||||
}
|
||||
|
||||
if(!$lanDefines)
|
||||
{
|
||||
$mes->addError("Line ".__LINE__.": ".LANG_LAN_121." ".$lanfile);
|
||||
$mes->addError(LAN_LINE." ".__LINE__.": ".LANG_LAN_121." ".$lanfile);
|
||||
}
|
||||
|
||||
$srch = array("<?php","<?","?>");
|
||||
@ -1642,7 +1643,7 @@ class lanDeveloper
|
||||
|
||||
if($reverse == false)
|
||||
{
|
||||
$text .= "<th>Value</th>";
|
||||
$text .= "<th>".LANG_LAN_149."</th>";
|
||||
}
|
||||
|
||||
foreach($compare as $k=>$val)
|
||||
@ -1695,11 +1696,11 @@ class lanDeveloper
|
||||
|
||||
if($reverse != true)
|
||||
{
|
||||
$mes->addInfo("<b>Search ENTIRE core before commenting out ANY LAN from ANY language file.</b>");
|
||||
$mes->addInfo(LANG_LAN_150); //Search Everywhere before commenting out
|
||||
}
|
||||
|
||||
$ret['text'] = $mes->render().$text;
|
||||
$ret['caption'] = "Errors: ".intval($this->errors);
|
||||
$ret['caption'] = LAN_ERRORS.": ".intval($this->errors);
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
@ -125,6 +125,6 @@ define("LAN_SHOW", "Show");
|
||||
define("LAN_GENERATE", "Generate");
|
||||
define("LAN_SUMMARY", "Summary"); // TODO more files use summary replace
|
||||
define("LAN_REQUIRED_BLANK", "Required field(s) were left blank.");
|
||||
define("LAN_PLEASEWAIT", "Please Wait");
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -230,6 +230,7 @@ define("LAN_SAVED","Saved");
|
||||
define("LAN_SETSAVED","Your settings have been saved");
|
||||
define("LAN_NOCHANGE_NOTSAVED", "Nothing changed - not saved");
|
||||
define("LAN_CONFIRMDEL","Please confirm you wish to delete");
|
||||
define("LAN_ERRORS", "Errors");
|
||||
|
||||
define("LAN_OPTIONS","Options");
|
||||
define("LAN_PREFS","Preferences");
|
||||
@ -256,6 +257,9 @@ define("LAN_IMPORT","Import");
|
||||
// define("LAN_PRESET_DELETED","Preset successfully deleted");
|
||||
// define("LAN_PRESET_CONFIRMDEL","Are you sure you want to delete this preset?");
|
||||
define("LAN_NOTWRITABLE"," is not writable, you need to CHMOD 777 the file or folder first.");
|
||||
define("LAN_NOTREADABLE", "Not Readable");
|
||||
define("LAN_MISSING", "Missing");
|
||||
define("LAN_UNUSED", "Unused");
|
||||
|
||||
define("LAN_TIME","Time");
|
||||
// define("LAN_YES","Yes");
|
||||
@ -266,6 +270,7 @@ define("LAN_EXISTING","Existing Entries");
|
||||
define("LAN_CONFDELETE","Confirm Delete");
|
||||
define("LAN_PLUGIN","Plugin");
|
||||
define("LAN_THEMES","Themes");
|
||||
define("LAN_THEME","Theme");
|
||||
define("LAN_LATEST_e107_NEWS","Latest e107 News");
|
||||
define("LAN_WEBSITE_STATUS","Website Status");
|
||||
define("LAN_STATS","Stats");
|
||||
@ -274,6 +279,9 @@ define("LAN_ORDER","Order");
|
||||
|
||||
define("LAN_SELECT","Select ...");
|
||||
define("LAN_ADMIN","Admin");
|
||||
define("LAN_ROOT","Root");
|
||||
define("LAN_LINE","Line");
|
||||
define("LAN_SHORTCODES","Shortcodes");
|
||||
define("LAN_DISPLAYOPT", "Edit Display Options");
|
||||
// define("LAN_GOPAGE", "Go to page:");
|
||||
define("LAN_DATESTAMP","Date stamp");
|
||||
@ -361,6 +369,7 @@ define("LAN_COPY","Copy");
|
||||
define("LAN_KEYWORDS","Keywords");
|
||||
|
||||
define("LAN_TEMPLATE","Template");
|
||||
define("LAN_TEMPLATES","Templates");
|
||||
|
||||
// define("LAN_NONE", "None");
|
||||
define("LAN_CATEGORIES", "Categories");
|
||||
|
@ -17,12 +17,15 @@ define("LAN_CHECK_18", "Language files in the standard format are NOT available
|
||||
define("LAN_CHECK_19", "Non-UTF-8 characters found!");
|
||||
define("LAN_CHECK_20", "Generate Language Pack");
|
||||
define("LAN_CHECK_21", "Verify Again");
|
||||
define("LAN_CHECK_22", "Theme");
|
||||
//define("LAN_CHECK_22", "Theme");//LAN_THEME
|
||||
define("LAN_CHECK_23", "Errors Found");
|
||||
define("LAN_CHECK_24", "Summary");
|
||||
define("LAN_CHECK_25", "Themes");
|
||||
//define("LAN_CHECK_24", "Summary");//LAN_SUMMARY
|
||||
//define("LAN_CHECK_25", "Themes");//LAN_THEMES
|
||||
define("LAN_CHECK_26", "Front");
|
||||
define("LAN_CHECK_PAGE_TITLE", "Languages");
|
||||
define("LAN_CHECK_27", "Number of language-pack errors found");
|
||||
define("LAN_CHECK_28", "Identical");
|
||||
//define("LAN_CHECK_29", "Missing");
|
||||
|
||||
define("LANG_LAN_23", "Create Language-Pack (zip)");
|
||||
define("LANG_LAN_30", "Release Date");
|
||||
@ -40,4 +43,4 @@ define("LANG_LAN_120", "Please make sure you are using default folder names in e
|
||||
define("LANG_LAN_AGR", "Note: By using these tools you agree to share your language pack(s) with the e107 community.");
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@ -10,7 +10,7 @@ define("LANG_LAN_00", "[x] could not be created (already exists).");
|
||||
define("LANG_LAN_01", "[x] was deleted (if existing) and created.");
|
||||
define("LANG_LAN_02", "[x] couldn't be deleted.");
|
||||
define("LANG_LAN_03", "Tables");
|
||||
|
||||
define("LANG_LAN_04", "Deprecated LANs");
|
||||
define("LANG_LAN_05", "Not Installed");
|
||||
define("LANG_LAN_06", "Create tables");
|
||||
define("LANG_LAN_07", "Drop existing tables?");
|
||||
@ -31,6 +31,7 @@ define("LANG_LAN_21", "Language-Packs");
|
||||
define("LANG_LAN_25", "Language-Pack Creation Status");
|
||||
define("LANG_LAN_26", "Load language files only for current language");
|
||||
define("LANG_LAN_27", "If checked, and a required language cannot be found, there will be an error");
|
||||
define("LANG_LAN_28", "Check this box if you're an [e107 certified translator].");
|
||||
define("LANG_LAN_EML", "Please email your language pack to:");
|
||||
define("LANG_LAN_32", "Installed Languages");
|
||||
define("LANG_LAN_33", "Display only errors during verification");
|
||||
@ -52,5 +53,14 @@ define("LANG_LAN_131", "Missing from language file");
|
||||
define("LANG_LAN_132", "is a common phrase.");
|
||||
define("LANG_LAN_133", "Use");
|
||||
define("LANG_LAN_134", "instead.");
|
||||
|
||||
?>
|
||||
define("LANG_LAN_135", "Overwriting ");
|
||||
define("LANG_LAN_136", "Couldn't overwrite ");
|
||||
define("LANG_LAN_137", "Processed");
|
||||
define("LANG_LAN_140", "Hold down CTRL key to select multiple.[br]e.g. To check [b]lan_signup.php[/b] you'll want to also select [b]signup_shortcodes.php[/b] and [b]signup_template.php[/b].");
|
||||
define("LANG_LAN_141", "Select Script...");
|
||||
define("LANG_LAN_142", "Auto-Detect");
|
||||
define("LANG_LAN_143", "Specific LAN file:");
|
||||
define("LANG_LAN_144", "Must be re-enabled");
|
||||
define("LANG_LAN_149", "Value");
|
||||
define("LANG_LAN_150", "[b]Search ENTIRE core before commenting out ANY LAN from ANY language file.[/b]");
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user