Merge pull request #700 from bergware/mutli-language

Multi-language support
This commit is contained in:
tom mortensen
2020-06-04 13:07:20 -07:00
committed by GitHub
7 changed files with 13 additions and 13 deletions

View File

@@ -77,9 +77,9 @@ function loadlist(id) {
$(function() {
loadlist();
$('#plugin_tree').fileTree({root:'/boot/',filter:'plg'}, function(file) {$('#plugin_file').val(file);});
$('.tabs').append("<span id='updateall' class='status vhshift' style='display:none;margin-left:12px'><input type='button' value='_(Update All Plugins)_' onclick='openBox(\"/plugins/dynamix.plugin.manager/scripts/plugin&arg1=updateall\",\"_(Update All Plugins)_\",600,600,true,\"loadlist\",\":return\")'></span>");
$('.tabs').append("<span id='updateall' class='status vhshift' style='display:none;margin-left:12px'><input type='button' value='<?=my_lang('Update All Plugins',4)?>' onclick='openBox(\"/plugins/dynamix.plugin.manager/scripts/plugin&arg1=updateall\",\"<?=my_lang('Update All Plugins',4)?>\",600,600,true,\"loadlist\",\":return\")'></span>");
<?if ($check):?>
$('.tabs').append("<span id='checkall' class='status vhshift'><input type='button' value='_(Check For Updates)_' onclick='openBox(\"/plugins/dynamix.plugin.manager/scripts/plugin&arg1=checkall\",\"_(Plugin Update Check)_\",600,600,true,\"loadlist\",\":return\")' disabled></span>");
$('.tabs').append("<span id='checkall' class='status vhshift'><input type='button' value='<?=my_lang('Check For Updates',4)?>' onclick='openBox(\"/plugins/dynamix.plugin.manager/scripts/plugin&arg1=checkall\",\"<?=my_lang('Plugin Update Check',4)?>\",600,600,true,\"loadlist\",\":return\")' disabled></span>");
<?endif;?>
});
</script>

View File

@@ -85,7 +85,7 @@ function loadlist(id) {
$(function() {
loadlist();
<?if ($check):?>
$('.tabs').append("<span class='status vhshift'><input type='button' id='checkos' value=&quot;_(Check for Updates)_&quot; onclick='openBox(\"/plugins/dynamix.plugin.manager/scripts/plugin&arg1=checkos\",\"_(System Update Check)_\",600,600,true,\"loadlist\",\":return\")' disabled></span>");
$('.tabs').append("<span class='status vhshift'><input type='button' id='checkos' value='<?=my_lang('Check for Updates',4)?>' onclick='openBox(\"/plugins/dynamix.plugin.manager/scripts/plugin&arg1=checkos\",\"<?=my_lang('System Update Check',4)?>\",600,600,true,\"loadlist\",\":return\")' disabled></span>");
<?endif;?>
});
</script>

View File

@@ -203,7 +203,7 @@ _(VFIO allow unsafe interrupts)_:
</div>
<?if (file_exists("/var/log/libvirt/libvirtd.log")):?>
<input type="button" onclick="openWindow('/webGui/scripts/tail_log&arg1=libvirt/libvirtd.log','_(Libvirt Log)_',600,900);" value="_(View libvirt log)_"/>
<input type="button" onclick="openWindow('/webGui/scripts/tail_log&arg1=libvirt/libvirtd.log','<?=my_lang('Libvirt Log',4)?>',600,900);" value="_(View libvirt log)_"/>
<?else:?>
&nbsp;
<?endif;?>
@@ -392,8 +392,8 @@ $(function(){
<?if ($hardware):?>
$('.advancedview').switchButton({
labels_placement: "left",
on_label: '_(Advanced View)_',
off_label: '_(Basic View)_',
on_label: "_(Advanced View)_",
off_label: "_(Basic View)_",
checked: $.cookie('vmsettings_view_mode') == 'advanced'
});
$('.advancedview').change(function(){

View File

@@ -316,7 +316,7 @@ function formatWarning(val) {
<tr><td>_(Parity is valid)_.</td><td><input type="submit" name="cmdCheck" value="_(Check)_"></td><td>**_(Check)_** _(will start **Parity-Check**)_.&nbsp;&nbsp;<a href="/Main/Scheduler"<?if ($tabbed):?> onclick="$.cookie('one','tab1',{path:'/'})"<?endif;?>>(_(Schedule)_)</a>
<br><input type="checkbox" name="optionCorrect" value="correct" checked><small>_(Write corrections to parity)_</small></td></tr>
<? endif;?>
<tr><td></td><td><input type="button" value="_(History)_" onclick="openBox('/webGui/include/ParityHistory.php','_(Parity/Read-Check History)_',600,900,false)"></td>
<tr><td></td><td><input type="button" value="_(History)_" onclick="openBox('/webGui/include/ParityHistory.php','<?=my_lang('Parity/Read-Check History',4)?>',600,900,false)"></td>
<? if ($var['sbSyncExit']!=0):?>
<td class="wrap"><?=sprintf(_('Last check incomplete on **%s**'),my_lang(my_time($var['sbSynced2']).day_count($var['sbSynced2'])))?><?if ($var['sbSynced2']):?><br><?=sprintf(_('Finding **%s** error'.($var['sbSyncErrs']==1?'':'s')),$var['sbSyncErrs']?:'0')?><?endif;?>
<i class="fa fa-fw fa-dot-circle-o"></i>_(Error code)_: <?=my_error($var['sbSyncExit'])?></td></tr>
@@ -368,7 +368,7 @@ function formatWarning(val) {
<input type="button" id="cancelButton" value="_(Cancel)_" onclick="stopParity(this.form,'Clearing')"></td>
<td id="cancelText"><?if ($var['mdResync']):?>**_(Pause)_** _(will pause the Clearing)_.<?else:?>**_(Resume)_** _(will resume the paused Clearing)_.<?endif;?><br>**_(Cancel)_** _(will stop Clearing)_.</td></tr>
<? endif;?>
<tr><td></td><td><input type="button" value="_(History)_" onclick="openBox('/webGui/include/ParityHistory.php','_(Parity/Read-Check History)_',600,900,false)"></td>
<tr><td></td><td><input type="button" value="_(History)_" onclick="openBox('/webGui/include/ParityHistory.php','<?=my_lang('Parity/Read-Check History',4)?>',600,900,false)"></td>
<td><?=sprintf(_('Current operation %s on **%s**'),($var['mdResync']?_('started'):_('paused')),my_lang(my_time($var['sbUpdated']).day_count($var['sbSynced'])))?></td></tr>
<tr><td>_(Total size)_:</td><td id="line0"></td><td></td></tr>
<tr><td>_(Elapsed time)_:</td><td id="line1"></td><td></td></tr>

View File

@@ -64,7 +64,7 @@ _(Flash GUID)_:
: <?=$var['flashGUID']?>
<span class="device"><?=$attached_devices?></span>
: <input type="submit" value="_(Purchase Key)_"><input type="button" value="_(Get Trial Key)_" onclick="openBox('/webGui/include/TrialRequest.php','_(Get Trial Key)_',300,600);">
: <input type="submit" value="_(Purchase Key)_"><input type="button" value="_(Get Trial Key)_" onclick="openBox('/webGui/include/TrialRequest.php','<?=my_lang('Get Trial Key',4)?>',300,600);">
</form>
<?endif;?>
@@ -184,7 +184,7 @@ _(Flash GUID)_:
: <?=$var['flashGUID']?>
<span class="device"><?=$attached_devices?></span>
: <input type="submit" value="_(Purchase Key)_"><input type="button" value="_(Request Extension)_" onclick="openBox('/webGui/include/TrialRequest.php','_(Request Trial Extension)_',300,600);">
: <input type="submit" value="_(Purchase Key)_"><input type="button" value="_(Request Extension)_" onclick="openBox('/webGui/include/TrialRequest.php','<?=my_lang('Request Trial Extension',4)?>',300,600);">
</form>
<?endif;?>

View File

@@ -23,8 +23,8 @@ $width = [166,300];
?>
<script>
$(function() {
$('#s1').dropdownchecklist({emptyText:'_(All)_', width:<?=$width[0]?>, explicitClose:'..._(close)_'});
$('#s2').dropdownchecklist({emptyText:'_(None)_', width:<?=$width[0]?>, explicitClose:'..._(close)_'});
$('#s1').dropdownchecklist({emptyText:"_(All)_", width:<?=$width[0]?>, explicitClose:"..._(close)_"});
$('#s2').dropdownchecklist({emptyText:"_(None)_", width:<?=$width[0]?>, explicitClose:"..._(close)_"});
presetShare(document.share_settings);
});
// Simulate the original input field

View File

@@ -36,7 +36,7 @@ $(function() {
function mailcheck(form) {
var email = /^\S+@\S+\.\S+/;
if (!email.test(form.root.value)) {
swal({title:"_(Invalid email address)_",text:"_(Please enter a valid sending email address)_",type:"error",confirmButtonText:'_(Ok)_'});
swal({title:"_(Invalid email address)_",text:"_(Please enter a valid sending email address)_",type:"error",confirmButtonText:"_(Ok)_"});
return false;
}
return true;