mirror of
https://github.com/unraid/webgui.git
synced 2026-01-18 15:40:09 -06:00
Merge pull request #695 from bergware/mutli-language
Multi-language support
This commit is contained in:
@@ -1,8 +1,12 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta name="viewport" content="width=1600">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<meta name="referrer" content="same-origin">
|
||||
<style>
|
||||
@font-face{
|
||||
@@ -79,7 +83,8 @@ function addLog(logLine) {
|
||||
}
|
||||
}
|
||||
function addCloseButton() {
|
||||
addLog("<p class='centered'><button class='logLine' type='button' onclick='" + (top.Shadowbox ? "top.Shadowbox" : "window") + ".close()'>Done</button></p>");
|
||||
var done = location.search.split('&').pop().split('=')[1];
|
||||
addLog("<p class='centered'><button class='logLine' type='button' onclick='" + (top.Shadowbox ? "top.Shadowbox" : "window") + ".close()'>"+done+"</button></p>");
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
@@ -358,10 +358,24 @@ foreach ($ports as $port) {
|
||||
<i class='fa fa-fw chevron' id='fan_view' onclick='toggleChevron("fan_view",0)'></i>
|
||||
<a href='/Dashboard/FanSettings' title="_(Go to fan settings)_"><i class='fa fa-fw fa-cog chevron'></i></a>
|
||||
</td><td></td></tr>
|
||||
<?for ($f=0; $f<$fans; $f+=2) {
|
||||
if ($f+1<$fans) echo "<tr class='fan_view'><td></td><td>"._("FAN")." ".($f)." - "._("FAN")." ".($f+1)."</td><td id='fan{$f}'>"."</td><td id='fan".($f+1)."'></td><td></td></tr>";
|
||||
else echo "<tr class='fan_view'><td></td><td>"._("FAN")." ".($f)."</td><td colspan='2' id='fan{$f}'></td><td></td></tr>";
|
||||
}?>
|
||||
<?
|
||||
$tr_fan = "<tr class='fan_view'><td></td>";
|
||||
$tr_end = "<td></td></tr>";
|
||||
$hdr = []; $row = []; $i = 0;
|
||||
$hdr[0] = $row[0] = $tr_fan;
|
||||
for ($fan=0; $fan<$fans; $fan++) {
|
||||
if ($fan && $fan%3==0) {
|
||||
$hdr[$i] .= $tr_end; $row[$i] .= $tr_end; $i++;
|
||||
$hdr[$i] = $row[$i] = $tr_fan;
|
||||
}
|
||||
$hdr[$i] .= "<td>"._('FAN')." $fan</td>";
|
||||
$row[$i] .= "<td id='fan$fan'></td>";
|
||||
}
|
||||
$rest = ($fans%3) ? 3-($fans%3) : 0;
|
||||
for ($fan=0; $fan<$rest; $fan++) $hdr[$i] .= "<td></td>"; $row[$i] .= "<td></td>";
|
||||
if ($rest) {$hdr[$i] .= $tr_end; $row[$i] .= $tr_end;}
|
||||
for ($n=0; $n<=$i; $n++) echo $hdr[$n].$row[$n];
|
||||
?>
|
||||
</tbody>
|
||||
<?endif;?>
|
||||
</table>
|
||||
|
||||
@@ -175,7 +175,8 @@ function chkDelete(form, button) {
|
||||
}
|
||||
function openBox(cmd,title,height,width,load,func,id) {
|
||||
// open shadowbox window (run in foreground)
|
||||
var run = cmd.split('?')[0].substr(-4)=='.php' ? cmd : '/logging.htm?cmd='+cmd+'&csrf_token=<?=$var['csrf_token']?>';
|
||||
var uri = cmd.split('?');
|
||||
var run = uri[0].substr(-4)=='.php' ? cmd+(uri[1]?'&':'?')+'done=<?=_("Done")?>' : '/logging.htm?cmd='+cmd+'&csrf_token=<?=$var["csrf_token"]?>&done=<?=_("Done")?>';
|
||||
var options = load ? (func ? {modal:true,onClose:function(){setTimeout(func+'('+'"'+(id||'')+'")',0);}} : {modal:true,onClose:function(){location=location;}}) : {modal:false};
|
||||
Shadowbox.open({content:run, player:'iframe', title:title, height:Math.min(height,screen.availHeight), width:Math.min(width,screen.availWidth), options:options});
|
||||
}
|
||||
@@ -632,7 +633,7 @@ $(function() {
|
||||
<?if ($notify['entity'] & 1 == 1):?>
|
||||
$.post('/webGui/include/Notify.php',{cmd:'init'},function(){timers.notifier = setTimeout(notifier,0);});
|
||||
<?endif;?>
|
||||
$('input[value="<?=_('Apply')?>"],input[value="Apply"],input[name="cmdEditShare"],input[name="cmdUserEdit"]').prop('disabled',true);
|
||||
$('input[value="<?=_("Apply")?>"],input[value="Apply"],input[name="cmdEditShare"],input[name="cmdUserEdit"]').prop('disabled',true);
|
||||
$('form').find('select,input[type=text],input[type=number],input[type=password],input[type=checkbox],input[type=radio],input[type=file],textarea').each(function(){$(this).on('input change',function() {
|
||||
var form = $(this).parentsUntil('form').parent();
|
||||
form.find('input[value="<?=_("Apply")?>"],input[value="Apply"],input[name="cmdEditShare"],input[name="cmdUserEdit"]').not('input.lock').prop('disabled',false);
|
||||
|
||||
@@ -18,13 +18,13 @@ function get_ini_key($key,$default) {
|
||||
$var = $x>0 ? substr($key,1,$x-1) : substr($key,1);
|
||||
global $$var;
|
||||
eval("\$var=$key;");
|
||||
return $var ? $var : $default;
|
||||
return $var ?: $default;
|
||||
}
|
||||
|
||||
function get_file_key($file,$default) {
|
||||
[$key, $default] = explode('=',$default,2);
|
||||
$var = @parse_ini_file($file);
|
||||
return isset($var[$key]) ? $var[$key] : $default;
|
||||
return $var[$key] ?? $default;
|
||||
}
|
||||
|
||||
function build_pages($pattern) {
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta http-equiv="Content-Security-Policy" content="block-all-mixed-content">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta name="viewport" content="width=1600">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<meta name="referrer" content="same-origin">
|
||||
<style>
|
||||
@font-face{
|
||||
|
||||
Reference in New Issue
Block a user