diff --git a/plugins/dynamix.apcupsd/UPSdetails.page b/plugins/dynamix.apcupsd/UPSdetails.page index 218abed8b..c9464ace3 100644 --- a/plugins/dynamix.apcupsd/UPSdetails.page +++ b/plugins/dynamix.apcupsd/UPSdetails.page @@ -3,8 +3,8 @@ Title="UPS Details" Tag="battery-3" --- - +
KeyValueKeyValue
_(Key)__(Value)__(Key)__(Value)_
diff --git a/plugins/dynamix.apcupsd/UPSsettings.page b/plugins/dynamix.apcupsd/UPSsettings.page index 1fca4f067..363f69210 100644 --- a/plugins/dynamix.apcupsd/UPSsettings.page +++ b/plugins/dynamix.apcupsd/UPSsettings.page @@ -45,57 +45,64 @@ $(function() { }); style="display:none"> - +
UPS StatusBattery ChargeRuntime LeftNominal PowerUPS LoadUPS Load %
_(UPS Status)__(Battery Charge)__(Runtime Left)__(Nominal Power)__(UPS Load)__(UPS Load)_ %
 
- Online Manual + _(Online Manual)_ -Start APC UPS daemon: -: + + +:help155 > Set to 'Yes' to enable apcupsd and start the daemon, set to 'No' to disable apcupsd and stop the daemon. +:end -UPS cable: -: + + + + + +:help156 > Defines the type of cable connecting the UPS to your computer.Possible generic choices for 'cable' are: > > + USB, Simple, Smart, Ether, or Custom to specify a special cable. +:end -Custom UPS cable: +_(Custom UPS cable)_: : +:help157 > Specify a special cable by model number, only applicable when *UPS cable* is set to Custom. > > + 940-0119A, 940-0127A, 940-0128A, 940-0020B > + 940-0020C, 940-0023A, 940-0024B, 940-0024C > + 940-1524C, 940-0024G, 940-0095A, 940-0095B > + 940-0095C, 940-0625A, M-04-02-2000 +:end -UPS type: -: + + + + + + + +:help158 > Define a *UPS type*, which corresponds to the type of UPS you have (see the Description for more details). > > + **USB** - most new UPSes are USB @@ -105,10 +112,12 @@ UPS type: > + **Dumb** - old serial character device for use with simple-signaling UPSes > + **PCnet** - PowerChute Network Shutdown protocol which can be used as an alternative to SNMP with the AP9617 family of smart slot cards > + **ModBus** - serial device for use with newest SmartUPS models supporting the MODBUS protocol +:end -Device: +_(Device)_: : +:help159 > Enter the *device* which correspondes to your situation, only applicable when *UPS type* is not set to USB. > > + **apcsmart** - /dev/tty** @@ -117,20 +126,26 @@ Device: > + **dumb** - /dev/tty** > + **pcnet** - ipaddr:username:passphrase:port. ipaddr is the IP address of the UPS management card. username and passphrase are the credentials for which the card has been configured. port is the port number on which to listen for messages from the UPS, normally 3052. If this parameter is empty or missing, the default of 3052 will be used > + **modbus** - /dev/tty** +:end -Battery level to initiate shutdown (%): +_(Battery level to initiate shutdown)_ (%): : +:help160 > If during a power failure, the remaining battery percentage (as reported by the UPS) is below or equal to *Battery level*, apcupsd will initiate a system shutdown. +:end -Runtime left to initiate shutdown (minutes): +_(Runtime left to initiate shutdown)_ (_(minutes)_): : +:help161 > If during a power failure, the remaining runtime in minutes (as calculated internally by the UPS) is below or equal to *minutes*, apcupsd, will initiate a system shutdown. +:end -Time on battery before shutdown (seconds): +_(Time on battery before shutdown)_ (_(seconds)_): : +:help162 > If during a power failure, the UPS has run on batteries for *time-out* many seconds or longer; apcupsd will initiate a system shutdown. A value of zero disables this timer. > > If you have a Smart UPS, you will most likely want to disable this timer by setting it to zero. @@ -138,17 +153,22 @@ Time on battery before shutdown (seconds): > > Of course - when testing - setting this to 60 causes a quick system shutdown if you pull the power plug. > If you have an older dumb UPS, you will want to set this to less than the time you know you can run on batteries. +:end
+:help163 > **Note:** *Battery level*, *Runtime left*, and *Time on battery* work in conjunction, so the first that occurs will cause the initiation of a shutdown. +:end -Turn off UPS after shutdown: -: + + +:help164 > Set to *Yes* to turn off the power to the UPS after a shutdown. +:end - -: + +:
diff --git a/plugins/dynamix.apcupsd/include/UPSstatus.php b/plugins/dynamix.apcupsd/include/UPSstatus.php index 797f4497c..b985e2689 100644 --- a/plugins/dynamix.apcupsd/include/UPSstatus.php +++ b/plugins/dynamix.apcupsd/include/UPSstatus.php @@ -1,7 +1,7 @@ 'Online (trim)', 'BOOST ONLINE' => 'Online (boost)', @@ -36,7 +41,7 @@ if (file_exists("/var/run/apcupsd.pid")) { $val = strtr($row[1], $state); switch ($key) { case 'STATUS': - $status[0] = $val ? (stripos($val,'online')===false ? "$val" : "$val") : "Refreshing..."; + $status[0] = $val ? (stripos($val,'online')===false ? "$val" : "$val") : ""._('Refreshing')."..."; break; case 'BCHARGE': $status[1] = strtok($val,' ')<=10 ? "$val" : "$val"; @@ -60,9 +65,9 @@ if (file_exists("/var/run/apcupsd.pid")) { } } if ($all && count($rows)%2==1) $result[] = ""; - if ($power && $load) $status[4] = ($load>=90 ? "" : "").intval($power*$load/100)." Watts"; + if ($power && $load) $status[4] = ($load>=90 ? "" : "").intval($power*$load/100)." "._('Watts').""; } -if ($all && !$rows) $result[] = "No information available"; +if ($all && !$rows) $result[] = ""._('No information available').""; echo "".implode('', $status).""; if ($all) echo "\n".implode('', $result); diff --git a/plugins/dynamix.apcupsd/include/update.apcupsd.php b/plugins/dynamix.apcupsd/include/update.apcupsd.php index f2a69e9b8..d0884c934 100644 --- a/plugins/dynamix.apcupsd/include/update.apcupsd.php +++ b/plugins/dynamix.apcupsd/include/update.apcupsd.php @@ -1,7 +1,7 @@
- Advanced View + _(Advanced View)_
/dev/null\")" ---- /dev/null\ ?> Array must be started to view Docker containers."; + echo "
_(Array must be **Started** to view Docker containers)_.
"; } elseif (!is_file('/var/run/dockerd.pid') || (!is_dir('/proc/'.@file_get_contents('/var/run/dockerd.pid')))) { - echo "
Docker Service failed to start.
"; + echo "
_(Docker Service failed to start)_.
"; } ?> diff --git a/plugins/dynamix.docker.manager/DockerContainers.page b/plugins/dynamix.docker.manager/DockerContainers.page index cfa623f77..262114b23 100644 --- a/plugins/dynamix.docker.manager/DockerContainers.page +++ b/plugins/dynamix.docker.manager/DockerContainers.page @@ -20,7 +20,7 @@ Markdown="false" Please wait... starting up containers"; +$busy = " "._('Please wait')."... "._('starting up containers'); $cpus = cpu_list(); ?> @@ -40,17 +40,17 @@ table tbody td{line-height:normal} - +
ApplicationVersionNetworkPort Mappings (App to Host)Volume Mappings (App to Host)CPU & Memory loadAutostartLog
_(Application)__(Version)__(Network)__(Port Mappings)_ (_(App to Host)_)_(Volume Mappings)_ (_(App to Host)_)_(CPU & Memory load)__(Autostart)__(Log)_
- - - - - - - - + + + + + + + + @@ -118,7 +118,7 @@ function loadlist() { $('.iconstatus').each(function(){ if ($(this).hasClass('stopped')) $('div.'+$(this).prop('id')).hide(); }); - $('.autostart').switchButton({labels_placement:'right'}); + $('.autostart').switchButton({labels_placement:'right', on_label:'_(On)_', off_label:'_(Off)_'}); $('.autostart').change(function(){ var more = $.cookie('docker_listview_mode')=='advanced'; var wait = $('#'+$(this).prop('id').replace('auto','wait')); @@ -145,7 +145,7 @@ function loadlist() { }); } function sizes() { - openBox('/plugins/dynamix.docker.manager/include/ContainerSize.php','Container Size',600,600); + openBox('/plugins/dynamix.docker.manager/include/ContainerSize.php','_(Container Size)_',600,600); } var watchDocker = new NchanSubscriber('/sub/dockerload'); watchDocker.on('message', function(data){ @@ -159,7 +159,7 @@ watchDocker.on('message', function(data){ } }); $(function() { - $('.advancedview').switchButton({labels_placement:'left', on_label:'Advanced View', off_label:'Basic View', checked:$.cookie('docker_listview_mode')=='advanced'}); + $('.advancedview').switchButton({labels_placement:'left', on_label:'_(Advanced View)_', off_label:'_(Basic View)_', checked:$.cookie('docker_listview_mode')=='advanced'}); $('.advancedview').change(function(){ $('.advanced').toggle('slow'); $('.basic').toggle('slow'); diff --git a/plugins/dynamix.docker.manager/DockerRepositories.page b/plugins/dynamix.docker.manager/DockerRepositories.page index 88913ff93..6a955d145 100644 --- a/plugins/dynamix.docker.manager/DockerRepositories.page +++ b/plugins/dynamix.docker.manager/DockerRepositories.page @@ -4,8 +4,8 @@ Tag="clone" Cond="(pgrep('dockerd')!==false)" ---
-Template repositories: +_(Template repositories)_: : +:help1 > Use this field to add template repositories. > Docker templates are used to facilitate the creation and re-creation of Docker containers. Please setup one per line. > > For a list of popular community-supported repositories, visit here: http://lime-technology.com/forum/index.php?topic=37958.0 +:end   -: +:
diff --git a/plugins/dynamix.docker.manager/DockerSettings.page b/plugins/dynamix.docker.manager/DockerSettings.page index e71df7951..7e793a07c 100644 --- a/plugins/dynamix.docker.manager/DockerSettings.page +++ b/plugins/dynamix.docker.manager/DockerSettings.page @@ -4,9 +4,9 @@ Icon="icon-docker" Tag="icon-docker" --- Your existing Docker image file needs to be recreated due to an issue from an earlier beta of Unraid 6. Failure to do so may result in your docker image suffering corruption at a later time. Please do this NOW!

'; + echo '

'._('Your existing Docker image file needs to be recreated due to an issue from an earlier beta of Unraid 6').' '; + echo _('Failure to do so may result in your docker image suffering corruption at a later time').' '; + echo _('Please do this NOW').'!

'; } } } @@ -140,55 +142,62 @@ span.disabled{color:#404040} -Enable Docker: +_(Enable Docker)_: : - One or more paths do not exist (view) + _(One or more paths do not exist)_ (_(view)_) +:help33 > Before you can start the Docker service for the first time, please specify an image file for Docker to install to. > > Once started, Docker will always automatically start after the array has been started. +:end -Docker vDisk size: +_(Docker vDisk size)_: : GB +:help34 > If the system needs to create a new docker image file, this is the default size to use specified in GB. > > To resize an existing image file, specify the new size here. Next time the Docker service is started the file (and file system) will increased to the new size (but never decreased). +:end -Docker vDisk location: +_(Docker vDisk location)_: : - + - Modify with caution: unable to validate path until Array is Started + _(Modify with caution: unable to validate path until Array is Started)_ - Path does not exist + _(Path does not exist)_ +:help35 > You must specify an image file for Docker. The system will automatically create this file when the Docker service is first started. > > The image file name must have the extension .img, e.g. If not the input is not accepted and marked red. > > It is recommended to create this image file outside the array, e.g. on the Cache pool. For best performance SSD devices are preferred. +:end -Default appdata storage location: +_(Default appdata storage location)_: : - Modify with caution: unable to validate path until Array is Started + _(Modify with caution: unable to validate path until Array is Started)_ - Path does not exist + _(Path does not exist)_ +:help36 > You can specify a folder to automatically generate and store subfolders containing configuration files for each Docker app (via the /config mapped volume). > > The folder's path must end with a trailing slash (/) character. If not the input is not accepted and marked red. @@ -196,68 +205,81 @@ Default appdata storage location: > It is recommended to create this folder outside the array, e.g. on the Cache pool. For best performance SSD devices are preferred. > > Only used when adding new Docker apps. Editing existing Docker apps will not be affected by this setting. +:end
-Docker LOG rotation: +_(Docker LOG rotation)_: : +:help37 > By default LOG rotation is disabled and will create a single LOG file of unlimited size. > > Enable LOG rotation to limit the size of the LOG file and specify the number of files to keep in the rotation scheme. +:end -Template Authoring Mode: +_(Template Authoring Mode)_: : +:help40 > If set to **Yes**, when creating/editing containers the interface will be present with some extra fields related to template authoring. +:end -Host access to custom networks: +_(Host access to custom networks)_: : +:help41 > Allows direct communication between the host and containers using a custom (macvlan) network.
> By default this is prohibited. +:end -Preserve user defined networks: +_(Preserve user defined networks)_: : +:help42 > User created networks are networks created by the user outside of the GUI.
> By default user created networks are removed from Docker. This is done to prevent potential conflicts with the automatic generation of custom networks. > > Change this setting to preserve user defined networks, but it is the responsibility of the user to ensure these entries work correctly and are conflict free. +:end $route):?> " value=""> -IPv4 custom network on interface (optional): +_(IPv4 custom network on interface)_ (_(optional)_): (optional): ?> : > - **Subnet:** - **Gateway:** + **_(Subnet)_:** + **_(Gateway)_:** > - **DHCP pool:**. + **_(DHCP pool)_:**. (optional): echo "/ "; echo "($size hosts)"; + echo "($size "._('hosts').")"; echo ""; ?> +:help43 > Include (default) or exclude the above interfaces or VLANs as custom network for Docker. > > Enter the pool range within each allocated subnet which is used for DHCPv4 assignments by Docker. E.g. 192.168.1.128/25 +:end @@ -329,25 +353,27 @@ $dhcpDisabled = $range ? '':'disabled'; ?> -IPv4 custom network on interface (optional): +_(IPv4 custom network on interface)_ (_(optional)_): : > - **Subnet:** >/ + **_(Subnet)_:** >/ - **Gateway:** " title="IPv4 address A.B.C.D"> + **_(Gateway)_:** " title="_(IPv4 address A.B.C.D)_"> > - **DHCP pool:** >/ + **_(DHCP pool)_:** >/ - ( hosts) + ( _(hosts)_) +:help44 > Include or exclude (default) the above interfaces or VLANs as custom network for Docker. > > Enter the pool range within each allocated subnet which is used for DHCPv4 assignments by Docker. E.g. 192.168.1.128/25 +:end @@ -360,7 +386,7 @@ $docker_auto = "DOCKER_AUTO_$net"; $docker_dhcp6 = "DOCKER_DHCP6_$net"; ?> -IPv6 custom network on interface (optional): +_(IPv6 custom network on interface)_ (_(optional)_): (optional): ?> : > - **Subnet:** - **Gateway:** + **_(Subnet)_:** + **_(Gateway)_:** > - **DHCP pool:**: + **_(DHCP pool)_:**: / "; echo "> - **Subnet:**>/ + **_(Subnet)_:**>/ - **Gateway:**" title="IPv6 address nnnn:xxxx::yyyy"> + **_(Gateway)_:**" title="_(IPv6 address nnnn:xxxx::yyyy)_"> > - **DHCP pool:**>/ + **_(DHCP pool)_:**>/ +:help46 > Include or exclude (default) the above interfaces or VLANs as custom network for Docker. > > Enter the pool range within each allocated subnet which is used for DHCPv6 assignments by Docker. E.g. 2a02:abcd:9ef5:100:1::/72 +:end
-Docker version: +_(Docker version)_: : getInfo(); echo $arrInfo['Version']?> -> This is the Docker version. +:help47 +> This is the active Docker version. +:end -Docker vDisk location: +_(Docker vDisk location)_: : +:help48 > This is the location of the Docker image. +:end -Default appdata storage location: +_(Default appdata storage location)_: : +:help49 > This is the storage location for Docker containers. +:end
-Docker LOG rotation: -: +_(Docker LOG rotation)_: +: +:help50 > By default a single unlimited LOG file is created. Otherwise LOG file size and number of files are limited when LOG rotation is enabled. +:end -Host access to custom networks: -: +_(Host access to custom networks)_: +: +:help51 > Allows direct communication between the host and containers using a custom (macvlan) network.
> By default this is prohibited. +:end -Preserve user defined networks: -: +_(Preserve user defined networks)_: +: +:help52 > Shows whether networks created outside of the GUI are removed or preserved for Docker. When preserved *user defined networks* become available in the *Network type* dropdown list of containers. +:end $route):?> -IPv4 custom network on interface : -: **Subnet:** - **Gateway:** - **DHCP pool:**   ( hosts) +_(IPv4 custom network on interface)_ : +: **_(Subnet)_:** + **_(Gateway)_:** + **_(DHCP pool)_:**   ( _(hosts)_) @@ -484,10 +526,10 @@ list($subnet,$mask) = explode('/',$dockercfg["DOCKER_SUBNET_$port"]); list($range,$size) = explode('/',$dockercfg["DOCKER_RANGE_$port"]); ?> -IPv4 custom network on interface : -: **Subnet:** / - **Gateway:** - **DHCP pool:**   ( hosts) +_(IPv4 custom network on interface)_ : +: **_(Subnet)_:** / + **_(Gateway)_:** + **_(DHCP pool)_:**   ( _(hosts)_) @@ -497,10 +539,10 @@ $net = normalize($network); $docker_dhcp6 = "DOCKER_DHCP6_$net"; if ($dockercfg[$docker_dhcp6] || empty($dockercfg["DOCKER_AUTO_$net"])):?> -IPv6 custom network on interface : -: **Subnet:** - **Gateway:** - **DHCP pool:** +_(IPv6 custom network on interface)_ : +: **_(Subnet)_:** + **_(Gateway)_:** + **_(DHCP pool)_:** @@ -520,17 +562,17 @@ list($subnet6,$mask6) = explode('/',$dockercfg["DOCKER_SUBNET6_$port"]); list($range6,$size6) = explode('/',$dockercfg["DOCKER_RANGE6_$port"]); ?> -IPv6 custom network on interface : -: **Subnet:** / - **Gateway:** - **DHCP pool:** +_(IPv6 custom network on interface)_ : +: **_(Subnet)_:** / + **_(Gateway)_:** + **_(DHCP pool)_:**
  -: +:
@@ -539,14 +581,14 @@ IPv6 custom network on interface :
-
Docker volume info
-btrfs filesystem show: +
_(Docker volume info)_
+_(btrfs filesystem show)_: : ".shell_exec("btrfs filesystem show /var/lib/docker").""?> - + -btrfs scrub status: -: ".implode("\n", $scrub_status).""?> +_(btrfs scrub status)_: +: ".implode("\n", $scrub_status).""?> @@ -554,20 +596,24 @@ btrfs scrub status:   -: +: +:help53 > **Scrub** runs the *btrfs scrub* program to check file system integrity. > > If repair is needed you should check the *Correct file system errors* and run a second Scrub pass; this will permit *btrfs scrub* to fix the file system. +:end   -: *Running* +: +:help54 > **Cancel** will cancel the Scrub operation in progress. +:end @@ -777,15 +823,15 @@ function checkDHCP() { var id = $(this).attr('name'); var pool = $(this).val().split('/'); var base = $('#'+id).text().split('/'); - if (good && typeof(pool[1])=='undefined') {good = false; swal('Missing subnet size','Pool subnet size is not defined','error');} - if (good && pool[1]<=base[1]) {good = false; swal('Invalid subnet size','Pool subnet size is too large','error');} + if (good && typeof(pool[1])=='undefined') {good = false; swal('_(Missing subnet size)_','_(Pool subnet size is not defined)_','error');} + if (good && pool[1]<=base[1]) {good = false; swal('_(Invalid subnet size)_','_(Pool subnet size is too large)_','error');} if (typeof(pool[1])=='undefined') pool[1] = 0; if (typeof(base[1])=='undefined') base[1] = 32; var toppool = ip2int(pool[0]); var topbase = ip2int(base[0]); var endpool = toppool+Math.pow(2,32-pool[1]); var endbase = topbase+Math.pow(2,32-base[1]); - if (good && (toppool < topbase || endpool > endbase)) {good = false; swal('Invalid pool address','Pool address is out of range','error');} + if (good && (toppool < topbase || endpool > endbase)) {good = false; swal('_(Invalid pool address)_','_(Pool address is out of range)_','error');} } }); if (good) $('#settingsForm').find('input[name^="DOCKER_DHCP6_"]').each(function(){ @@ -793,8 +839,8 @@ function checkDHCP() { var id = $(this).attr('name'); var pool = $(this).val().split('/'); var base = $('#'+id).text().split('/'); - if (good && typeof(pool[1])=='undefined') {good = false; swal('Missing subnet size','Pool subnet size is not defined','error');} - if (good && pool[1]<=base[1]) {good = false; swal('Invalid subnet size','Pool subnet size is too large','error');} + if (good && typeof(pool[1])=='undefined') {good = false; swal('_(Missing subnet size)_','_(Pool subnet size is not defined)_','error');} + if (good && pool[1]<=base[1]) {good = false; swal('_(Invalid subnet size)_','_(Pool subnet size is too large)_','error');} } }); return good; @@ -806,27 +852,27 @@ function checkIP() { $('#settingsForm').find('input[name^="DOCKER_SUBNET_"]').each(function(){ if ($(this).val() && !validIP4.test($(this).val())) error = true; }); - if (error) {swal('Invalid IPv4 subnet','Please enter a valid subnet','error'); return false;} + if (error) {swal('_(Invalid IPv4 subnet)_','_(Please enter a valid subnet)_','error'); return false;} $('#settingsForm').find('input[name^="DOCKER_GATEWAY_"]').each(function(){ if ($(this).val() && !validIP4.test($(this).val())) error = true; }); - if (error) {swal('Invalid IPv4 gateway','Please enter a valid gateway','error'); return false;} + if (error) {swal('_(Invalid IPv4 gateway)_','_(Please enter a valid gateway)_','error'); return false;} $('#settingsForm').find('input[name^="DOCKER_RANGE_"]').each(function(){ if ($(this).val() && !validIP4.test($(this).val())) error = true; }); - if (error) {swal('Invalid IPv4 range','Please enter a valid range','error'); return false;} + if (error) {swal('_(Invalid IPv4 range)_','_(Please enter a valid range)_','error'); return false;} $('#settingsForm').find('input[name^="DOCKER_SUBNET6_"]').each(function(){ if ($(this).val() && !validIP6.test($(this).val())) error = true; }); - if (error) {swal('Invalid IPv6 subnet','Please enter a valid subnet','error'); return false;} + if (error) {swal('_(Invalid IPv6 subnet)_','_(Please enter a valid subnet)_','error'); return false;} $('#settingsForm').find('input[name^="DOCKER_GATEWAY6_"]').each(function(){ if ($(this).val() && !validIP6.test($(this).val())) error = true; }); - if (error) {swal('Invalid IPv6 gateway','Please enter a valid gateway','error'); return false;} + if (error) {swal('_(Invalid IPv6 gateway)_','_(Please enter a valid gateway)_','error'); return false;} $('#settingsForm').find('input[name^="DOCKER_RANGE6_"]').each(function(){ if ($(this).val() && !validIP6.test($(this).val())) error = true; }); - if (error) {swal('Invalid IPv6 range','Please enter a valid range','error'); return false;} + if (error) {swal('_(Invalid IPv6 range)_','_(Please enter a valid range)_','error'); return false;} return true; } function showLogOptions(log) { @@ -836,6 +882,20 @@ function showLogOptions(log) { $('#DOCKER_LOG_OPTIONS').show('slow'); } } +function prepareFS(form,cookie,value) { + if ($(form).find('input[type="submit"]').val()=='Cancel') $.removeCookie(cookie); else $.cookie(cookie,value); +} +function btrfsScrub(path) { + $.post('/webGui/include/FileSystemStatus.php',{cmd:'scrub',path:path},function(data) { + if (data.indexOf('running')>0) { + $('#btrfs-scrub').text(data); + setTimeout(function(){btrfsScrub(path);},1000); + } else { + $.removeCookie('btrfs-scrub-docker'); + refresh(); + } + }); +} $(function() { $("#applyBtn").click(function(){ if (!checkDHCP() || !checkIP()) return; @@ -848,7 +908,7 @@ $(function() { var size = $("#DOCKER_IMAGE_SIZE").val(); var target = $("#SIZE_ERROR"); if (! $.isNumeric( size )){ - target.fadeIn().html('Error: value must be a number.'); + target.fadeIn().html('_(Error)_: _(value must be a number)_.'); isError = true; } else { target.fadeOut(); @@ -858,7 +918,7 @@ $(function() { target = $("#IMAGE_ERROR"); $.getJSON( "/plugins/dynamix.docker.manager/include/UpdateConfig.php?is_dir=" + image).done(function(json) { if (json.is_dir === true){ - target.fadeIn().html('Error: must be a file; directory provided.'); + target.fadeIn().html('_(Error)_: _(must be a file; directory provided)_.'); isError = true; } else { target.fadeOut(); @@ -919,8 +979,8 @@ $(function() { } $('.advancedview').switchButton({ labels_placement: "left", - on_label: 'Advanced View', - off_label: 'Basic View', + on_label: '_(Advanced View)_', + off_label: '_(Basic View)_', checked: $.cookie('dockersettings_view_mode') == 'advanced' }); $('.advancedview').change(function () { @@ -936,5 +996,6 @@ $(function() { $("#DOCKER_APP_CONFIG_PATH").fileTreeAttach(); + if ($.cookie('btrfs-scrub-docker')) btrfsScrub($.cookie('btrfs-scrub-docker')); }); diff --git a/plugins/dynamix.docker.manager/UpdateContainer.page b/plugins/dynamix.docker.manager/UpdateContainer.page index 7a83e028f..d9279197a 100644 --- a/plugins/dynamix.docker.manager/UpdateContainer.page +++ b/plugins/dynamix.docker.manager/UpdateContainer.page @@ -3,8 +3,8 @@ Cond="(pgrep('dockerd')!==false)" Markdown="false" ---
- Advanced View + _(Advanced View)_
No Docker containers installed"; + echo ""._('No Docker containers installed').""; return; } @@ -85,10 +89,10 @@ foreach ($containers as $ct) { } else { $appname = htmlspecialchars($name); } - echo "$image$appname
$status
"; - echo "Container ID: $id
"; + echo "$image$appname
"._($status)."
"; + echo ""._('Container ID').": $id
"; if ($ct['BaseImage']) echo "".htmlspecialchars(${ct['BaseImage']})."
"; - echo "By: "; + echo _('By').": "; $registry = $info['registry']; list($author,$version) = explode(':',$ct['Image']); if ($registry) { @@ -99,20 +103,20 @@ foreach ($containers as $ct) { echo "
"; switch ($updateStatus) { case 0: - echo " up-to-date"; - echo ""; + echo " "._('up-to-date').""; + echo ""; break; case 1: - echo "
update ready
"; - echo " apply update"; + echo "
"._('update ready')."
"; + echo " "._('apply update').""; break; case 2: - echo "
rebuild ready
"; - echo " rebuilding"; + echo "
".('rebuild ready')."
"; + echo " "._('rebuilding').""; break; default: - echo " not available"; - echo ""; + echo " "._('not available').""; + echo ""; break; } echo "
$version
"; @@ -122,7 +126,7 @@ foreach ($containers as $ct) { echo "0%
"; echo "
0 / 0"; echo ""; - echo ""; + echo ""; echo "
"; echo htmlspecialchars(str_replace('Up','Uptime',$ct['Status']))."
Created ".htmlspecialchars($ct['Created'])."
"; } diff --git a/plugins/dynamix.docker.manager/include/UpdateConfig.php b/plugins/dynamix.docker.manager/include/UpdateConfig.php index 383a515a6..6e35ce12b 100644 --- a/plugins/dynamix.docker.manager/include/UpdateConfig.php +++ b/plugins/dynamix.docker.manager/include/UpdateConfig.php @@ -1,7 +1,7 @@ here to install version "+result.version+" "; + var HTML = "An upgrade to "+name+" is available. Click here to install version "+result.version+" "; addBannerWarning(HTML,false,options.noDismiss); } } else { if ( $.cookie(plugin) != result.version ) { if ( result.updateAvailable ) { - var HTML = "An upgrade to "+name+" is available. Click here to install version "+result.version+" "; + var HTML = "An upgrade to "+name+" is available. Click here to install version "+result.version+" "; if ( ! options.noDismiss ) { HTML = HTML.concat(""); } diff --git a/plugins/dynamix.plugin.manager/PluginInstall.page b/plugins/dynamix.plugin.manager/PluginInstall.page index 5a0718345..9ce920956 100644 --- a/plugins/dynamix.plugin.manager/PluginInstall.page +++ b/plugins/dynamix.plugin.manager/PluginInstall.page @@ -3,8 +3,8 @@ Title="Install Plugin" Tag="download" --- -**Enter URL of remote plugin file or local plugin file** +**_(Enter URL of remote plugin file or local plugin file)_**
- +
+:help1 > To download and install a plugin, enter the plg file URL and click **Install**. A window will open > that displays install progress. Do not close this window until install has completed. You may also specify > the local file name of an extension. +:end -**Select local plugin file** +**_(Select local plugin file)_**
diff --git a/plugins/dynamix.plugin.manager/Plugins.page b/plugins/dynamix.plugin.manager/Plugins.page index f8754d3ed..5ee2da1f2 100644 --- a/plugins/dynamix.plugin.manager/Plugins.page +++ b/plugins/dynamix.plugin.manager/Plugins.page @@ -77,13 +77,13 @@ function loadlist(id) { $(function() { loadlist(); $('#plugin_tree').fileTree({root:'/boot/',filter:'plg'}, function(file) {$('#plugin_file').val(file);}); - $('.tabs').append(""); + $('.tabs').append(""); - $('.tabs').append(""); + $('.tabs').append(""); }); - +
PluginAuthorVersionStatusUninstall
_(Plugin)__(Author)__(Version)__(Status)__(Uninstall)_
diff --git a/plugins/dynamix.plugin.manager/PluginsError.page b/plugins/dynamix.plugin.manager/PluginsError.page index 60c83baf5..c50ef7f88 100644 --- a/plugins/dynamix.plugin.manager/PluginsError.page +++ b/plugins/dynamix.plugin.manager/PluginsError.page @@ -4,8 +4,8 @@ Tag="puzzle-piece" Cond="glob('/boot/config/plugins-error/*.plg')" --- "; -echo "Plugin FileStatus"; +echo ""._('Plugin File').""._('Status').""; echo ""; foreach (glob("/boot/config/plugins-error/*.plg", GLOB_NOSORT) as $plugin_file) { // status info - $status_info = "ERROR
" . make_link("delete", $plugin_file); + $status_info = _('ERROR')."
".make_link("delete", $plugin_file); echo ""; echo "{$plugin_file}"; @@ -36,5 +36,7 @@ foreach (glob("/boot/config/plugins-error/*.plg", GLOB_NOSORT) as $plugin_file) echo ""; ?> +:help2 > These plugins were not installed because of some kind of installation error. You should delete these -> plugins and then **reboot** your server.* \ No newline at end of file +> plugins and then **reboot** your server.* +:end diff --git a/plugins/dynamix.plugin.manager/PluginsStale.page b/plugins/dynamix.plugin.manager/PluginsStale.page index 1b3896987..264dbbe0c 100644 --- a/plugins/dynamix.plugin.manager/PluginsStale.page +++ b/plugins/dynamix.plugin.manager/PluginsStale.page @@ -4,8 +4,8 @@ Tag="puzzle-piece" Cond="glob('/boot/config/plugins-stale/*.plg')" --- "; -echo "PluginAuthorVersionStatus"; +echo "".('Plugin').""._('Author').""._('Version').""._('Status').""; echo ""; foreach (glob("/boot/config/plugins-stale/*.plg", GLOB_NOSORT) as $plugin_file) { @@ -40,17 +40,17 @@ foreach (glob("/boot/config/plugins-stale/*.plg", GLOB_NOSORT) as $plugin_file) // author $author = plugin("author", $plugin_file); - if ($author === false) $author = "anonymous"; + if ($author === false) $author = _("anonymous"); // version $version = plugin("version", $plugin_file); - if ($version === false) $version = "unknown"; + if ($version === false) $version = _("unknown"); // version info $version_info = $version; // status info - $status_info = "STALE"; + $status_info = _("STALE"); // action $action = make_link("delete", $plugin_file); @@ -68,4 +68,6 @@ foreach (glob("/boot/config/plugins-stale/*.plg", GLOB_NOSORT) as $plugin_file) echo ""; ?> -> These plugins were not installed because newer code already exists. It is safe to simply delete these. \ No newline at end of file +:help3 +> These plugins were not installed because newer code already exists. It is safe to simply delete these. +:end diff --git a/plugins/dynamix.plugin.manager/Update.page b/plugins/dynamix.plugin.manager/Update.page index e752a9ea8..2fc478963 100644 --- a/plugins/dynamix.plugin.manager/Update.page +++ b/plugins/dynamix.plugin.manager/Update.page @@ -17,7 +17,7 @@ Tag="upload" ?>
"; -$version = $branch = $date = 'unknown'; +$version = $branch = $date = _('unknown'); $bzroot = file_exists('/boot/previous/bzroot'); $check = $notify['unraidos'] ? 0 : 1; @@ -26,7 +26,7 @@ if (file_exists('/boot/previous/changes.txt')) { foreach ($rows as $row) { $i = stripos($row,'version'); if ($i !== false) { - list($version,$date) = explode(' ',trim(substr($row,$i+7))); + [$version,$date] = explode(' ',trim(substr($row,$i+7))); break; } } @@ -34,8 +34,8 @@ if (file_exists('/boot/previous/changes.txt')) { } ?> @@ -85,14 +85,14 @@ function loadlist(id) { $(function() { loadlist(); - $('.tabs').append(""); + $('.tabs').append(""); }); - + - +
ComponentAuthorVersionStatusBranch
_(Component)__(Author)__(Version)__(Status)__(Branch)_
diff --git a/plugins/dynamix.plugin.manager/include/PluginHelpers.php b/plugins/dynamix.plugin.manager/include/PluginHelpers.php index 966d6f612..aadb69894 100644 --- a/plugins/dynamix.plugin.manager/include/PluginHelpers.php +++ b/plugins/dynamix.plugin.manager/include/PluginHelpers.php @@ -38,7 +38,7 @@ function make_link($method, $arg, $extra='') { $cmd = "/plugins/dynamix.plugin.manager/scripts/plugin&arg1=$method&arg2=$arg".($extra?"&arg3=$extra":""); $exec = "loadlist"; } - return "$check"; + return "$check"; } // trying our best to find an icon diff --git a/plugins/dynamix.plugin.manager/include/ShowChanges.php b/plugins/dynamix.plugin.manager/include/ShowChanges.php index 9ef92ff33..9b6c838a8 100644 --- a/plugins/dynamix.plugin.manager/include/ShowChanges.php +++ b/plugins/dynamix.plugin.manager/include/ShowChanges.php @@ -1,6 +1,6 @@ @@ -29,7 +33,7 @@ require_once "$docroot/webGui/include/Helpers.php"; $file = $_GET['file']; $tmp = $_GET['tmp'] ? '/var/tmp' : '/tmp/plugins/'; -if (file_exists($file) && strpos(realpath($file),$tmp)===0 && substr($file,-4)=='.txt') echo Markdown(file_get_contents($file)); else echo Markdown("*No release notes available!*"); +if (file_exists($file) && strpos(realpath($file),$tmp)===0 && substr($file,-4)=='.txt') echo Markdown(file_get_contents($file)); else echo Markdown("*"._('No release notes available')."!*"); ?>
diff --git a/plugins/dynamix.plugin.manager/include/ShowPlugins.php b/plugins/dynamix.plugin.manager/include/ShowPlugins.php index 1737a75e5..26de28b65 100644 --- a/plugins/dynamix.plugin.manager/include/ShowPlugins.php +++ b/plugins/dynamix.plugin.manager/include/ShowPlugins.php @@ -12,6 +12,10 @@ ?> Support Thread" : ""; + $support = $support ? ""._('Support Thread')."" : ""; //category $category = plugin('category',$plugin_file) ?: (strpos($version,'-')!==false ? 'next' : 'stable'); //status @@ -143,7 +147,7 @@ foreach (glob($plugins,GLOB_NOSORT) as $plugin_link) { echo "$desc $support"; echo "$author"; echo "$version"; - echo "$status"; + echo ""._($status).""; echo ""; if ($system) { if ($os) { diff --git a/plugins/dynamix.vm.manager/VMMachines.page b/plugins/dynamix.vm.manager/VMMachines.page index 514dbcefe..01f8061f4 100644 --- a/plugins/dynamix.vm.manager/VMMachines.page +++ b/plugins/dynamix.vm.manager/VMMachines.page @@ -41,7 +41,7 @@ function showCPUs($uuid) { echo "
"; } $uuid = $_GET['uuid']; -$subaction = $_GET['subaction'] ?? ''; +$subaction = $_GET['subaction'] ?? false; if ($_GET['refresh']) { $vm = $_GET['name']; if ($lv->domain_is_active($vm)) { @@ -97,7 +97,7 @@ if (empty($vms)) { - +
NameDescriptionCPUsMemoryvDisksGraphicsAutostart
_(Name)__(Description)__(CPUs)__(Memory)__(vDisks)__(Graphics)__(Autostart)_
- - - + + + @@ -182,7 +182,7 @@ function loadlist() { functionBefore:function(instance,helper){instance.content("");} }); - $('.autostart').switchButton({labels_placement:"right"}); + $('.autostart').switchButton({labels_placement:'right', on_label:'_(On)_', off_label:'_(Off)_'}); $('.autostart').change(function() { $.post('/plugins/dynamix.vm.manager/include/VMajax.php',{action:'domain-autostart',uuid:$(this).attr('uuid'),autostart:$(this).prop('checked'),response:'json'},function(data){ $(this).prop('checked', data.autostart); @@ -198,7 +198,7 @@ function loadlist() { $(function() { - $('#countdown').html(""); + $('#countdown').html(""); $('#btnAddVM').click(function AddVMEvent(){$('.tab>input#tab2').click();}); loadlist(); diff --git a/plugins/dynamix.vm.manager/VMSettings.page b/plugins/dynamix.vm.manager/VMSettings.page index 85d972588..cb0c13b55 100644 --- a/plugins/dynamix.vm.manager/VMSettings.page +++ b/plugins/dynamix.vm.manager/VMSettings.page @@ -23,8 +23,8 @@ require_once "$docroot/plugins/dynamix.vm.manager/include/libvirt_helpers.php"; // If either kvm_intel or kvm_amd are loaded then Intel VT-x (vmx) or AMD-V (svm) cpu virtualization support was found $hardware = !empty(shell_exec("/etc/rc.d/rc.libvirt test")); if (!$hardware) { - echo "

Your hardware does not have Intel VT-x or AMD-V capability. This is required to create VMs in KVM. Please disable the VM function. "; - echo " Click here to see the Unraid Wiki for more information

"; + echo "

".('Your hardware does not have Intel VT-x or AMD-V capability').". "._('This is required to create VMs in KVM').". "._('Please disable the VM function').". "; + echo " "._('Click here to see the Unraid Wiki for more information')."

"; } function scan($area, $text) { @@ -81,62 +81,74 @@ body{-webkit-overflow-scrolling:touch} -Enable VMs: +_(Enable VMs)_: : - + - One or more paths do not exist (view) + _(One or more paths do not exist)_ (_(view)_) +:help105 > Stopping the VM Manager will first attempt to shutdown all running VMs. After 60 seconds, any remaining VM instances will be terminated. +:end
get_connect_information()?> -Libvirt version: +_(Libvirt version)_: : -QEMU version: +_(QEMU version)_: : -Libvirt storage location: +_(Libvirt storage location)_: : +:help106 > This is the libvirt volume. +:end -Libvirt vdisk size: -: GB +_(Libvirt vdisk size)_: +: _(GB)_ +:help107 > If the system needs to create a new libvirt image file, this is the default size to use specified in GB. > To resize an existing image file, specify the new size here. Next time the Libvirt service is started the file (and file system) will increased to the new size (but never decreased). +:end -Libvirt storage location: -: Modify with caution: unable to validate path until Array is Started Path does not exist +_(Libvirt storage location)_: +: _(Modify with caution: unable to validate path until Array is Started)_ _(Path does not exist)_ +:help108 > You must specify an image file for Libvirt. The system will automatically create this file when the Libvirt service is first started. +:end -Default VM storage path: -: Modify with caution: unable to validate path until Array is Started Path does not exist +_(Default VM storage path)_: +: _(Modify with caution: unable to validate path until Array is Started)_ _(Path does not exist)_ +:help109 > Specify a user share that contains all your VM subdirectories with vdisks +:end -Default ISO storage path: -: Modify with caution: unable to validate path until Array is Started Path does not exist +_(Default ISO storage path)_: +: _(Modify with caution: unable to validate path until Array is Started)_ _(Path does not exist)_ +:help110 > Specify a user share that contains all your installation media for operating systems +:end
-Default Windows VirtIO driver ISO (optional): +_(Default Windows VirtIO driver ISO)_ (_(optional)_): : placeholder="Click to Select" pattern="^[^\\]*\.(iso|ISO)$"> Remove Download> + placeholder="_(Click to Select)_" pattern="^[^\\]*\.(iso|ISO)$"> _(Remove)_ _(Download)_> +:help111 > Specify the virtual CD-ROM (ISO) that contains the VirtIO Windows drivers as provided by the Fedora Project. > Download the latest ISO from here: fedoraproject.org > @@ -165,47 +178,54 @@ Default Windows VirtIO driver ISO (optional) Click browse and locate the additional CD-ROM in the menu. Inside there will be various folders for the different versions of Windows. > Open the folder for the version of Windows you are installing and then select the AMD64 subfolder inside (even if you are on an Intel system, select AMD64). > Three drivers will be found. Select them all, click next, and the vDisks you have assigned will appear. +:end
-Default network bridge: +_(Default network bridge)_: : +:help112 > Select the name of the network bridge you wish to use as default for your VMs, > the setting 'virbr0' will let libvirt create a virtual bridge that utilizes NAT (network address translation) > and act as a DHCP server to hand out IP addresses to virtual machines directly. > More optional selections are present when virtual bridges are created under network settings. > > NOTE: You can also specify a network bridge on a per-VM basis. +:end -Upon host shutdown: +_(Upon host shutdown)_: : +:help113 > When shutting down the server, this defines the action to take upon running VMs. If *Hibernate VMs* is chosen, > the VM will be instructed to hibernate (if supported) otherwise it will attempt a VM shutdown. +:end -VM shutdown time-out: +_(VM shutdown time-out)_: : (int)$var['shutdownTimeout']):?> - exceeds Disk Shutdown s time-out (edit) + _(exceeds Disk Shutdown)_ s _(time-out)_ (_(edit)_) +:help114 > When shutting down the server, this defines how long to wait in seconds for *graceful* VM shutdown before forcing shutdown to continue. > NOTE: It's recommended to shut down guest VMs from within the VM. +:end -PCIe ACS override: +_(PCIe ACS override)_: : *Setting disabled in **safe mode*** + + + + + *_(Setting disabled in **safe mode**)_* +:help115 > *PCIe ACS override* allows various hardware components to expose themselves as isolated devices. > Typically it is sufficient to isolate *Downstream* ports. > A hardware component may need the setting *Multi-function* or *Both* to further isolate different hardware functions.
@@ -213,43 +233,48 @@ PCIe ACS override: > > **Warning: use of this setting could cause possible data corruption with certain hardware configurations.** > Please visit the [Lime Technology forums](https://forums.unraid.net/forum/51-vm-engine-kvm) for more information. +:end -VFIO allow unsafe interrupts: +_(VFIO allow unsafe interrupts)_: : *Setting disabled in **safe mode*** + + + *_(Setting disabled in **safe mode**)_* +:help116 > If your system doesn't support interrupt remapping, these can be enabled by allowing unsafe interrupts.
> A reboot will be required for changes to this setting to take affect. > > **Warning: use of this setting could cause possible data corruption with certain hardware configurations.** > Please visit the [Lime Technology forums](https://forums.unraid.net/forum/51-vm-engine-kvm) for more information. +:end
- +   -: +: -> View the log for libvirt: /var/log/libvirt/libvirtd.log +:help117 +> View the log for libvirt: /var/log/libvirt/libvirtd.log +:end
-
Libvirt volume info
-btrfs filesystem show: -: ".shell_exec("btrfs filesystem show /etc/libvirt").""?> +
_(Libvirt volume info)_
+_(btrfs filesystem show)_: +: ".shell_exec("btrfs filesystem show /etc/libvirt").""?> -
+ -btrfs scrub status: +_(btrfs scrub status)_: : ".implode("\n", $scrub_status).""?> @@ -258,19 +283,23 @@ btrfs scrub status:   -: +: +:help118 > **Scrub** runs the *btrfs scrub* program to check file system integrity. > If repair is needed you should check the *Correct file system errors* and run a second Scrub pass; this will permit *btrfs scrub* to fix the file system. +:end   -: *Running* +: +:help119 > **Cancel* will cancel the Scrub operation in progress. +:end
@@ -286,6 +315,20 @@ btrfs scrub status: diff --git a/plugins/dynamix.vm.manager/VMTemplates.page b/plugins/dynamix.vm.manager/VMTemplates.page index 0b378b21a..06569d6b3 100644 --- a/plugins/dynamix.vm.manager/VMTemplates.page +++ b/plugins/dynamix.vm.manager/VMTemplates.page @@ -4,7 +4,7 @@ Cond="(pgrep('libvirtd')!==false)" Markdown="false" ---
-
+

\ No newline at end of file diff --git a/plugins/dynamix.vm.manager/VMs.page b/plugins/dynamix.vm.manager/VMs.page index 7059b8e77..2f5e8f9ea 100644 --- a/plugins/dynamix.vm.manager/VMs.page +++ b/plugins/dynamix.vm.manager/VMs.page @@ -4,8 +4,8 @@ Code="e918" Cond="exec(\"grep -o '^SERVICE=.enable' /boot/config/domain.cfg 2>/dev/null\")" --- /dev/null\")" ?> Array must be started to view Virtual Machines.
"; + echo "
"._('Array must be **started** to view Virtual Machines').".
"; } elseif (!is_file('/var/run/libvirt/libvirtd.pid') || (!is_dir('/proc/'.@file_get_contents('/var/run/libvirt/libvirtd.pid')))) { - echo "
Libvirt Service failed to start.
"; + echo "
"._('Libvirt Service failed to start').".
"; } if (count($pages)==2) $tabbed = false; ?> \ No newline at end of file diff --git a/plugins/dynamix.vm.manager/include/VMMachines.php b/plugins/dynamix.vm.manager/include/VMMachines.php index 510fe7bb1..143201b0c 100644 --- a/plugins/dynamix.vm.manager/include/VMMachines.php +++ b/plugins/dynamix.vm.manager/include/VMMachines.php @@ -13,13 +13,18 @@ ?> get_domains(); if (empty($vms)) { - echo 'No Virtual Machines installed'; + echo ''._('No Virtual Machines installed').''; return; } if (file_exists($user_prefs)) { @@ -103,7 +108,7 @@ foreach ($vms as $vm) { /* VM information */ echo ""; - echo "$image$vm
$status
"; + echo "$image$vm
"._($status)."
"; echo "$desc"; echo "$vcpu"; echo "$mem"; @@ -115,7 +120,7 @@ foreach ($vms as $vm) { echo "" : "' style='display:none'>"); echo ""; echo ""; - echo ""; + echo ""; echo ""; /* Display VM disks */ diff --git a/plugins/dynamix.vm.manager/include/VMajax.php b/plugins/dynamix.vm.manager/include/VMajax.php index cbd5e7dba..ed77abbde 100644 --- a/plugins/dynamix.vm.manager/include/VMajax.php +++ b/plugins/dynamix.vm.manager/include/VMajax.php @@ -1,7 +1,7 @@ 'Unknown version: '.$_REQUEST['download_version']]; + $arrResponse = ['error' => _('Unknown version').': '.$_REQUEST['download_version']]; } elseif (empty($_REQUEST['download_path'])) { - $arrResponse = ['error' => 'ISO storage path was empty']; + $arrResponse = ['error' => _('ISO storage path was empty')]; } elseif (!is_dir($_REQUEST['download_path'])) { - $arrResponse = ['error' => 'ISO storage path doesn\'t exist']; + $arrResponse = ['error' => _("ISO storage path doesn't exist")_]; } else { $strInstallScriptPgrep = '-f "VirtIOWin_'.$strKeyName.'_install.sh"'; $pid = pgrep($strInstallScriptPgrep, false); if (!$pid) { - $arrResponse = ['error' => 'Not running']; + $arrResponse = ['error' => _('Not running')]; } else { if (!posix_kill($pid, SIGTERM)) { - $arrResponse = ['error' => 'Wasn\'t able to stop the process']; + $arrResponse = ['error' => _("Wasn't able to stop the process")]; } else { $strTargetFile = $_REQUEST['download_path'].$arrDownloadVirtIO['name']; $strLogFile = $strTargetFile.'.log'; @@ -581,7 +585,7 @@ case 'virtio-win-iso-remove': break; default: - $arrResponse = ['error' => 'Unknown action \''.$action.'\'']; + $arrResponse = ['error' => _('Unknown action')." '$action'"]; break; } diff --git a/plugins/dynamix/AFP.page b/plugins/dynamix/AFP.page index 4d7295fa0..ec3bac381 100644 --- a/plugins/dynamix/AFP.page +++ b/plugins/dynamix/AFP.page @@ -4,8 +4,8 @@ Icon="icon-apple" Tag="apple" --- -
Please note that AFP is deprecated, please use SMB instead.
+
_(Please note that AFP is **deprecated**, please use SMB instead)_.
-Enable AFP: +_(Enable AFP)_: : +:help81 > Select 'Yes' enable [AFP](/Help) protocol support. > > Note: changing this value with array Started may cause a brief interruption in network services. +:end -Connected users: +_(Connected users)_: : 0) $AFPUsers--; echo $AFPUsers; else: - echo "not available"; + echo ""._('not available').""; endif;?>   -: +: +:help82 > ### Overview > AFP for Unraid includes both `netatalk` to implement Apple Filing Protocol, and `avahi` > to implement Zeroconf, aka, Bonjour. @@ -74,3 +77,4 @@ Connected users: > > It may be necessary to log out and back in, or even to restart the computer for the change to take effect > (this is what the article states). +:end \ No newline at end of file diff --git a/plugins/dynamix/ArrayDevices.page b/plugins/dynamix/ArrayDevices.page index 89a6025f4..b4cd15c8c 100644 --- a/plugins/dynamix/ArrayDevices.page +++ b/plugins/dynamix/ArrayDevices.page @@ -3,8 +3,8 @@ Title="Array Devices" Tag="database" ---
Disk devicesBusCapacityAllocation
"._('Disk devices').""._('Bus').""._('Capacity').""._('Allocation')."
- +
DeviceIdentificationTemp.ReadsWritesErrorsFSSizeUsedFreeView
_(Device)__(Identification)__(Temp)_._(Reads)__(Writes)__(Errors)__(FS)__(Size)__(Used)__(Free)__(View)_
 
+:help1 > **Colored Status Indicator** the significance of the color indicator at the beginning of each line in *Array Devices* is as follows: > > Normal operation, device is active. @@ -137,9 +138,12 @@ if ($display['total']) echo "  separate share. > > Click on the Device name to configure individual device settings and launch certain utilities. +:end
+:help2 > **Slots** select the number of device slots in your server designated for Array devices. > The minimum number of Array slots is 2, and you must have at least one device assigned to the array. +:end diff --git a/plugins/dynamix/ArrayOperation.page b/plugins/dynamix/ArrayOperation.page index dc367f0e2..320eb1831 100644 --- a/plugins/dynamix/ArrayOperation.page +++ b/plugins/dynamix/ArrayOperation.page @@ -33,34 +33,34 @@ if ($forced && ($present || $missing || $wrong)) $forced = false; function check_encryption() { global $forced, $missing, $wrong; - if ($forced) $status = "Enter new key"; - elseif ($missing) $status = "Missing key"; - elseif ($wrong) $status = "Wrong key"; + if ($forced) $status = _('Enter new key'); + elseif ($missing) $status = _('Missing key'); + elseif ($wrong) $status = _('Wrong key'); else return; - echo "Encryption status:$statuspermit reformat"; - echo "Encryption input:"; + echo ""._('Encryption status').":$statuspermit reformat"; + echo ""._('Encryption input').":"; echo ""; - echo "Passphrase:show passphrase"; - echo "Retype passphrase:"; - echo "Keyfile:"; + echo ""._('Passphrase').":"._('show passphrase').""; + echo ""._('Retype passphrase').":"; + echo ""._('Keyfile').":"; } function maintenance_mode() { echo ""; echo ""; - echo "Maintenance mode"; - echo "Maintenance mode - if checked, Start array but do not mount disks."; + echo "_(Maintenance mode)_"; + echo ""._('Maintenance mode')." - "._('if checked, Start array but do not mount disks').""; echo ""; } function status_indicator() { global $var; switch ($var['mdColor']) { - case 'green-on': $orb = 'circle'; $color = 'green'; $help = 'Started, array protected'; break; - case 'green-blink': $orb = 'circle'; $color = 'grey'; $help = 'Stopped'; break; - case 'yellow-on': $orb = 'warning'; $color = 'yellow'; $help = 'Started, array unprotected'; break; - case 'yellow-blink': $orb = 'warning'; $color = 'grey'; $help = 'Stopped'; break; + case 'green-on': $orb = 'circle'; $color = 'green'; $help =_('Started, array protected'); break; + case 'green-blink': $orb = 'circle'; $color = 'grey'; $help = _('Stopped'); break; + case 'yellow-on': $orb = 'warning'; $color = 'yellow'; $help = _('Started, array unprotected'); break; + case 'yellow-blink': $orb = 'warning'; $color = 'grey'; $help = _('Stopped'); break; } echo "$help"; } @@ -74,11 +74,12 @@ function missing_cache() { +:help6 > **Colored Status Indicator** the significance of the color indicator of the *Array* is as follows: > > Array is Started and Parity is valid. @@ -565,7 +572,9 @@ enable_stop(); > > Array is Stopped, Parity is invalid. > +:end +:help7 > #### Assigning Devices > > An Unraid disk array consists of a single parity disk and a number of data disks. The data @@ -621,9 +630,11 @@ enable_stop(); > > Once you have assigned all of your hard drives, refer to the Array Status section below > and Start the array. +:end
+:help8 > #### Encryption input > > With array Stopped, the user can specify a new encryption key. Note that once a device @@ -647,5 +658,6 @@ enable_stop(); > Select a local keyfile with a stored encryption key or a binary file. The maximum size of the keyfile is 8M (8388608 byte). > > **Backup** your local keyfile. **IF LOST, ENCRYPTED CONTENT CANNOT BE RECOVERED!** +:end diff --git a/plugins/dynamix/BootDevice.page b/plugins/dynamix/BootDevice.page index 46f2a1b49..b1d6da4e0 100644 --- a/plugins/dynamix/BootDevice.page +++ b/plugins/dynamix/BootDevice.page @@ -3,8 +3,8 @@ Title="Boot Device" Tag="paw" --- - +";?>
DeviceIdentificationTemp.ReadsWritesErrorsFSSizeUsedFreeView
_(Device)__(Identification)__(Temp)_._(Reads)__(Writes)__(Errors)__(FS)__(Size)__(Used)__(Free)__(View)_
 
+:help5 > Vital array configuration is maintained on the USB Flash device; for this reason, it must remain > plugged in to your server. Click on [Flash](/Main/Flash?name=flash) to see the GUID and registration > information, and to configure export settings. Since the USB Flash device is formatted using FAT file system, > it may only be exported using SMB protocol. +:end diff --git a/plugins/dynamix/Browse.page b/plugins/dynamix/Browse.page index 0829f1790..f8020f6ac 100644 --- a/plugins/dynamix/Browse.page +++ b/plugins/dynamix/Browse.page @@ -38,7 +38,7 @@ $(function(){ }); - +
TypeNameSizeLast ModifiedLocation
_(Type)__(Name)__(Size)__(Last Modified)__(Location)_
- + diff --git a/plugins/dynamix/CPUisol.page b/plugins/dynamix/CPUisol.page index eb2a8022d..9d3bb9822 100644 --- a/plugins/dynamix/CPUisol.page +++ b/plugins/dynamix/CPUisol.page @@ -17,17 +17,19 @@ Tag="icon-cpu"
- +
Isolation
_(Isolation)_
- +
-
CPU isolation is prohibited while system is running in SAFE MODE!
+
_(CPU isolation is prohibited while system is running in SAFE MODE)_!
+:help3 > CPU isolation allows the user to specify CPU cores that are to be explicitly reserved for assignment (to VMs or Docker containers). > > This is incredibly important for gaming VMs to run smoothly because even if you manually pin your Docker containers to not overlap with your gaming VM, > the host OS can still utilize those same cores as the guest VM needs for things like returning responses for the webGui, running a parity check, btrfs operations, etc. +:end diff --git a/plugins/dynamix/CPUpin.page b/plugins/dynamix/CPUpin.page index 2a6d8415c..68bb30e2f 100644 --- a/plugins/dynamix/CPUpin.page +++ b/plugins/dynamix/CPUpin.page @@ -3,8 +3,8 @@ Title="CPU Pinning Docker" Tag="icon-cpu" --- - +
Container
_(Container)_
- + -
No CPU pinning available. Docker service must be started
+
_(No CPU pinning available. Docker service must be started)_
+:help2 > This page gives a total view of the current CPU pinning assignments for Docker containers.
> It also allows to modify these assignments. > @@ -43,3 +44,4 @@ Tag="icon-cpu" > Do not select cores for containers which are *isolated*. > By design a container will only use a single core (the lowest numbered core) when multiple isolated cores are selected.
> Usually this is not what a user wants when selecting multiple cores. +:end diff --git a/plugins/dynamix/CPUvms.page b/plugins/dynamix/CPUvms.page index 8b75a1ba9..1dc142078 100644 --- a/plugins/dynamix/CPUvms.page +++ b/plugins/dynamix/CPUvms.page @@ -3,8 +3,8 @@ Title="CPU Pinning VM" Tag="icon-cpu" --- { - elem.innerHTML = elem.innerHTML.replace(/(\d+)/g, `$1`); + elem.innerHTML = elem.innerHTML.replace(/(\d+)/g, `$1`); }); } }); @@ -152,16 +152,16 @@ function is() { } function notice() { // notice to reboot system after changes - var message = "CPU Isolation: A reboot is required to apply changes"; - + var message = "_(CPU Isolation: A reboot is required to apply changes)_"; + $.post('/webGui/include/CPUset.php',{id:'cmd'},function(d){ if (d==1) addRebootNotice(message); else removeRebootNotice(message); }); } function reset(form) { // undo changes without a complete refresh of the page - $(form).find('input[value="Apply"]').prop('disabled',true); - $(form).find('input[value="Reset"]').val('Done').prop('onclick',null).off('click').click(function(){done();}); + $(form).find('input[value="_(Apply)_"]').prop('disabled',true); + $(form).find('input[value="_(Reset)_"]').val('_(Done)_').prop('onclick',null).off('click').click(function(){done();}); switch ($(form).prop('name')) { case 'vm': $('#table-vm').html(""); $('div.spinner').html(unraid_logo); vm(); break; case 'ct': $('#table-ct').html(""); $('div.spinner').html(unraid_logo); ct(); break; @@ -178,8 +178,8 @@ function buttons(form) { // isolation may not have all cores selected if ($(form).prop('name')=='is' && $(this).prop('checked')) $(this).prop('checked',cores - +
VM
_(VM)_
- + -
No CPU pinning available. VM service must be started
+
_(No CPU pinning available. VM service must be started)_
+:help1 > This page gives a total view of the current CPU pinning assignments for VMs.
> It also allows to modify these assignments. > @@ -215,3 +216,4 @@ $(function(){ > When ***Apply*** is pressed a scan is performed to find the changes, subsequently only VMs which have changes are modified in parallel. > > *Important: Please wait until all updates are finished before leaving this page*. +:end diff --git a/plugins/dynamix/CacheDevices.page b/plugins/dynamix/CacheDevices.page index 21be77752..2de40eb26 100644 --- a/plugins/dynamix/CacheDevices.page +++ b/plugins/dynamix/CacheDevices.page @@ -4,8 +4,8 @@ Tag="bullseye" Cond="($var['fsState']=='Stopped' || $var['cacheSbNumDisks'])" --- - +
DeviceIdentificationTemp.ReadsWritesErrorsFSSizeUsedFreeView
_(Device)__(Identification)__(Temp)_._(Reads)__(Writes)__(Errors)__(FS)__(Size)__(Used)__(Free)__(View)_
+:help3 > **Colored Status Indicator** the significance of the color indicator at the beginning of each line in *Cache Devices* is as follows: > > Normal operation, device is active. @@ -72,8 +73,11 @@ endforeach; > automatically make use of the Cache in order to > speed up writes. A special background process called the *mover* can be scheduled to run > periodically to move user share files off the Cache and onto the Array. +:end
+:help4 > **Slots** select the number of device slots in your server designated for Cache devices. +:end diff --git a/plugins/dynamix/CacheSettings.page b/plugins/dynamix/CacheSettings.page index de1024721..05e614a7e 100644 --- a/plugins/dynamix/CacheSettings.page +++ b/plugins/dynamix/CacheSettings.page @@ -4,8 +4,8 @@ Tag="upload" Cond="((isset($disks['cache']))&&($disks['cache']['status']!='DISK_NP'))" ---
-Use cache disk: -: > + + +:help > If set to 'Yes' then User Shares can possibly make use of the Cache Disk. You still need to enable > use of the Cache Disk on individual user shares. +:end -Min. free space: +_(Min. free space)_: : +:help > This represents a "floor" of the amount of free space remaining on the cache disk. If the free > space becomes less than this value, then new files written to user shares with cache enabled will go to > the array and not the cache disk. @@ -58,7 +61,8 @@ Min. free space: > > **2GB** => 2,000,000,000 bytes
> **2000000** => 2,048,000,000 bytes +:end   -: Array must be Stopped to change +: *_(Array must be **Stopped** to change)_*
diff --git a/plugins/dynamix/Confirmations.page b/plugins/dynamix/Confirmations.page index 4e51c10dd..f54edf784 100644 --- a/plugins/dynamix/Confirmations.page +++ b/plugins/dynamix/Confirmations.page @@ -4,8 +4,8 @@ Icon="icon-confirmations" Tag="check-square" --- -Confirm reboot & powerdown commands: -: + + +:help98 > Choose if rebooting or powering down the server needs a confirmation checkbox. +:end -Confirm array stop command: -: + + +:help99 > Choose if stopping the array needs a confirmation checkbox. +:end -Confirm sleep command: -: + +   -: +: diff --git a/plugins/dynamix/Credits.page b/plugins/dynamix/Credits.page index ae13724b2..02a031df4 100644 --- a/plugins/dynamix/Credits.page +++ b/plugins/dynamix/Credits.page @@ -27,4 +27,4 @@ and may not be used in any other project without written permission from Lime Te This file shall be included in all copies or substantial portions of the Software. - + diff --git a/plugins/dynamix/DashStats.page b/plugins/dynamix/DashStats.page index 65f7a20d2..39bd763fc 100644 --- a/plugins/dynamix/DashStats.page +++ b/plugins/dynamix/DashStats.page @@ -1,8 +1,8 @@ Menu="Dashboard" --- '.ucfirst($share['security']).''; + if ($share['export']=='e') return _(ucfirst($share['security'])); + return ''._(ucfirst($share['security'])).''; } function data_devices($disk) { return $disk['type']=='Data'; @@ -176,7 +176,7 @@ span.inner{width:px} span.ups{width:124px;display:inline-block} span.busy,i.inactive{opacity:0.5} span#inbound{width:75px;display:inline-block} -span#load{width:80px;display:inline-block} +span#load{width:90px;display:inline-block} span#util{margin-left:20px} span[id^=cpu],span[id^=sys]{width:0} i.heat{margin-left:8px} @@ -189,6 +189,7 @@ input[value=Edit]{margin:12px 0 0 0;padding:5px 10px} #shares_view_on,#users_view_on,#array_view_on,#cache_view_on,#extra_view_on{display:none} form[name=boot]{display:none} .flat{height:0;lineheight:0} +.wrap{white-space:normal} .switch-button-background{top:16px} .switch-button-label{margin-top:0} @@ -205,25 +206,25 @@ form[name=boot]{display:none} - - - +_(Show details)_ + - - - - - + + + + - - - - + + - - + $peer):?> - + @@ -341,29 +342,29 @@ foreach ($ports as $port) { - -"; - else echo ""; + if ($f+1<$fans) echo ""; + else echo ""; }?> @@ -373,23 +374,22 @@ foreach ($ports as $port) { - - - - + $share) { $security = export_settings($var['shareSMBEnabled'], $sec[$name]); echo ""; } -if (!count($shares)) echo ""; +if (!count($shares)) echo ""; ?> @@ -429,7 +429,7 @@ foreach ($shares as $name => $share) { $security = export_settings($var['shareAFPEnabled'], $sec_afp[$name]); echo ""; } -if (!count($shares)) echo ""; +if (!count($shares)) echo ""; ?> @@ -442,7 +442,7 @@ foreach ($shares as $name => $share) { $security = export_settings($var['shareNFSEnabled'], $sec_nfs[$name]); echo ""; } -if (!count($shares)) echo ""; +if (!count($shares)) echo ""; ?> @@ -454,13 +454,12 @@ foreach ($shares as $name => $share) { $comment = truncate($share['comment'],40); echo ""; } -if (!count($shares)) echo ""; +if (!count($shares)) echo ""; ?> - + - - - + + - - + - - + - + - + @@ -629,8 +628,8 @@ function noVMs() { } function loadlist(init) { if (init) { - $('#apps').switchButton({labels_placement:'left', off_label:'All Apps', on_label:'Started only', checked:$.cookie('my_apps')=='startedOnly'}); - $('#vms').switchButton({labels_placement:'left', off_label:'All VMs', on_label:'Started only', checked:$.cookie('my_vms')=='startedOnly'}); + $('#apps').switchButton({labels_placement:'left', off_label:'_(All Apps)_', on_label:'_(Started only)_', checked:$.cookie('my_apps')=='startedOnly'}); + $('#vms').switchButton({labels_placement:'left', off_label:'_(All VMs)_', on_label:'_(Started only)_', checked:$.cookie('my_vms')=='startedOnly'}); $('#apps').change(function(){ $('span.outer.apps.stopped').finish().toggle('fast',function(){noApps();}) $('#apps').is(':checked') ? $.cookie('my_apps','startedOnly',{expires:3650}) : $.removeCookie('my_apps'); @@ -724,11 +723,11 @@ function portSelect(name) { } function moreInfo(data,table) { var info = []; - if (data[1]>0) info.push(data[1]+" failed device"+(data[1]==1?'':'s')); - if (data[2]>0) info.push(data[2]+" heat warning"+(data[2]==1?'':'s')); - if (data[3]>0) info.push(data[3]+" SMART error"+(data[3]==1?'':'s')); - if (data[4]>0) info.push(data[4]+" utilization warning"+(data[4]==1?'':'s')); - return info.length ? "
"+table+" has "+info.join('. ')+".
" : ""; + if (data[1]>0) info.push(data[1]+" _(failed device)_"+(data[1]==1?'':'s')); + if (data[2]>0) info.push(data[2]+" _(heat warning)_"+(data[2]==1?'':'s')); + if (data[3]>0) info.push(data[3]+" _(SMART error)_"+(data[3]==1?'':'s')); + if (data[4]>0) info.push(data[4]+" _(utilization warning)_"+(data[4]==1?'':'s')); + return info.length ? "
"+table+" _(has)_ "+info.join('. ')+".
" : ""; } function update1() { @@ -740,16 +739,16 @@ function update1() { vtun = info[0]; if (typeof n[vtun]=='undefined') n[vtun] = 0; else n[vtun]++; if (info[1] == 0) { - $('td#'+vtun+'-hs-'+n[vtun]).text('not received'); + $('td#'+vtun+'-hs-'+n[vtun]).text('_(not received)_'); } else if (info[1] > 86400) { var d = parseInt(info[1]/86400); - var s = d==1 ? '' : 's'; - $('td#'+vtun+'-hs-'+n[vtun]).text(d+' day'+s+' ago'); + var s = d==1 ? '_(day)_' : '_(days)_'; + $('td#'+vtun+'-hs-'+n[vtun]).text(d+s+' _(ago)_'); } else { var h = parseInt(info[1]/3600).pad(); var m = parseInt(info[1]/60%60).pad(); var s = parseInt(info[1]%60).pad(); - $('td#'+vtun+'-hs-'+n[vtun]).text(h+':'+m+':'+s+' ago'); + $('td#'+vtun+'-hs-'+n[vtun]).text(h+':'+m+':'+s+' _(ago)_'); } $('td#'+vtun+'-rx-'+n[vtun]).html(info[2]+'    '+info[3]+' '); } @@ -763,7 +762,7 @@ function update5() { $.each(data.split('\0'),function(k,v) {$('#fan'+k).html(v);}); }); - $.post('',{cmd:'speed',port:port_select,timestamp:timestamp,rx_bytes:rx_bytes,tx_bytes:tx_bytes},function(d) { + $.post('',{cmd:'speed',port:port_select,timestamp:timestamp,rx_bytes:rx_bytes,tx_bytes:tx_bytes,},function(d) { var data = d.split('\0'); $('#inbound').text(data[0]); $('#outbound').text(data[1]); @@ -805,14 +804,14 @@ function update30() { }); $.post('',{cmd:'array',path:'',hot:'',max:'',unit:'',text:,critical:'',warning:''},function(d) { var data = d.split('\0'); - var info = moreInfo(data,'Array'); + var info = moreInfo(data,'_(Array)_'); $('#array_list').html(data[0]); $('#array_info').parent().css('display',info?'':'none'); $('#array_info').html(info); smartMenu('#array_list'); $.post('',{cmd:'cache',path:'',hot:'',max:'',unit:'',text:,critical:'',warning:''},function(d) { var data = d.split('\0'); - var info = moreInfo(data,'Cache'); + var info = moreInfo(data,'_(Cache)_'); $('#cache_list').html(data[0]); $('#cache_info').parent().css('display',info?'':'none'); $('#cache_info').html(info); @@ -820,7 +819,7 @@ function update30() { $.post('',{cmd:'extra',path:'',hot:'',max:'',unit:'',text:,critical:'',warning:''},function(d) { var data = d.split('\0'); - var info = moreInfo(data,'Unassigned'); + var info = moreInfo(data,'_(Unassigned)_'); $('#extra_list').html(data[0]); $('#extra_info').parent().css('display',info?'':'none'); $('#extra_info').html(info); @@ -894,11 +893,11 @@ function toggleCPU(init) { if ($.cookie('cpu_view')===undefined) { if ($.cookie('cpu')===undefined) { $('.cpu_open').show(); - $('.cpu_close').text('Hide details'); + $('.cpu_close').text('_(Hide details)_'); $('.cpu_view').find('td').css('padding-bottom','0'); } else { $('.cpu_open').hide(); - $('.cpu_close').text('Show details'); + $('.cpu_close').text('_(Show details)_'); $('.cpu_view').find('td').css('padding-bottom','20px'); } } else { @@ -940,7 +939,7 @@ function toggleView(field,init,view) { } function StopArray() { - swal({title:'Proceed?',text:'This will stop the array',type:'warning',showCancelButton:true},function(){StopArrayNow();}); + swal({title:'_(Proceed)_?',text:'_(This will stop the array)_',type:'warning',showCancelButton:true},function(){StopArrayNow();}); StopArrayNow(); @@ -951,7 +950,7 @@ function StopArrayNow() { } function StartArray() { - swal({title:'Proceed?',text:'This will start the array',type:'warning',showCancelButton:true},function(){StartArrayNow();}); + swal({title:'_(Proceed)_?',text:'_(This will start the array)_',type:'warning',showCancelButton:true},function(){StartArrayNow();}); StartArrayNow(); @@ -962,7 +961,7 @@ function StartArrayNow() { } function Reboot() { - swal({title:'Proceed?',text:'This will reboot the system',type:'warning',showCancelButton:true},function(){RebootNow();}); + swal({title:'_(Proceed)_?',text:'_(This will reboot the system)_',type:'warning',showCancelButton:true},function(){RebootNow();}); RebootNow(); @@ -973,7 +972,7 @@ function RebootNow() { } function Shutdown() { - swal({title:'Proceed?',text:'This will shutdown the system',type:'warning',showCancelButton:true},function(){ShutdownNow();}); + swal({title:'_(Proceed)_?',text:'_(This will shutdown the system)_',type:'warning',showCancelButton:true},function(){ShutdownNow();}); ShutdownNow(); @@ -986,7 +985,7 @@ function ShutdownNow() { function Sleep() { - swal({title:'Proceed?',text:'This will put the system to sleep',type:'warning',showCancelButton:true},function(){SleepNow();}); + swal({title:'_(Proceed)_?',text:'_(This will put the system to sleep)_',type:'warning',showCancelButton:true},function(){SleepNow();}); SleepNow(); diff --git a/plugins/dynamix/DateTime.page b/plugins/dynamix/DateTime.page index cc042f7e8..e93ca38bc 100644 --- a/plugins/dynamix/DateTime.page +++ b/plugins/dynamix/DateTime.page @@ -18,10 +18,10 @@ Tag="clock-o" -Current date and time: -: +_(Current date and time)_: +: -Time zone: +_(Time zone)_: : +:help4 > Select your applicable time zone from the drop-down list. +:end -Use NTP: +_(Use NTP)_: : +:help5 > Select 'Yes' to use Network Time Protocol to keep your server time accurate. > We **highly** recommend the use of a network time server, especially if you plan on using Active Directory. > > Note: if using `pool.ntp.org` time servers, please also refer to [their documentation](http://www.pool.ntp.org/en/use.html). +:end -NTP server 1: +_(NTP server)_ 1: : +:help6 > This is the primary NTP server to use. Enter a FQDN or an IP address. +:end -NTP server 2: +_(NTP server)_ 2: : +:help7 > This is the alternate NTP server to use if NTP Server 1 is down. +:end -NTP server 3: +_(NTP server)_ 3: : +:help8 > This is the alternate NTP Server to use if NTP Servers 1 and 2 are both down. +:end -NTP server 4: +_(NTP server)_ 4: : +:help9 > This is the alternate NTP Server to use if NTP Servers 1, 2, and 3 are all down. +:end -New date and time: +_(New date and time)_: : "> +:help10 > Enter the current time-of-day. Use format YYYY-MM-DD HH:MM:SS. Greyed out when using NTP. +:end   -: +: - + - + +:help34 > This list shows the SMART attributes supported by this disk. For more information about each SMART attribute, it is recommended to search online. > > Attributes in *orange* may require your attention. They have a **raw value** greater than zero and may indicate a pending disk failure. > > Special attention is required when the particular attribute raw value starts to increase over time. When in doubt, consult the Limetech forum for advice. +:end diff --git a/plugins/dynamix/DeviceCapabilities.page b/plugins/dynamix/DeviceCapabilities.page index bd08edab3..37f2e0cf7 100644 --- a/plugins/dynamix/DeviceCapabilities.page +++ b/plugins/dynamix/DeviceCapabilities.page @@ -4,8 +4,8 @@ Tag="building" Cond="strpos($disks[$name]['status'],'_NP')===false" --- - + - + +:help35 > This list shows the SMART capabilities supported by this disk. > > Observe here the estimated duration of the SMART short and extended self-tests. +:end diff --git a/plugins/dynamix/DeviceIdentify.page b/plugins/dynamix/DeviceIdentify.page index 3e9f5c84a..1a5f74767 100644 --- a/plugins/dynamix/DeviceIdentify.page +++ b/plugins/dynamix/DeviceIdentify.page @@ -4,8 +4,8 @@ Tag="user" Cond="strpos($disks[$name]['status'],'_NP')===false" --- - + - + +:help36 > This list shows the SMART identity information of this disk +:end diff --git a/plugins/dynamix/DeviceInfo.page b/plugins/dynamix/DeviceInfo.page index 86ef616ba..c4672e7b8 100644 --- a/plugins/dynamix/DeviceInfo.page +++ b/plugins/dynamix/DeviceInfo.page @@ -234,125 +234,137 @@ $(function() {
-Name: -: +_(Name)_: +: -Partition size: +_(Partition size)_: : KB (K=1024) -Partition format: -: +_(Partition format)_: +: -Spinup group(s): -: +_(Spinup group(s))_: +: -Spin down delay: +_(Spin down delay)_: : -Warning disk temperature threshold (°): +_(Warning disk temperature threshold)_ (°): : +:help9 > *Warning disk temperature* sets the warning threshold for this hard disk temperature. Exceeding this threshold will result in a warning notification. > > A value of zero will disable the warning threshold (including notifications). +:end -Critical disk temperature threshold (°): +_(Critical disk temperature threshold)_ (°): : +:help10 > *Critical disk temperature* sets the critical threshold for this hard disk temperature. Exceeding this threshold will result in an alert notification. > > A value of zero will disable the critical threshold (including notifications). +:end -File system status: -:   +_(File system status)_: +:   - + -File system type: -: > + + + + + + + +:help11 > Enter the desired file system type. Changing the file system type of a device will permit you to reformat > that device using the new file system. Be aware that **all existing data on the device will be lost**. +:end 1):?> -File system type: -: > + + + -File system type: -:   +_(File system type)_: +:   -Comments: -: +_(Comments)_: +: +:help12 > This text will appear under the *Comments* column for the share in Windows Explorer. > Enter anything you like, up to 256 characters. +:end -Warning disk utilization threshold (%): +_(Warning disk utilization threshold)_ (%): : +:help13 > *Warning disk utilization* sets the warning threshold for this hard disk utilization. Exceeding this threshold will result in a warning notification. > > When the warning threshold is set equal or greater than the critical threshold, there will be only critical notifications (warnings are not existing). > > A value of zero will disable the warning threshold (including notifications). +:end -Critical disk utilization threshold (%): +_(Critical disk utilization threshold)_ (%): : +:help14 > *Critical disk utilization* sets the critical threshold for this hard disk utilization. Exceeding this threshold will result in an alert notification. > > A value of zero will disable the critical threshold (including notifications). +:end   -: +:
-
Balance Status
+
_(Balance Status)_
- + -btrfs filesystem df: -: ".shell_exec("/sbin/btrfs filesystem df /mnt/{$disk['name']}")."";?> +_(btrfs filesystem df)_: +: ".shell_exec("/sbin/btrfs filesystem df /mnt/{$disk['name']}").""?> -btrfs balance status: -: ".implode("\n", $balance_status)."";?> +_(btrfs balance status)_: +: ".implode("\n", $balance_status).""?> @@ -361,21 +373,22 @@ btrfs balance status:   -: +: 1):?> - *Perform full balance* + *_(Perform full balance)_* +:help15 > **Balance** will run the *btrfs balance* program to restripe the extents across all pool devices, for example, > to convert the pool from raid1 to raid0 or vice-versa. > @@ -392,6 +405,7 @@ btrfs balance status: > For more complete documentation, please refer to the btrfs-balance [Manpage](https://btrfs.wiki.kernel.org/index.php/Manpage/btrfs-balance) > > *Note: raid5 and raid6 are generally still considered **experimental** by the Linux community* +:end @@ -399,27 +413,29 @@ btrfs balance status:   -: +: +:help16 > **Cancel** will cancel the balance operation in progress. +:end   -: Balance is only available when array is Started." : "See Cache Settings."?> +: "._('Balance')." "._('is only available when array is Started') : _('See Cache Settings')?>
-
Scrub Status
+
_(Scrub Status)_
- + -btrfs scrub status: -: ".implode("\n", $scrub_status)."";?> +_(btrfs scrub status)_: +: ".implode("\n", $scrub_status).""?> @@ -428,12 +444,14 @@ btrfs scrub status:   -: +: +:help17 > **Scrub** runs the *btrfs scrub* program which will read all data and metadata blocks from all > devices and verify checksums. > > If *Repair corrupted blocks* is checked, *btrfs scrub* will repair corrupted blocks if there’s a correct copy available. +:end @@ -441,27 +459,29 @@ btrfs scrub status:   -: +: +:help18 > **Cancel** will cancel the Scrub operation in progress. +:end   -: Scrub is only available when array is Started." : "See Cache Settings."?> +: "._('Scrub')." "._('is only available when array is Started') : _('See Cache Settings')?>
-
Check Filesystem Status
+
_(Check Filesystem Status)_
- + -btrfs check status: -: ".implode("\n", $check_status)."";?> +_(btrfs check status)_: +: ".implode("\n", $check_status).""?> @@ -470,8 +490,9 @@ btrfs check status:   -: Options (see Help) +: _(Options (see Help))_ +:help19 > **Check** will run the *btrfs check* program to check file system integrity on the device. > > The *Options* field is initialized with *--readonly* which specifies check-only. If repair is needed, you should run @@ -481,6 +502,7 @@ btrfs check status: > how large the file system is, and what errors might be present, the operation can take **a long time** to finish (hours). > Not much info is printed in the window, but you can verify the operation is running by observing the read/write counters > increasing for the device on the Main page. +:end @@ -489,33 +511,35 @@ btrfs check status:   -: *Running* +: *_(Running)_* +:help20 > **Cancel** will cancel the Check operation in progress. +:end   -: **Check** is only available when array is Started in **Maintenance** mode. +: **_(Check)_** _(is only available when array is Started in **Maintenance** mode)_.   -: See Cache Settings. +: _(See Cache Settings)_.
-
Check Filesystem Status
+
_(Check Filesystem Status)_
- + -reiserfsck status: -: ".implode("\n", $check_status)."";?> +_(reiserfsck status)_: +: ".implode("\n", $check_status).""?> @@ -524,8 +548,9 @@ reiserfsck status:   -: Options (see Help) +: _(Options (see Help))_ +:help21 > **Check** will run the *reiserfsck* program to check file system integrity on the device. > > The *Options* field may be filled in with specific options used to fix problems in the file system. Typically, you @@ -536,6 +561,7 @@ reiserfsck status: > how large the file system is, and what errors might be present, the operation can take **a long time** to finish (hours). > Not much info is printed in the window, but you can verify the operation is running by observing the read/write counters > increasing for the device on the Main page. +:end @@ -544,27 +570,29 @@ reiserfsck status:   -: *Running* +: *_(Running)_* +:help22 > **Cancel** will cancel the Check operation in progress. +:end   -: **Check** is only available when array is Started in **Maintenance** mode. +: **_(Check)_** _(is only available when array is Started in **Maintenance** mode)_.
-
Check Filesystem Status
+
_(Check Filesystem Status)_
- + -xfs_repair status: -: ".implode("\n", $check_status)."";?> +_(xfs_repair status)_: +: ".implode("\n", $check_status).""?> @@ -573,8 +601,9 @@ xfs_repair status:   -: Options (see Help) +: _(Options (see Help))_ +:help23 > **Check** will run the *xfs_repair* program to check file system integrity on the device. > > The *Options* field is initialized with *-n* which specifies check-only. If repair is needed, you should run @@ -584,6 +613,7 @@ xfs_repair status: > how large the file system is, and what errors might be present, the operation can take **a long time** to finish (hours). > Not much info is printed in the window, but you can verify the operation is running by observing the read/write counters > increasing for the device on the Main page. +:end @@ -591,21 +621,23 @@ xfs_repair status:   -: *Running* +: *_(Running)_* +:help24 > **Cancel** will cancel the Check operation in progress. +:end   -: **Check** is only available when array is Started in **Maintenance** mode. +: **_(Check)_** _(is only available when array is Started in **Maintenance** mode)_.
-
SMART Settings
+
_(SMART Settings)_
@@ -614,21 +646,23 @@ xfs_repair status: -SMART notification value: +_(SMART notification value)_: : +:help25 > SMART notifications are generated on either an increasing RAW value of the attribute, or a decreasing NORMALIZED value which reaches a predefined threshold set by the manufacturer. > > Each disk may have its own specific setting overruling the 'default' setting (see global SMART settings under Disk Settings). +:end -SMART notification tolerance level: +_(SMART notification tolerance level)_: : +:help26 > A tolerance level may be given to prevent that small changes result in a notification. Setting a too high tolerance level may result in critical changes without a notification. > > Each disk may have its own specific setting overruling the 'default' setting (see global SMART settings under Disk Settings). +:end -SMART controller type: +_(SMART controller type)_: : /dev/ enter disk index and device name as applicable to your controller +:help27 > By default automatic controller selection is done by smartctl to read the SMART information. Certain controllers however need specific settings for smartctl to work. > Use this setting to select your controller type and fill-in the specific disk index and device name for your situation. Use the manufacturer's documentation to find the relevant information. > > Each disk may have its own specific setting overruling the 'default' setting (see global SMART settings under Disk Settings). +:end -SMART attribute notifications: -: Custom attributes (use comma to separate numbers) +_(SMART attribute notifications)_: +: _(Custom attributes (use comma to separate numbers))_   -: >Attribute = +: >_(Attribute)_ = +:help28 > The user can enable or disable notifications for the given SMART attributes. It is recommended to keep the default, which is ALL selected attributes, > when certain attributes are not present on your hard disk or do not provide the correct information, these may be excluded. > In addition custom SMART attributes can be entered to generate notifications. Be careful in this selection, > it may cause an avalance of notifcations if inappropriate SMART attributes are chosen. > > Each disk may have its own specific setting overruling the 'default' setting (see global SMART settings under Disk Settings). +:end - -: + +:
diff --git a/plugins/dynamix/Diagnostics.page b/plugins/dynamix/Diagnostics.page index ac97a883c..7c17b56dc 100644 --- a/plugins/dynamix/Diagnostics.page +++ b/plugins/dynamix/Diagnostics.page @@ -18,7 +18,11 @@ Tag="tv" - + - + +:plug1 This utility is used for troubleshooting purposes. It will collect all of the system information and configuration files, and package these files in a single ZIP file which can be saved locally. Subsequently, this file can be included in your correspondence with Limetech or the Unraid forum. This will help others to quickly get the inside information of your system and provide better support to your problem. The following information and configuration files are collected: +:end -
+
+:plug2
 + */config*
   
copy all *\*.cfg files*, *go* file and the *super.dat* file. These are configuration files. + */config/shares* @@ -71,8 +78,10 @@ and configuration files are collected:
save a SMART report of each individual disk present in your system. + *Docker*
save files *docker.log*, *libvirtd.log* and *libvirt/qemu/\*.log*. +:end
+:plug3 Clicking **Download** will start the collection process and then instruct your browser to save the zip file locally. *No personal information such as user names, passwords, or any other file contents not specified above is included @@ -82,5 +91,6 @@ by Unraid OS; however, your server name, IP address, and user share names* **wil to the system log.* *Use* **Anonymize diagnostics** *when publishing the diagnostics file in the public forum. In private communication with Limetech it is recommended to uncheck this setting and capture all information unaltered.* +:end -Anonymize diagnostics +_(Anonymize diagnostics)_ diff --git a/plugins/dynamix/DiskList.page b/plugins/dynamix/DiskList.page index 6ff9122d5..17d2584d1 100644 --- a/plugins/dynamix/DiskList.page +++ b/plugins/dynamix/DiskList.page @@ -4,8 +4,8 @@ Tag="user-circle-o" Cond="$var['fsState']!='Stopped' && $var['shareDisk']!='no'" --- - + -

+

+:help2 > **Colored Status Indicator** -- the significance of the color indicator at the beginning of each line in *Disk Shares* is as follows: > > Mounted, underlying device has redundancy/protection. @@ -57,3 +58,4 @@ $(function() { > + SMB security mode displayed in *italics* indicates exported hidden disk shares. > + AFP security mode displayed in *italics* indicates exported time-machine disk shares. > + NFS does not have special modes for disk shares. +:end diff --git a/plugins/dynamix/DiskSettings.page b/plugins/dynamix/DiskSettings.page index 7aee0c2f0..33cec7d5e 100644 --- a/plugins/dynamix/DiskSettings.page +++ b/plugins/dynamix/DiskSettings.page @@ -4,8 +4,8 @@ Icon="icon-disks" Tag="icon-disk" ---
-Enable auto start: +_(Enable auto start)_: : +:help11 > If set to 'Yes' then if the device configuration is correct upon server start-up, > the array will be automatically Started and shares exported.
> If set to 'No' then you must Start the array yourself. +:end -Default spin down delay: +_(Default spin down delay)_: : +:help12 > This setting defines the 'default' time-out for spinning hard drives down after a period > of no I/O activity. You may override the default value for an individual disk on the Disk Settings > page for that disk. +:end -Enable spinup groups: +_(Enable spinup groups)_: : +:help13 > If set to 'Yes' then the [Spinup Groups](/Help) feature is enabled. +:end -Default partition format: +_(Default partition format)_: : +:help14 > Defines the type of partition layout to create when formatting hard drives 2TB in size and > smaller **only**. (All devices larger then 2TB are always set up with GPT partition tables.) > @@ -116,136 +123,165 @@ Default partition format: > support of so-called *Advanced Format* drives. > > Unless you have a specific requirement do not change this setting from the default **MBR: 4K-aligned**. +:end -Default file system: +_(Default file system)_: : +:help15 > Defines the default file system type to create when an *unmountable* array device is formatted. > > The default file system type for a single or multi-device cache is always Btrfs. +:end -Shutdown time-out: +_(Shutdown time-out)_: : +:help16 > When shutting down the server, this defines how long to wait in seconds for *graceful* shutdown before forcing > shutdown to continue. +:end -Tunable (poll_attributes): -: +_(Tunable (poll_attributes))_: +: +:help17 > This defines the disk SMART polling interval, in seconds. A value of 0 disables SMART polling (not recommended). +:end -Tunable (enable NCQ): +_(Tunable (enable NCQ))_: : +:help18 > If set to **No** then *Native Command Queuing* is disabled for all array devices that support NCQ. > > **Auto** leaves the setting for each device as-is. > > Note: You must reboot after selecting Auto for setting to take effect. +:end -Tunable (nr_requests): -: +_(Tunable (nr_requests))_: +: +:help19 > This defines the `nr_requests` device driver setting for all array devices. > > **Auto** leaves the setting for each device as-is. > > Note: if you set to blank and click Apply, the setting is restored to its default, and you must reboot for setting to take effect. +:end -Tunable (scheduler): +_(Tunable (scheduler))_: : +:help20 > Selects which kernel I/O scheduler to use for all array devices. > > **Auto** leaves the setting for each device as-is (mq-deadline). > > Note: You must reboot after selecting Auto for setting to take effect. +:end -Tunable (md_num_stripes): -: +_(Tunable (md_num_stripes))_: +: +:help21 > This is the size of the *stripe pool* in number of *stripes*. A *stripe* refers to a data structure that faclitiates parallel 4K read/write > operations necessary for a parity-protected array. > > Note: if you set to blank and click Apply, the setting is restored to its default, and will take effect after reboot. +:end -Tunable (md_queue_limit): -: +_(Tunable (md_queue_limit))_: +: +:help22 > This is a number in [1..100] which is the maximum steady-load percentage of the stripe pool permitted to be in use. > > Note: if you set to blank and click Apply, the setting is restored to its default. +:end -Tunable (md_sync_limit): -: +_(Tunable (md_sync_limit))_: +: +:help23 > This is a number in [0..100] which is the maximum percentage of the stripe pool allocated for parity sync/check in the presence of other I/O. > > Note: if you set to blank and click Apply, the setting is restored to its default. +:end -Tunable (md_write_method): +_(Tunable (md_write_method))_: : +:help24 > Selects the method to employ when writing to enabled disk in parity protected array. > > *Auto* selects `read/modify/write`. +:end -Default warning disk utilization threshold (%): +_(Default warning disk utilization threshold)_ (%): : +:help25 > *Warning disk utilization* sets the default warning threshold for all hard disks utilization. Exceeding this threshold will result in a warning notification. > > When the warning threshold is set equal or greater than the critical threshold, there will be only critical notifications (warnings are not existing). > > A value of zero will disable the warning threshold (including notifications). +:end -Default critical disk utilization threshold (%): +_(Default critical disk utilization threshold)_ (%): : +:help26 > *Critical disk utilization* sets the default critical threshold for all hard disks utilization. Exceeding this threshold will result in an alert notification. > > A value of zero will disable the critical threshold (including notifications). +:end -Default warning disk temperature threshold (°): +_(Default warning disk temperature threshold)_ (°): : +:help27 > *Warning disk temperature* sets the default warning threshold for all hard disks temperature. Exceeding this threshold will result in a warning notification. > > A value of zero will disable the warning threshold (including notifications). +:end -Default critical disk temperature threshold (°): +_(Default critical disk temperature threshold)_ (°): : +:help28 > *Critical disk temperature* sets the default critical threshold for all hard disks temperature. Exceeding this threshold will result in an alert notification. > > A value of zero will disable the critical threshold (including notifications). +:end   -: +:
-
Global SMART Settings
+
_(Global SMART Settings)_
@@ -254,19 +290,21 @@ Default critical disk temperature threshold (°): -Default SMART notification value: +_(Default SMART notification value)_: : +:help29 > SMART notifications are generated on either an increasing RAW value of the attribute, or a decreasing NORMALIZED value which reaches a predefined threshold set by the manufacturer. > > This section is used to set the global settings for all disks. It is possible to adjust settings for individual disks. +:end -Default SMART notification tolerance level: +_(Default SMART notification tolerance level)_: : +:help30 > A tolerance level may be given to prevent that small changes result in a notification. Setting a too high tolerance level may result in critical changes without a notification. > > This section is used to set the global settings for all disks. It is possible to adjust settings for individual disks. +:end -Default SMART controller type: +_(Default SMART controller type)_: : +:help31 > By default automatic controller selection is done by smartctl to read the SMART information. Certain controllers however need specific settings for smartctl to work. > Use this setting to select your controller type and fill-in the specific disk index and device name for your situation. Use the manufacturer's documentation to find the relevant information. > > This section is used to set the global settings for all disks. It is possible to adjust settings for individual disks. +:end -Default SMART attribute notifications: -: Custom attributes (use comma to separate numbers) +_(Default SMART attribute notifications)_: +: _(Custom attributes (use comma to separate numbers))_   -: >Attribute = +: >_(Attribute)_ = +:help32 > The user can enable or disable notifications for the given SMART attributes. It is recommended to keep the default, which is ALL selected attributes, > when certain attributes are not present on your hard disk or do not provide the correct information, these may be excluded. > In addition custom SMART attributes can be entered to generate notifications. Be careful in this selection, > it may cause an avalance of notifcations if inappropriate SMART attributes are chosen. > > This section is used to set the global settings for all disks. It is possible to adjust settings for individual disks. +:end - -: + +:
diff --git a/plugins/dynamix/DisplaySettings.page b/plugins/dynamix/DisplaySettings.page index ee145e405..5d3290b56 100644 --- a/plugins/dynamix/DisplaySettings.page +++ b/plugins/dynamix/DisplaySettings.page @@ -4,8 +4,8 @@ Icon="icon-display" Tag="desktop" --- - "; $icon = ""; +$keys = parse_ini_file('webGui/include/languages.key'); ?> - + + +
+ + +_(Installed languages)_: +: + +_(Select language)_: +: _(Remove the installed language)_ + +
+_(Select language file)_: +: + +
+  +: +
diff --git a/plugins/dynamix/LogButton.page b/plugins/dynamix/LogButton.page index b2315ec29..f9a7f89c0 100644 --- a/plugins/dynamix/LogButton.page +++ b/plugins/dynamix/LogButton.page @@ -4,8 +4,8 @@ Icon="icon-u-log" Code="e936" --- diff --git a/plugins/dynamix/LogoutButton.page b/plugins/dynamix/LogoutButton.page index ebcc52c25..3b2522047 100644 --- a/plugins/dynamix/LogoutButton.page +++ b/plugins/dynamix/LogoutButton.page @@ -5,8 +5,8 @@ Icon="icon-u-logout" Code="e937" --- function provisionSSL(button) { var oldlabel = $.trim($(button).text()); - $(button).prop("disabled", true).html(" "+oldlabel+"ing"); - var msg = "Your Let's Encrypt SSL Certificate has been provisioned and a DNS record for local IP address has been created on unraid.net."; + $(button).prop("disabled", true).html(""+oldlabel); + var msg = "_(Your Let's Encrypt SSL Certificate has been provisioned and a DNS record for local IP address)_ _(has been created on unraid.net)_."; var failure = function(data) { var status = data.status; var obj = data.responseJSON; - msg = "Sorry, an error ("+status+") occurred "+oldlabel.toLowerCase()+"ing your SSL certificate. " + - "The error is: "+obj.error+"."; + var msg = "_(Sorry, an error occurred in processing your SSL certificate)_. _(The error is)_: "+obj.error+"."; $(button).prop("disabled", false).html(oldlabel); - swal("Oops",msg,"error"); + swal("_(Oops)_",msg,"error"); }; var success_provision = function(data) { if (data.bundle) { if (oldlabel == 'Renew') { - msg = "Your Let's Encrypt SSL Certificate has been renewed."; + msg = "_(Your Let's Encrypt SSL Certificate has been renewed)_."; success_rebind_check(data); } else { $.get("//"+data.internal_dns+":/dnscheck",function() { success_rebind_check(data); }).fail(function(){ - failure({"status":403, "responseJSON":{"error": "Your router or DNS server has DNS rebinding protection enabled, preventing "+data.internal_dns+" resolution. See Help for more details and workarounds"}}); + failure({"status":403, "responseJSON":{"error":"_(Your router or DNS server has DNS rebinding protection enabled, preventing)_ "+data.internal_dns+" _(resolution)_. _(See Help for more details and workarounds)_"}}); }); } } else { - failure({"status":403, "responseJSON":{"error": "Server was unable to provision SSL certificate"}}); + failure({"status":403, "responseJSON":{"error":"_(Server was unable to provision SSL certificate)_"}}); } }; var success_rebind_check = function(data) { @@ -85,17 +84,17 @@ function provisionSSL(button) { $.post("/webGui/include/ProvisionCert.php",success_provision).fail(failure); } function updateDNS(button) { - $(button).prop("disabled", true).html(" Updating DNS"); + $(button).prop("disabled", true).html("_(Update DNS)_"); var failure = function(data) { var status = data.status; var obj = data.responseJSON; - var msg = "Sorry, an error ("+status+") occurred updating unraid.net DNS records. The error is: "+obj.error+"."; - $(button).prop("disabled", false).html("Update DNS"); - swal('Oops',msg,'error'); + var msg = "_(Sorry, an error occurred updating unraid.net DNS records)_. _(The error is)_: "+obj.error+"."; + $(button).prop("disabled", false).html('_(Update DNS)_'); + swal("_(Oops)_",msg,"error"); }; var success = function(data) { - $(button).prop("disabled", false).html("Update DNS"); - swal("","Your local IP address has been updated for unraid.net.","success"); + $(button).prop("disabled", false).html('_(Update DNS)_'); + swal("","_(Your local IP address)_ _(has been updated for unraid.net)_.","success"); }; $.post("/webGui/include/UpdateDNS.php",success).fail(failure); } @@ -112,19 +111,19 @@ function checkPorts(form) { item.prop('disabled',false); } if (list.length > 0) { - swal({title:'Non-recommended port'+(list.length>1?'s':''),text:list.join(', ')+'
may conflict with well-known services',html:true,type:'warning',showCancelButton:true},function(){form.submit();}); + swal({title:'_(Non-recommended port)_'+(list.length>1?'s':''),text:list.join(', ')+'
_(may conflict with well-known services)_',html:true,type:'warning',showCancelButton:true},function(){form.submit();}); } else { form.submit(); } } function updateTELNET(form) { - form.PORTTELNET.disabled = form.USE_TELNET.value=='no'; + form.PORTTELNET.disabled = form.USE_TELNET.value=='_(no)_'; } function updateSSH(form) { - form.PORTSSH.disabled = form.USE_SSH.value=='no'; + form.PORTSSH.disabled = form.USE_SSH.value=='_(no)_'; } function updateSSL(form) { - form.PORTSSL.disabled = form.USE_SSL.value=='no'; + form.PORTSSL.disabled = form.USE_SSL.value=='_(no)_'; } $(function(){ var form = document.SSLSettings; @@ -135,18 +134,20 @@ $(function(){
-Start page: -: +:help58 > Select the page which is opened first when entering the GUI. By default the *Main* page is selected. +:end -Use TELNET: -: + + +:help59 > By default TELNET access is enabled. TELNET is an insecure type of CLI access however, > and it is highly recommended to use SSH access instead and disable TELNET access. +:end -TELNET port: +_(TELNET port)_: : +:help60 > Enter the TELNET port, default port is 23. +:end -Use SSH: -: + + +:help61 > SSH is enabled by default and offers a secure way of CLI access. Upon system startup SSH keys are automatically generated > if not yet existing, and stored on the flash device in the folder */config/ssh*. +:end -SSH port: +_(SSH port)_: : +:help62 > Enter the SSH port, default port is 22. +:end -Use UPnP: -: + + +:help63 > Enable (default) or disable the UPnP function on the server. This function allows automatic forwarding of ports on the router, only applicable when UPnP is enabled on the router itself. +:end -Use SSL/TLS: -: + + + +:help64 > Determines how the webGUI responds to HTTP and/or HTTPS protocol. > > Select **No** to disable HTTPS @@ -238,42 +250,50 @@ Use SSL/TLS: > Whether nginx enables OCSP Staping is determined by which certificate is in use:
> `config/ssl/certs/certificate_bundle.pem` => Yes
> `config/ssl/certs/_unraid_bundle.pem` => No +:end -HTTP port: +_(HTTP port)_: : +:help65 > Enter the HTTP port, default port is 80. +:end -HTTPS port: +_(HTTPS port)_: : +:help66 > Enter the HTTPS port, default port is 443. +:end -Local TLD: +_(Local TLD)_: : +:help67 > Enter your local Top Level Domain. May be blank. +:end   -: +:
-Certificate issuer: +_(Certificate issuer)_: : -Certificate expiration: -: +_(Certificate expiration)_: +:   -: +: +:help68 > **Provision** may be used to allocate a *free* SSL Certficiate from [Let's Encrypt](https://letsencrypt.org/) and > then upload to your server. Note: We **highly** recommend using a static IP address in this case. @@ -313,5 +333,6 @@ Certificate expiration: > When all else fails, you can create an entry in your PC's *hosts* file to override external DNS and > directly resolve your servers unraid.net FQDN to its local IP address. +:end
diff --git a/plugins/dynamix/MoverSettings.page b/plugins/dynamix/MoverSettings.page index ffd544695..6f9a4338a 100644 --- a/plugins/dynamix/MoverSettings.page +++ b/plugins/dynamix/MoverSettings.page @@ -3,8 +3,8 @@ Title="Mover Settings" Tag="calendar-check-o" --- No Cache disk present!

"; + echo "

"._('No Cache disk present')."!

"; } elseif ($var['shareCacheEnabled']!='yes') { - echo "

Cache disk not enabled!

"; + echo "

"._('Cache disk not enabled')."!

"; } elseif ($var['shareUser']=='-') { - echo "

User shares not enabled!

"; + echo "

"._('User shares not enabled')."!

"; } $cron = explode(' ',$var['shareMoverSchedule']); $move = $cron[2]!='*' ? 3 : ($cron[4]!='*' ? 2 : (substr($cron[1],0,1)!='*' ? 1 : 0)); @@ -54,78 +54,88 @@ function presetMover(form) { }
-Mover schedule: -: - + +:help171 > Choose a mover schedule ranging from hourly, daily, weekly and monthly. > > The interval determines how fast the mover will activated, it runs in the background. +:end -Day of the week: -: - + +:help172 > Choose a day when the weekly schedule is selected. Otherwise disabled. +:end -Day of the month: -: +:help173 > Choose a date when the monthly schedule is selected. Otherwise disabled. +:end -Time of the day: -: style="display:none"> -   HH:MM -: style="display:none"> + + + + + + +:help174 > When an hourly schedule is selected this will set the interval in hours. An interval always starts on the whole hour (minute 0). > > For the other schedules choose here the time of the day the mover should start. +:end -Mover logging: -: + + +:help175 > Write mover messages to the syslog file. +:end   -: +:   -: Mover is running. +: _(Mover is running)_. -: Click to invoke the Mover. +: _(Click to invoke the Mover)_.
\ No newline at end of file diff --git a/plugins/dynamix/NFS.page b/plugins/dynamix/NFS.page index 373760588..fbc643955 100644 --- a/plugins/dynamix/NFS.page +++ b/plugins/dynamix/NFS.page @@ -4,8 +4,8 @@ Icon="icon-linux" Tag="linux" --- function checkNFSenable() { var form = document.nfs_enable; - form.fuse_remember.disabled = form.shareNFSEnabled.value=="no"; + form.fuse_remember.disabled = form.shareNFSEnabled.value=="_(no)_"; } $(checkNFSenable);
-Enable NFS: -: + + +:help83 > Select 'Yes' to enable the NFS protocol. +:end -Tunable (fuse_remember): -: +_(Tunable (fuse_remember))_: +: +:help84 > When NFS is enabled, this Tunable may be used to alleviate or solve instances of "NFS Stale File Handles" > you might encounter with your NFS client. > @@ -57,7 +60,8 @@ Tunable (fuse_remember): > your client. Be aware that setting a value of -1 will cause the memory footprint to grow by approximatel > 108 bytes per file/directory name cached. Depending how much RAM is installed in your server and how many > files/directories you access via NFS this may or may not lead to out-of-memory conditions. +:end   -: +:
\ No newline at end of file diff --git a/plugins/dynamix/NetworkRules.page b/plugins/dynamix/NetworkRules.page index 1b59314fe..7481976a5 100644 --- a/plugins/dynamix/NetworkRules.page +++ b/plugins/dynamix/NetworkRules.page @@ -4,8 +4,8 @@ Tag="icon-network" Cond="file_exists('/boot/config/network-rules.cfg')" --- "> $file):?> -Interface : -: $val):?> @@ -99,9 +99,10 @@ Interface :   -: +: +:help > The interface assignment rules can be changed here and might be necessary to set the preferred interface for managing Unraid - *use with care, usually there is no need to change*. > > **eth0** is the main interface used to manage the Unraid system. The other interfaces are optional and may be used as desired. @@ -109,8 +110,9 @@ Interface : > > The interface assignment is stored on the flash device under */config/network-rules.cfg*. This file can be viewed with any editor, but it is recommended to make changes via the webGUI only.
> Deleting the file *network-rules.cfg* from the flash device will restore automatic interface assignment after a system reboot. +:end -
Please Reboot system to make new rules active +
_(Please **Reboot** system to make new rules active)_ diff --git a/plugins/dynamix/NewConfig.page b/plugins/dynamix/NewConfig.page index eab6e193f..634e016be 100644 --- a/plugins/dynamix/NewConfig.page +++ b/plugins/dynamix/NewConfig.page @@ -4,8 +4,8 @@ Icon="icon-config" Tag="cog" --- +:plug4 This is a utility to reset the array disk configuration so that all disks appear as "New" disks, as if it were a fresh new server. @@ -59,6 +60,7 @@ Use the *'Preserve current assignments'* selection to populate the desired disk **DO NOT USE THIS UTILITY THINKING IT WILL REBUILD A FAILED DRIVE** - it will have the opposite effect of making it ***impossible*** to rebuild an existing failed drive - you have been warned! +:end
@@ -66,20 +68,20 @@ effect of making it ***impossible*** to rebuild an existing failed drive - you h -Preserve current assignments: - + + + +
- + -Array has been Reset (please configure) +_(Array has been **Reset**)_ (_(please configure)_) -Array must be Stopped +_(Array must be **Stopped** to change)_ -Yes I want to do this +_(Yes, I want to do this)_
diff --git a/plugins/dynamix/NewPerms.page b/plugins/dynamix/NewPerms.page index 62c5df24c..83ec09634 100644 --- a/plugins/dynamix/NewPerms.page +++ b/plugins/dynamix/NewPerms.page @@ -4,8 +4,8 @@ Icon="icon-permissions" Tag="folder-o" --- + + + +:plug5 This is a mandatory one-time action to be taken after upgrading from a pre-5.0 Unraid server release to Unraid v5 or a later release. Select **ALL DISKS** when performing this one-time action. @@ -57,7 +66,10 @@ directories when transitioning back from Active Directory to non-Active Director The utility starts a background process that goes to each of your data disks and cache disks and selected user shares and changes file and directory ownership to *nobody/users* (i.e., uid/gid to 99/100), and sets permissions as follows: -~~~ +:end + +
+:plug6
 For directories:
   drwxrwxrwx
 
@@ -66,40 +78,42 @@ For read/write files:
 
 For readonly files:
   -r--r--r--
-~~~
+:end
+
+ +:plug7 Clicking **Start** will open another window and start the background process. Closing the window before completion will terminate the background process - so don't do that. This process can take a long time if you have many files. Note that this tool may negatively affect any docker containers if you allow your appdata share to be included. +:end
- -Disks +
_(Disks)_
- -User Shares +
_(User Shares)_
-

+ - +
- Array must be Started to change permissions. +
_(Array must be **Started** to change permissions)_.
diff --git a/plugins/dynamix/NotificationAgents.page b/plugins/dynamix/NotificationAgents.page index 116c3a833..e6258d194 100644 --- a/plugins/dynamix/NotificationAgents.page +++ b/plugins/dynamix/NotificationAgents.page @@ -3,8 +3,8 @@ Title="Notification Agents" Tag="rss-square" --- ,explicitClose:'...close'}); openPage = false;} + if (openPage) {$("[id^='slot_']").dropdownchecklist({width:,explicitClose:'..._(close)_'}); openPage = false;} }
@@ -90,7 +90,7 @@ function initDropdown() { Agent as $agent) { $name = str_replace(' ','_',$agent->Name); $enabledAgent = agent_fullname("$name.sh", "enabled"); @@ -115,7 +115,7 @@ foreach ($xml->Agent as $agent) { } } foreach (explode(PHP_EOL,(String) $agent->Script) as $line) if (trim($line)) $script .= trim($line)."{1}"; - echo '
'.str_replace('_',' ',$name).''.(is_file($enabledAgent) ? 'Enabled' : 'Disabled').'
'; + echo '
'.str_replace('_',' ',$name).''.(is_file($enabledAgent) ? ''._("Enabled").'' : ''._("Disabled").'').'
'; echo ''; echo ''; echo ''; @@ -123,9 +123,9 @@ foreach ($xml->Agent as $agent) { echo ''; echo ''; echo ''; - echo '
Agent function:
'; + echo mk_option(is_file($disabledAgent), 'no', _('Disabled')); + echo mk_option(is_file($enabledAgent), 'yes', _('Enabled')); echo '
'; echo ''; $i = 1; @@ -136,10 +136,10 @@ foreach ($xml->Agent as $agent) { $vHelp = preg_replace('#\[([^\]]*)\]#', '<$1>', $v->attributes()->Help); echo "
$vDesc:
"; if (preg_match('/title|message/', $vDesc)) { - echo ''; $i++; $value = str_replace('\n',',',isset($values[$vName]) ? $values[$vName] : $vDefault); - foreach ($fields as $field) echo mk_option_check($value,'$'.strtoupper($field),$field); + foreach ($fields as $field) echo mk_option_check($value,'$'.strtoupper($field),_($field)); echo ''; } else { echo ''; @@ -147,11 +147,11 @@ foreach ($xml->Agent as $agent) { echo '
'; if ($vHelp) echo '
'.$vHelp.'
'; } - echo '
 
'; - echo ''; + echo '
 
'; + echo ''; if (is_file($file)) { - echo ''; - echo '' : ' disabled>'); + echo ''; + echo '' : ' disabled>'); } echo '
'; } diff --git a/plugins/dynamix/Notifications.page b/plugins/dynamix/Notifications.page index 96ad194ed..4a6c710e2 100644 --- a/plugins/dynamix/Notifications.page +++ b/plugins/dynamix/Notifications.page @@ -5,8 +5,8 @@ Icon="icon-notifications" Tag="phone-square" --- -Notifications display: -: + + +:help176 > In *Detailed* view all notifications will be displayed on screen as soon as they arrive.
> Notifications can be acknowledged individually or all in once. > > In *Summarized* view notifications will be counted only and the number of unread notifications is shown in the menu header per category.
> Click on the counters to either acknowledge or view the unread notifications. +:end -Date format: -: + + + +:help177 > Select the desired date format which is used in the notifications archive. Recommended is YYYY-MM-DD, which makes the date/time column sortable in a sensible way. +:end -Time format: -: + + +:help178 > Select the desired time format which is used in the notifications archive. Recommended is 24 hours, which makes the date/time column sortable in a sensible way. +:end -Display position: -: + + + + + +:help179 > Choose the position of where notifications appear on screen. Multiple notifications are stacked, bottom-to-top or top-to-bottom depending on the selected placement. +:end -Store notifications to flash: -: + + +:help180 > By default notifications are stored on RAM disk, which will get lost upon system reboot. > Notifications may be stored permanently on the flash drive under folder '/boot/config/plugins/dynamix' instead. +:end -System notifications: -: + + +:help181 > By default the notifications system is disabled. Enable it here to start receiving notifications. > The following sections give more options about which and what type of notifications will be sent. +:end -Unraid OS update notification: -: + + + + + + +:help182 > Start a periodic verification and notify the user when a new version of the Unraid OS system is detected. > Use the checkboxes below to select how notifications need to be given; by browser, by email and/or by custom agent. +:end -Plugins update notification: -: + + + + + + +:help183 > Start a periodic verification and notify the user when a new version of one or more of the installed plugins is detected. > Use the checkboxes below to select how notifications need to be given; by browser, by email and/or by custom agent. +:end -Docker update notification: -: + + + + + + +:help184 > Start a periodic verification and notify the user when a new version of one or more of the installed dockers is detected. > Use the checkboxes below to select how notifications need to be given; by browser, by email and/or by custom agent. +:end -Array status notification: -: + + + + + + + + + +:help185 > Start a periodic array health check (preventive maintenance) and notify the user the result of this check. +:end -: +: -: +: -: +: -: +: +:help186 > Use the checkboxes above to select what and how notifications need to be given; by browser, by email and/or by a service.
> Tip: you can use custom notification agents; just add them to "/boot/config/plugins/dynamix/notification/agents" directory and check 'Agents'. +:end -Notification entity: -: Notices - >Browser   - >Email   - >Agents   +_(Notification entity)_: +: _(Notices)_ + >_(Browser)_   + >_(Email)_   + >_(Agents)_     -: Warnings - >Browser   - >Email   - >Agents   +: _(Warnings)_ + >_(Browser)_   + >_(Email)_   + >_(Agents)_     -: Alerts - >Browser   - >Email   - >Agents   +: _(Alerts)_ + >_(Browser)_   + >_(Email)_   + >_(Agents)_   +:help187 > Notifications are classified as: > > *notice* - these are informative notifications and do not indicate a problem situation, e.g. a new version is available
@@ -264,7 +287,8 @@ Notification entity: > *alert* - these are serious notifications and require immediate attention, e.g. a failing hard disk
> > Choose for each classification how you want to be notified. +:end - -: + +: diff --git a/plugins/dynamix/NotificationsArchive.page b/plugins/dynamix/NotificationsArchive.page index dd01eaf72..23f71e7c2 100644 --- a/plugins/dynamix/NotificationsArchive.page +++ b/plugins/dynamix/NotificationsArchive.page @@ -62,7 +62,7 @@ function archiveList(init) { }); } function askConfirmation() { - swal({title:"Are you sure?",text:"This will delete all notification files!",type:"warning",showCancelButton:true},function(){$.post('/webGui/include/DeleteLogFile.php',{log:'*.notify'},function(){archiveList();});}); + swal({title:"_(Are you sure)_?",text:"_(This will delete all notification files)_!",type:"warning",showCancelButton:true},function(){$.post('/webGui/include/DeleteLogFile.php',{log:'*.notify'},function(){archiveList();});}); } function openClose(row) { var extra = '#archive_list .tablesorter-childRow.row'+row+' td'; @@ -84,7 +84,7 @@ $(function(){ // Adjust the width of thead cells when window resizes - +
TimeEventSubjectDescriptionImportance
_(Time)__(Event)__(Subject)__(Description)__(Importance)_
- + diff --git a/plugins/dynamix/OpenDevices.page b/plugins/dynamix/OpenDevices.page index 7e398cb8b..86903697d 100644 --- a/plugins/dynamix/OpenDevices.page +++ b/plugins/dynamix/OpenDevices.page @@ -4,8 +4,8 @@ Tag="unlink" Cond="((count($devs)>0)&&($var['fsState']=='Started'))" --- - +
DeviceIdentificationTemp.ReadsWritesErrorsFSSizeUsedFreeView
_(Device)__(Identification)__(Temp)_._(Reads)__(Writes)__(Errors)__(FS)__(Size)__(Used)__(Free)__(View)_
+:help37 > These are devices installed in your server but not assigned to either the parity-protected > array or the cache disk/pool. +:end diff --git a/plugins/dynamix/PageMap.page b/plugins/dynamix/PageMap.page index 99cc4ac3e..6d542e642 100644 --- a/plugins/dynamix/PageMap.page +++ b/plugins/dynamix/PageMap.page @@ -4,8 +4,8 @@ Icon="icon-pagemap" Tag="map-o" --- "; ?> - + diff --git a/plugins/dynamix/ParityCheck.page b/plugins/dynamix/ParityCheck.page index 47089a9dd..8c60ef36a 100644 --- a/plugins/dynamix/ParityCheck.page +++ b/plugins/dynamix/ParityCheck.page @@ -3,8 +3,8 @@ Title="Parity Check" Tag="calendar" --- No Parity disk present!

"; + echo "

"._('No Parity disk present')."!

"; } $width = [166,300]; $mode = ['Disabled','Daily','Weekly','Monthly','Yearly','Custom']; @@ -35,8 +35,8 @@ if (file_exists($memory)) { diff --git a/plugins/dynamix/SMBActiveDirectory.page b/plugins/dynamix/SMBActiveDirectory.page index c71a7292d..2174a1d7a 100644 --- a/plugins/dynamix/SMBActiveDirectory.page +++ b/plugins/dynamix/SMBActiveDirectory.page @@ -4,8 +4,8 @@ Tag="list-ul" Cond="($var['shareSMBEnabled']=='ads')" ---
-AD join status: +_(AD join status)_: :   -AD domain name (FQDN): +_(AD domain name)_ (FQDN): : -AD short domain name: +_(AD short domain name)_: : -AD account login: +_(AD account login)_: : -AD account password: +_(AD account password)_: :   : - + - +

-AD initial owner: +_(AD initial owner)_: : -AD initial group: +_(AD initial group)_: :   -: +:
\ No newline at end of file diff --git a/plugins/dynamix/SMBExtras.page b/plugins/dynamix/SMBExtras.page index e2131601a..fe0cac562 100644 --- a/plugins/dynamix/SMBExtras.page +++ b/plugins/dynamix/SMBExtras.page @@ -4,8 +4,8 @@ Cond="($var['shareSMBEnabled']!='no')" Tag="share-alt-square" --- -Samba extra configuration: +_(Samba extra configuration)_: :   -: Array must be Stopped to change +: *_(Array must be **Stopped** to change)_* +:help78 > Click the **Apply** button to commit the current edits. Click **Reset** to > undo any changes you make (before Saving). Click **Done** to exit this page. +:end diff --git a/plugins/dynamix/SMBWorkGroup.page b/plugins/dynamix/SMBWorkGroup.page index 28043d55b..f0e3cfd63 100644 --- a/plugins/dynamix/SMBWorkGroup.page +++ b/plugins/dynamix/SMBWorkGroup.page @@ -4,8 +4,8 @@ Tag="sitemap" Cond="($var['shareSMBEnabled']=='yes')" ---
-Workgroup: +_(Workgroup)_: : disabled> +:help79 > Enter your local network Workgroup name. Usually this is "WORKGROUP". +:end -Local master: +_(Local master)_: : +:help80 > If set to 'Yes' then the server will fully participate in browser elections, and in the absense > of other servers, will usually become the local Master Browser. +:end   -: Array must be Stopped to change +: *_(Array must be **Stopped** to change)_*
diff --git a/plugins/dynamix/SMBsettings.page b/plugins/dynamix/SMBsettings.page index 9abd3ed7b..da89632ce 100644 --- a/plugins/dynamix/SMBsettings.page +++ b/plugins/dynamix/SMBsettings.page @@ -16,66 +16,78 @@ Tag="windows" ?>
-Enable SMB: -: disabled> + + + +:help72 > Select 'Yes (Workgroup)' to enable SMB (Windows Networking) protocol support. This > also enables Windows host discovery. > > Select 'Yes (Active Directory)' to enable Active Directory integration. +:end -Hide "dot" files: -: disabled> + + +:help73 > If set to 'Yes' then files starting with a '.' (dot) will appear as *hidden files* and normally > will not appear in Windows folder lists unless you have "Show hidden files, folders, and drives" enabled > in Windows Folder Options. > If set to 'No' then dot files will appear in folder lists the same as any other file. +:end -Enhanced macOS interoperability: -: disabled> + + +:help74 > When set to 'Yes' provides enhanced compatibility with Apple SMB clients, resulting, for example, in faster > Finder browsing, and ability to export Time Machine shares. This may cause some issues with Windows clients, however. > Please also refer to the [VFS_FRUIT MAN PAGE](https://www.mankier.com/8/vfs_fruit). +:end -Enable NetBIOS: -: disabled> + + +:help75 > Select 'Yes' to enable NetBIOS. If enabled, SMBv1 protocol will also be recognized. If disabled, > clients must use SMBv2 or higher. +:end -Enable WSD: -: disabled> + + +:help76 > Select 'Yes' to enable WSD (WS-Discovery). The only reason to turn this off is when you are running an > old LAN setup based on SMBv1. +:end -WSD options [experimental]: +_(WSD options [experimental])_: : disabled> -> This is a command line otions string passed to the WSD daemon upon startup. Leave this field blank unless +:help77 +> This is a command line otions string passed to the WSD daemon upon startup. Leave this field blank unless > instructed by support to put something here. +:end   -: Array must be Stopped to change +: *_(Array must be **Stopped** to change)_*
- +

- + -':' disabled>User shares must be enabled to add shares.'?> +':' disabled>User shares must be enabled to add shares.'?> - +

+:help1 > **Colored Status Indicator** -- the significance of the color indicator at the beginning of each line in *User Shares* is as follows: > > All files are on protected storage. @@ -64,3 +65,4 @@ $(function() { > + SMB security mode displayed in *italics* indicates exported hidden user shares. > + AFP security mode displayed in *italics* indicates exported time-machine user shares. > + NFS does not have special modes for user shares. +:end diff --git a/plugins/dynamix/ShareSettings.page b/plugins/dynamix/ShareSettings.page index 71033864e..af1c42ee5 100644 --- a/plugins/dynamix/ShareSettings.page +++ b/plugins/dynamix/ShareSettings.page @@ -5,8 +5,8 @@ Icon="icon-share" Tag="share-alt" ---
-Enable disk shares: -: > + + + +:help85 > If set to No, disk shares are unconditionally not exported. > > If set to Yes, disk shares may be exported. **WARNING:** Do not copy data from a disk share to a user share > unless you *know* what you are doing. This may result in the loss of data and is not supported. > > If set to Auto, only disk shares not participating in User Shares may be exported. +:end -Enable user shares: -: > + + +:help86 > If set to 'Yes' the User Shares feature is activated. +:end -Included disk(s): -: +:help87 > This setting defines the set of array disks which are *included* in User Shares. > Unchecking all disks will allow **all** array disks to be included. +:end -Excluded disk(s): -: +:help88 > This setting defines the set of array disk which are *excluded* from User Shares. > Uncheck all disks in order to not exclude any disks > > **Note:** Each separate User Share also includes its own set of Included and Excluded > disks which represent a subset of the Included/Excluded disks defined here. +:end -Tunable (support Hard Links): -: > + + +:help89 > If set to Yes then support the link() operation. > > If set to No then hard links are not supported. > > Notes: > -> * Setting to Yes may cause problems for older media and dvd/bluray players accessing shares -> using NFS. -> * No matter how this is set, the **mover** will still properly handle any detected -> hard links. +> * Setting to Yes may cause problems for older media and dvd/bluray players accessing shares using NFS. +> * No matter how this is set, the **mover** will still properly handle any detected hard links. +:end -Tunable (enable Direct IO): -: > + + + +:help90 > **Experimental**: If set to Yes then mount User Share file system with FUSE *direct_io* mount option. > This will increase write performance but might possibly decrease read performance. > > *Auto* selects No. +:end   -: Array must be Stopped to change +: *_(Array must be **Stopped** to change)_*
diff --git a/plugins/dynamix/Shares.page b/plugins/dynamix/Shares.page index 4627c3acd..c06a68aa1 100644 --- a/plugins/dynamix/Shares.page +++ b/plugins/dynamix/Shares.page @@ -4,7 +4,7 @@ Code="e92a" ---- Array must be Started to view Shares.

"; + echo "

"._('Array must be **Started** to view Shares').".

"; return; } if (count($pages)==2) $tabbed = false; diff --git a/plugins/dynamix/SmtpSettings.page b/plugins/dynamix/SmtpSettings.page index 14629d28c..ea4a837d7 100644 --- a/plugins/dynamix/SmtpSettings.page +++ b/plugins/dynamix/SmtpSettings.page @@ -3,8 +3,8 @@ Title="SMTP Settings" Tag="envelope" --- obtaining ...'); + $('#testresult').html('_(Test running)_:_(obtaining)_ ...'); counter = 20; mailtest(); $.get('/webGui/include/SMTPtest.php',function(data){clearTimeout(pid); $('#testresult').html(data)}); @@ -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"}); + swal({title:"_(Invalid email address)_",text:"_(Please enter a valid sending email address)_",type:"error"}); return false; } return true; @@ -73,7 +73,7 @@ function settings(form, data) { -Preset service: +_(Preset service)_: : +:help188 > Select a preset service to set the basic service settings. +:end -Sending email address: +_(Sending email address)_: : +:help189 > Email address of your mail account. This address is used as sender of the notifications. +:end -Email recipients: +_(Email recipients)_: : +:help190 > Recipients of status and error notifications. Specify one or more email addresses, separate multiple email addresses with a space. +:end -Priority in header: -: + + +:help191 > Set email header with high importance, when there is a problem with unRaid. +:end -Email subject prefix: +_(Email subject prefix)_: : +:help192 > Set a prefix for easy recognition of Unraid messages. +:end -Mail server: +_(Mail server)_: : +:help193 > Specify the name of the email server. Use the preset service selection to have this filled-in automatically. +:end -Mail server port: +_(Mail server port)_: : +:help194 > Specify the port of the email server. Use the preset service selection to have this filled-in automatically. +:end -Use SSL/TLS: -: + + +:help195 > Specifies whether to use SSL/TLS to talk to the SMTP server. +:end -Use STARTTLS: -: + + +:help196 > Specifies whether to use STARTTLS before starting SSL negotiation - See RFC 2487. +:end -Define a TLS certificate: -: + + +:help197 > Select only when you have a certificate which required for communication. +:end -TLS certificate location: +_(TLS certificate location)_: : +:help198 > The file name of an RSA certificate to use for TLS - as required. +:end -Authentication method: -: + + + +:help199 > Select the correct authentication method for your email server. Use test to verify that access is working properly. +:end -Username: +_(Username)_: : -Password: +_(Password)_: : +:help200 > Enter the username and password to login to your email account. Be aware that the password is stored unencrypted in the email configuration file. +:end   -: - disabled> +: + disabled> diff --git a/plugins/dynamix/Syslinux.page b/plugins/dynamix/Syslinux.page index 4b4c8e6ac..3be059a70 100644 --- a/plugins/dynamix/Syslinux.page +++ b/plugins/dynamix/Syslinux.page @@ -3,8 +3,8 @@ Title="Syslinux Configuration" Tag="edit" --- @@ -55,8 +55,8 @@ case 'black': +:help39 > Use this page to make changes to your `syslinux.cfg` file. > You will need to reboot your server for these changes to take effect. +:end
@@ -208,7 +210,7 @@ $(function(){
-Syslinux configuration: +_(Syslinux configuration)_: : - title="Set default boot menu" onchange="changeMenu(this.form,this.id,true)"> + title="_(Set default boot menu)_" onchange="changeMenu(this.form,this.id,true)">
-Syslinux configuration: +_(Syslinux configuration)_: :
-Server boot mode: +_(Server boot mode)_: : -Permit UEFI boot mode > -: *Boot system in UEFI mode. Please check your system settings to support UEFI boot mode.* +_(Permit UEFI boot mode)_ > +: *_(Boot system in UEFI mode)_. _(Please check your system settings to support UEFI boot mode)_.* - -: + +: +:help40 > Click the **Default** button to initialize the edit box with the > factory-default contents. You still need to click **Apply** in order to >commit the change. > > Click the **Apply** button to commit the current edits. Click **Reset** to > undo any changes you make (before Saving). Click **Done** to exit this page. +:end
diff --git a/plugins/dynamix/Syslog.page b/plugins/dynamix/Syslog.page index c5c559438..c072c4e5a 100644 --- a/plugins/dynamix/Syslog.page +++ b/plugins/dynamix/Syslog.page @@ -40,14 +40,14 @@ function zipfile(){ } function cleanUp(file) { if (document.hasFocus()) { - $('input[value="Downloading..."]').val('Download').prop('disabled',false); + $('input[value="_(Downloading)_..."]').val('_(Download)_').prop('disabled',false); $.post('/webGui/include/Download.php',{cmd:'delete',file:file}); } else { setTimeout(function(){cleanUp(file);},2000); } } function syslog(file) { - $('input[value="Download"]').val('Downloading...').prop('disabled',true); + $('input[value="_(Download)_"]').val('_(Downloading)_...').prop('disabled',true); $.post('/webGui/include/Download.php',{cmd:'save',source:logfile,file:file},function(zip) { location = zip; setTimeout(function(){cleanUp(file);},4000); @@ -98,7 +98,7 @@ function showLog(log,init) { $(function() { showLog(logfile,true); }); -$('.tabs').append(""); +$('.tabs').append("");

-
+
diff --git a/plugins/dynamix/SyslogSettings.page b/plugins/dynamix/SyslogSettings.page
index 8bad4491d..7f816e042 100644
--- a/plugins/dynamix/SyslogSettings.page
+++ b/plugins/dynamix/SyslogSettings.page
@@ -39,60 +39,68 @@ $(function(){
 
 
 
-Local syslog server:
+_(Local syslog server)_:
 : 
   
   
 
+:help91
 > Let the server act as a central syslog server and collect syslog messages from other systems.
 > The server can listen on UDP, TCP or both with a selectable port number.
 >
 > Syslog information is stored per IP address. That is every system gets its own syslog file.
+:end
 
 
 
-Remote syslog server:
-: 
+_(Remote syslog server)_:
+: 
   
   
 
+:help96
 > Enter a name or IP address of a remote syslog server.
 > This will send a copy of the syslog messages to the designated server.
+:end
 
-Mirror syslog to flash:
+_(Mirror syslog to flash)_:
 : 
 
+:help97
 > This setting is NO by default and must be used with care to avoid unnecessary wear and tear of the USB device.
 >
 > Change this setting to YES when troubleshooting is required and it is not possible to get the regular diagnostics information.
 > A mirror of the syslog file is stored in the **logs** folder of the flash device.
+:end
 
  
-: 
-
\ No newline at end of file
+: 
+
diff --git a/plugins/dynamix/TerminalButton.page b/plugins/dynamix/TerminalButton.page
index 3178f54d7..1ec7dd9a9 100644
--- a/plugins/dynamix/TerminalButton.page
+++ b/plugins/dynamix/TerminalButton.page
@@ -5,8 +5,8 @@ Href="/webterminal/"
 Code="e93f"
 ---
 
 function TerminalButton() {
   if (/MSIE|Edge/.test(navigator.userAgent)) {
-    swal({title:'Unsupported Feature',text:'Sorry, this feature is not supported by MSIE/Edge.
Please try a different browser',html:true,type:'error'}); + swal({title:'_(Unsupported Feature)_',text:'_(Sorry, this feature is not supported by MSIE/Edge)_.
_(Please try a different browser)_',html:true,type:'error'}); return; } var d = new Date(); diff --git a/plugins/dynamix/UserAdd.page b/plugins/dynamix/UserAdd.page index 27ff27c09..bc1e680db 100644 --- a/plugins/dynamix/UserAdd.page +++ b/plugins/dynamix/UserAdd.page @@ -17,7 +17,7 @@ Tag="user" "; -$icon = ""; +$icon = ""; $zxcvbn = file_exists('/boot/config/plugins/dynamix/zxcvbn.js'); ?> @@ -47,28 +47,27 @@ var filename = ''; function showPassword() { if ($('#showPass').hasClass('checked')) { - $('#showPass').removeClass('checked'); + $('#showPass').removeClass('checked fa-eye-slash').addClass('fa-eye'); var type = 'password'; } else { - $('#showPass').addClass('checked'); + $('#showPass').addClass('checked fa-eye-slash').removeClass('fa-eye'); var type = 'text'; } $('input[name="userPasswordGUI"]').attr('type',type); $('input[name="userPasswordConfGUI"]').attr('type',type); } - function checkUsername(form) { var username = form.userName.value.trim(); if (!username.match('^[a-z_][a-z0-9_-]*[$]?$')) { - swal({title:"Invalid user name",text:"Use only lowercase letters, digits, underscores and dashes",type:"error"}); + swal({title:"_(Invalid user name)_",text:"_(Use only lowercase letters, digits, underscores and dashes)_",type:"error"}); return false; } if (username.match('^(disk[0-9]+|cache[0-9]*|parity[0-9]*|flash)$')) { - swal({title:"Invalid user name",text:"Do not use reserved names",type:"error"}); + swal({title:"_(Invalid user name)_",text:"_(Do not use reserved names)_",type:"error"}); return false; } if (form.userPasswordGUI.value.length > 128 || form.userPasswordConfGUI.value.length > 128) { - swal({title:"Password too long",text:"Use a password up to 128 characters",type:"error"}); + swal({title:"_(Password too long)_",text:"_(Use a password up to 128 characters)_",type:"error"}); return false; } if (filename) { @@ -80,7 +79,6 @@ function checkUsername(form) { form.userPasswordConfGUI.disabled = true; return true; } - function validatePassword(input) { var custom = ['unraid','limetech','lime-technology','bergware','squidly']; @@ -105,13 +103,11 @@ function validatePassword(input) { } } - function restore() { // restore original image $('#dropbox').html(""); filename = ''; } - $(function(){ var dropbox = $('#dropbox'); // attach the drag-n-drop feature to the 'dropbox' element @@ -129,13 +125,13 @@ $(function(){ error: function(error, file, i) { switch (error) { case 'BrowserNotSupported': - swal({title:"Browser error",text:"Your browser does not support HTML5 file uploads!",type:"error"}); + swal({title:"_(Browser error)_",text:"_(Your browser does not support HTML5 file uploads)_!",type:"error"}); break; case 'TooManyFiles': - swal({title:"Too many files",text:"Please select one file only!",type:"error"}); + swal({title:"_(Too many files)_",text:"_(Please select one file only)_!",type:"error"}); break; case 'FileTooLarge': - swal({title:"File too large",text:"Maximum file upload size is 95 kB (97,280 bytes)",type:"error"}); + swal({title:"_(File too large)_",text:"_(Maximum file upload size is 95 kB)_ (97,280 _(bytes)_)",type:"error"}); break; } }, @@ -153,7 +149,7 @@ $(function(){ $('input[name="userDesc"]').trigger('change'); filename = file.name; } else { - swal({title:"Upload error",text:response,type:"error"}); + swal({title:"_(Upload error)_",text:response,type:"error"}); } } }); @@ -166,33 +162,41 @@ $(function(){
-User name: +_(User name)_: : +:help1 > Usernames may be up to 32 characters long and must start with a **lower case letter** or an underscore, > followed by **lower case letters**, digits, underscores, or dashes. They can end with a dollar sign. +:end -Description: +_(Description)_: : +:help2 > Up to 64 characters. The characters ampersand (&) quote (") and colon (:) are not allowed. +:end -Custom image: -: Drag-n-drop a PNG file or click the image at the left. +_(Custom image)_: +: _(Drag-n-drop a PNG file or click the image at the left)_ +:help3 > The image will be scaled to 48x48 pixels in size. The maximum image file upload size is 95 kB (97,280 bytes). +:end -Password: +_(Password)_: : - + +:help4 > Up to 128 characters. +:end -Retype password: +_(Retype password)_: :   -: +:
diff --git a/plugins/dynamix/UserEdit.page b/plugins/dynamix/UserEdit.page index 09b7448e1..815c5495f 100644 --- a/plugins/dynamix/UserEdit.page +++ b/plugins/dynamix/UserEdit.page @@ -24,7 +24,7 @@ Tag="user" "; -$icon = ""; +$icon = ""; $zxcvbn = file_exists('/boot/config/plugins/dynamix/zxcvbn.js'); ?> @@ -54,16 +54,15 @@ var filename = ''; function showPassword() { if ($('#showPass').hasClass('checked')) { - $('#showPass').removeClass('checked'); + $('#showPass').removeClass('checked fa-eye-slash').addClass('fa-eye'); var type = 'password'; } else { - $('#showPass').addClass('checked'); + $('#showPass').addClass('checked fa-eye-slash').removeClass('fa-eye'); var type = 'text'; } $('input[name="userPasswordGUI"]').attr('type',type); $('input[name="userPasswordConfGUI"]').attr('type',type); } - function checkPassword(form) { if (form.userPasswordGUI.value.length > 128 || form.userPasswordConfGUI.value.length > 128) { swal({title:"Password too long",text:"Use a password up to 128 characters",type:"error"}); @@ -75,7 +74,6 @@ function checkPassword(form) { form.userPasswordConfGUI.disabled = true; return true; } - function validatePassword(input) { var custom = ['unraid','limetech','lime-technology','bergware','squidly']; @@ -100,14 +98,12 @@ function validatePassword(input) { } } - function restore() { // restore original image and activate APPLY button $('#dropbox').html(""); $('input[name="userDesc"]').trigger('change'); filename = 'reset'; } - function upload(remove) { // save or delete upload when APPLY is pressed if (remove || filename=='reset') { @@ -116,7 +112,6 @@ function upload(remove) { $.post("/webGui/include/FileUpload.php",{cmd:'save',path:path,filename:filename,output:'.png'}); } } - $(function(){ var dropbox = $('#dropbox'); // attach the drag-n-drop feature to the 'dropbox' element @@ -134,13 +129,13 @@ $(function(){ error: function(error, file, i) { switch (error) { case 'BrowserNotSupported': - swal({title:"Browser error",text:"Your browser does not support HTML5 file uploads!",type:"error"}); + swal({title:"_(Browser error)_",text:"_(Your browser does not support HTML5 file uploads)_!",type:"error"}); break; case 'TooManyFiles': - swal({title:"Too many files",text:"Please select one file only!",type:"error"}); + swal({title:"_(Too many files)_",text:"_(Please select one file only)_!",type:"error"}); break; case 'FileTooLarge': - swal({title:"File too large",text:"Maximum file upload size is 512 kB (524,288 bytes)",type:"error"}); + swal({title:"_(File too large)_",text:"_(Maximum file upload size is 512 kB (524,288 bytes))_",type:"error"}); break; } }, @@ -158,7 +153,7 @@ $(function(){ $('input[name="userDesc"]').trigger('change'); filename = file.name; } else { - swal({title:"Upload error",text:response,type:"error"}); + swal({title:"_(Upload error)_",text:response,type:"error"}); } } }); @@ -172,48 +167,54 @@ $(function(){
)"> -User name: +_(User name)_: : -Description: +_(Description)_: : +:help5 > Up to 64 characters. The characters ampersand (&) quote (") and colon (:) are not allowed. +:end -Custom image: +_(Custom image)_: : - Drag-n-drop a PNG file or click the image at the left. + _(Drag-n-drop a PNG file or click the image at the left)_ +:help6 > The image will be scaled to 48x48 pixels in size. The maximum image file upload size is 512 kB (524,288 bytes). +:end   -Delete +_(Delete)_ -: +:


-Password: +_(Password)_: : - + +:help7 > Up to 128 characters. +:end -Retype password: +_(Retype password)_: :   -: +:
@@ -286,7 +287,7 @@ function updateAccess(form,data,n,i) {
"; -echo "ShareSecurityUser Access"; +echo ""._('Share').""._('Security').""._('User Access').""; echo ""; foreach ($shares as $share => $data) { if ($sec[$share]['export']=='-') continue; @@ -297,10 +298,10 @@ foreach ($shares as $share => $data) { case 'public' : $access = $rw; break; case 'secure' : $access = $write ? $rw : $ro; break; case 'private': $access = $write ? $rw : ($read ? $ro : $no); break;} - echo "$share$security"; + echo mk_option($access,$rw,_('Read/Write')); + if ($security!='public') echo mk_option($access,$ro,_('Read-only')); + if ($security=='private') echo mk_option($access,$no,_('No Access')); echo ""; } echo ""; @@ -308,6 +309,6 @@ echo ""; ?>   -: +:
diff --git a/plugins/dynamix/UserList.page b/plugins/dynamix/UserList.page index f1bc7b4b5..99ae4928f 100644 --- a/plugins/dynamix/UserList.page +++ b/plugins/dynamix/UserList.page @@ -3,8 +3,8 @@ Title="Users" Tag="users" ---
- +
diff --git a/plugins/dynamix/Vars.page b/plugins/dynamix/Vars.page index 2cb2e2044..76923c755 100644 --- a/plugins/dynamix/Vars.page +++ b/plugins/dynamix/Vars.page @@ -4,8 +4,8 @@ Icon="icon-vars" Tag="code" --- " : "
").htmlspecialchars(print_r($GLOBALS,true))."
"; ?> - + diff --git a/plugins/dynamix/default.cfg b/plugins/dynamix/default.cfg index 751cbb8a5..8a78c6500 100644 --- a/plugins/dynamix/default.cfg +++ b/plugins/dynamix/default.cfg @@ -24,6 +24,7 @@ critical="90" hot="45" max="55" theme="white" +locale="" [parity] mode="0" hour="0 0" diff --git a/plugins/dynamix/include/Acknowledge.php b/plugins/dynamix/include/Acknowledge.php index 56014f63b..73d1488a6 100644 --- a/plugins/dynamix/include/Acknowledge.php +++ b/plugins/dynamix/include/Acknowledge.php @@ -1,6 +1,6 @@ RebootSystem is going down... '+timer()); setTimeout(reboot_online,5000);}) + .done(function(){$('div.notice').html('... '+timer()); setTimeout(reboot_online,5000);}) .fail(function(){start=new Date(); setTimeout(reboot_offline,5000);}); } function reboot_offline() { $.ajax({url:'/webGui/include/ProcessStatus.php',type:'POST',data:{name:'emhttpd',update:true},timeout:5000}) .done(function(){location = '/Main';}) - .fail(function(){$('div.notice').html('RebootSystem is rebooting... '+timer()); setTimeout(reboot_offline,1000);}); + .fail(function(){$('div.notice').html('... '+timer()); setTimeout(reboot_offline,1000);}); } function shutdown_online() { $.ajax({url:'/webGui/include/ProcessStatus.php',type:'POST',data:{name:'emhttpd',update:true},timeout:5000}) - .done(function(){$('div.notice').html('ShutdownSystem is going down... '+timer()); setTimeout(shutdown_online,5000);}) + .done(function(){$('div.notice').html('... '+timer()); setTimeout(shutdown_online,5000);}) .fail(function(){start=new Date(); setTimeout(shutdown_offline,5000);}); } function shutdown_offline() { var time = timer(); if (time < 30) { - $('div.notice').html('ShutdownSystem is offline... '+time); + $('div.notice').html('... '+time); setTimeout(shutdown_offline,5000); } else { - $('div.notice').html('ShutdownSystem is powered off...'); + $('div.notice').html('...'); } } $(document).ajaxSend(function(elm, xhr, s){ diff --git a/plugins/dynamix/include/Browse.php b/plugins/dynamix/include/Browse.php index 3bbf6fc58..81357671d 100644 --- a/plugins/dynamix/include/Browse.php +++ b/plugins/dynamix/include/Browse.php @@ -1,6 +1,6 @@ TypeNameSizeLast ModifiedLocation"; +echo ""._('Type').""._('Name').""._('Size').""._('Last Modified').""._('Location').""; if ($link = parent_link()) echo "
$link"; foreach ($file as $row) { @@ -54,11 +60,11 @@ foreach ($file as $row) { foreach ($rows as $row) $show |= strpos($disks[$tag.str_replace($tag,'',$row)]['fsType'],'luks:')!==false; if ($show) foreach ($rows as $row) { switch ($disks[$tag.str_replace($tag,'',$row)]['luksState']) { - case 0: $luks .= "Not encrypted"; break; - case 1: $luks .= "Encrypted and unlocked"; break; - case 2: $luks .= "Locked: missing encryption key"; break; - case 3: $luks .= "Locked: wrong encryption key"; break; - default: $luks .= "Locked: unknown error"; break;} + case 0: $luks .= ""._('Not encrypted').""; break; + case 1: $luks .= ""._('Encrypted and unlocked').""; break; + case 2: $luks .= ""._('Locked: missing encryption key').""; break; + case 3: $luks .= ""._('Locked: wrong encryption key').""; break; + default: $luks .= ""._('Locked: unknown error').""; break;} } $list[] = [ 'type' => $attr[0], @@ -78,7 +84,7 @@ foreach ($list as $row) { echo ""; echo "
"; echo "".htmlspecialchars($row['name']).""; - echo "<DIR>"; + echo "<"._('FOLDER').">"; echo "".my_time($row['time'],"%F {$display['time']}").""; echo "{$row['disk']}"; echo ""; @@ -99,8 +105,5 @@ foreach ($list as $row) { } echo ""; $objs = $dirs+$files; -$objtext = "$objs object".($objs==1?'':'s'); -$dirtext = "$dirs director".($dirs==1?'y':'ies'); -$filetext = "$files file".($files==1?'':'s'); -$totaltext = $files==0 ? '':'('.my_scale($total,$unit).' '.$unit.' total)'; -echo "$objtext: $dirtext, $filetext $totaltext"; +$totaltext = $files==0 ? '' : '('.my_scale($total,$unit).' '.$unit.' '._('total').')'; +echo "$objs "._('object'.($objs==1?'':'s')).": $dirs "._('director'.($dirs==1?'y':'ies')).", $files "._('file'.($files==1?'':'s'))." $totaltext"; diff --git a/plugins/dynamix/include/CPUset.php b/plugins/dynamix/include/CPUset.php index aea7a7e0d..a661f6da0 100644 --- a/plugins/dynamix/include/CPUset.php +++ b/plugins/dynamix/include/CPUset.php @@ -1,6 +1,6 @@ "; + echo ""; for ($c = 0; $c < $loop; $c++) { $max = ($c == $loop-1 ? ($total%32?:32) : 32); for ($n = 0; $n < $max; $n++) { @@ -118,7 +122,7 @@ case 'is': sort($isolcpus,SORT_NUMERIC); $isolcpus = array_unique($isolcpus,SORT_NUMERIC); } - echo "Isolated CPUs"; + echo ""._('Isolated CPUs').""; create('is', 'isolcpus', $isolcpus); echo ""; break; diff --git a/plugins/dynamix/include/CertUpload.php b/plugins/dynamix/include/CertUpload.php index 15c00270a..fc6cc787e 100644 --- a/plugins/dynamix/include/CertUpload.php +++ b/plugins/dynamix/include/CertUpload.php @@ -1,6 +1,6 @@ Interface ".str_replace('eth', 'Ethernet Port ', $port)." is down. Check cable!"; + echo ""._('Interface')." ".str_replace('eth', _('Ethernet Port')." ", $port)." "._('is down').". "._('Check cable')."!"; } ?> diff --git a/plugins/dynamix/include/ColorCoding.php b/plugins/dynamix/include/ColorCoding.php index c1789b215..dfd91f01f 100644 --- a/plugins/dynamix/include/ColorCoding.php +++ b/plugins/dynamix/include/ColorCoding.php @@ -1,6 +1,6 @@ $name"; } else { $name = $disk['device']; @@ -144,7 +150,7 @@ function device_status(&$disk, $array, &$error, &$warning) { case 'red-off' : $color = 'red'; $text = 'faulty'; $error++; break; case 'grey-off' : $color = 'grey'; $text = 'no device'; break; } - return "$text"; + return ""._($text); } function device_temp(&$disk, &$red, &$orange) { $spin = strpos($disk['color'],'blink')===false; @@ -171,7 +177,7 @@ function device_smart(&$disk, $name, &$fail, &$smart) { $events = explode('|',get_value($disk,'smEvents',$numbers)); $title = ''; $thumb = 'thumbs-o-up'; - $text = 'healthy'; + $text = _('healthy'); $color = 'green'; $file = "state/smart/$name"; if (file_exists("$file.ssa") && in_array(file_get_contents("$file.ssa"),$failed)) { @@ -186,10 +192,10 @@ function device_smart(&$disk, $name, &$fail, &$smart) { if (!$failing && !in_array($id,$events)) continue; if ($failing || ($select ? $thres>0 && $value<=$thres*$level : $raw>0)) $title .= normalize($class,$failing?$when:$raw); } - if ($title) {$thumb = 'thumbs-o-down'; $color = 'orange'; $text = 'error'; $smart++;} else $title = "No errors reported\n"; + if ($title) {$thumb = 'thumbs-o-down'; $color = 'orange'; $text = _('error'); $smart++;} else $title = _('No errors reported')."\n"; } } - $title .= "Click for context menu"; + $title .= _('Click for context menu'); return "$text"; } function device_usage(&$disk, $array, &$full, &$high) { @@ -358,18 +364,18 @@ case 'status': } if ($var['mdResync']==0) { if ($parity_slots==$parity_disabled) { - echo "Parity disk".($parity_slots==1?'':'s')." not present"; + echo ""._('Parity disk'.($parity_slots==1?'':'s')." not present").""; } elseif ($parity_slots > $parity_invalid) { if ($parity_invalid==0) { - echo "Parity is valid"; + echo ""._('Parity is valid').""; } else { - echo "Parity is degraded: $parity_invalid invalid device".($parity_invalid==1?'':'s').""; + echo ""._('Parity is degraded').": $parity_invalid "._('invalid device'.($parity_invalid==1?'':'s')).""; } } else { if (empty($var['mdInvalidDisk'])) { - echo "Parity is invalid"; + echo ""._('Parity is invalid').""; } else { - echo "Data is invalid"; + echo ""._('Data is invalid').""; } } } else { @@ -384,56 +390,57 @@ case 'status': } elseif (strstr($var['mdResyncAction'],"check")) { $mode = 'Parity-Check'; } - echo "$mode in progress... Completed: ".number_format(($var['mdResyncPos']/($var['mdResync']/100+1)),1,$number[0],$number[1])." %."; + echo ""._($mode).' '._('in progress').'... '._('Completed').': '.number_format(($var['mdResyncPos']/($var['mdResync']/100+1)),1,$number[0],$number[1])." %."; } break; case 'parity': + extract(parse_plugin_cfg('dynamix', true)); $var = parse_ini_file("state/var.ini"); $time = $_POST['time']; $idle = $var['mdResync']==0; if ($var['sbSyncExit']!=0) { - echo "Last check incomplete on ".my_time($var['sbSynced2'],$time).day_count($var['sbSynced2']).", finding {$var['sbSyncErrs']} error".($var['sbSyncErrs']==1?'.':'s.'); - echo "
Error code: ".my_error($var['sbSyncExit']); + echo sprintf(_('Last check incomplete on **%s**'),my_lang(my_time($var['sbSynced2']).my_lang(day_count($var['sbSynced2']),1))).'
'.sprintf(_('Finding **%s** error'.($var['sbSyncErrs']==1?'':'s')),$var['sbSyncErrs']?:'0'); + echo " "._('Error code').": ".my_error($var['sbSyncExit']); } elseif ($var['sbSynced']==0) { list($date,$duration,$speed,$status,$error) = last_parity_log(); if (!$date) { - echo "Parity has not been checked yet."; + echo _('Parity has not been checked yet'); } elseif ($status==0) { - echo "Last checked on ".my_time($date).day_count($date,$time).", finding $error error".($error==1?'.':'s.'); - echo "
Duration: ".my_check($duration,$speed); + echo sprintf(_('Last checked on **%s**'),my_lang(my_time($date).my_lang(day_count($date),1))).'
'.sprintf(_('Finding **%s** error'.($error==1?'':'s')),$error?:'0'); + echo " "._('Duration').": ".my_lang(my_check($duration,$speed),2); } else { - echo "Last check incomplete on ".my_time($date,$time).day_count($date).", finding $error error".($error==1?'.':'s.'); - echo "
Error code: ".my_error($status); + echo sprintf(_('Last check incomplete on **%s**'),my_lang(my_time($date).my_lang(day_count($date),1))).'
'.sprintf(_('Finding **%s** error'.($error==1?'':'s')),$error?:'0'); + echo " "._('Error code').": ".my_error($status); } } elseif ($var['sbSynced2']==0) { if ($idle) { list($entry,$duration,$speed,$status,$error) = explode('|', read_parity_log($var['sbSynced'],!$idle)); if ($status==0) { - echo "Last checked on ".my_time($var['sbSynced'],$time).day_count($var['sbSynced']).", finding $error error".($error==1?'.':'s.'); - echo "
Duration: ".my_check($duration,$speed); + echo sprintf(_('Last checked on **%s**'),my_lang(my_time($var['sbSynced']).my_lang(day_count($var['sbSynced']),1))).'
'.sprintf(_('Finding **%s** error'.($error==1?'':'s')),$error?:'0'); + echo " "._('Duration').": ".my_lang(my_check($duration,$speed),2); } else { - echo "Last check incomplete on ".my_time($var['sbSynced'],$time).day_count($var['sbSynced']).", finding $error error".($error==1?'.':'s.'); - echo "
Error code: ".my_error($status); + echo sprintf(_('Last check incomplete on **%s**'),my_lang(my_time($var['sbSynced']).my_lang(day_count($var['sbSynced']),1))).'
'.sprintf(_('Finding **%s** error'.($error==1?'':'s')),$error?:'0'); + echo " "._('Error code').": ".my_error($status); } } else { - echo "Activity started on ".my_time($var['sbSynced'],$time).day_count($var['sbSynced']).", finding {$var['sbSyncErrs']} error".($var['sbSyncErrs']==1?'.':'s.').""; - echo "
Elapsed time: ".my_clock(floor((time()-$var['sbUpdated'])/60))." Estimated finish: ".my_clock(round(((($var['mdResyncDt']*(($var['mdResync']-$var['mdResyncPos'])/($var['mdResyncDb']/100+1)))/100)/60),0)).""; + echo sprintf(_('Current operation %s on **%s**'),($var['mdResync']?_('started'):_('paused')),my_lang(my_time($var['sbUpdated']).my_lang(day_count($var['sbSynced']),1))).'
'.sprintf(_('Finding **%s** error'.($var['sbSyncErrs']==1?'':'s')),$var['sbSyncErrs']?:'0'); + echo "
"._('Elapsed time').": ".my_lang(my_clock(floor((time()-$var['sbUpdated'])/60)),2); + echo "
"._('Estimated finish').': '.my_lang(my_clock(round(((($var['mdResyncDt']*(($var['mdResync']-$var['mdResyncPos'])/($var['mdResyncDb']/100+1)))/100)/60),0)),2); } } else { $status = 0; $duration = $var['sbSynced2']-$var['sbSynced']; $speed = $duration?my_scale($var['mdResyncSize']*1024/$duration,$unit,1)." $unit/sec":''; - echo "Last checked on ".my_time($var['sbSynced2'],$time).day_count($var['sbSynced2']).", finding {$var['sbSyncErrs']} error".($var['sbSyncErrs']==1?'.':'s.'); - echo "
Duration: ".my_check($duration,$speed); + echo sprintf(_('Last check completed on **%s**'),my_lang(my_time($var['sbSynced2']).my_lang(day_count($var['sbSynced2']),1))).'
'.sprintf(_('Finding **%s** error'.($var['sbSyncErrs']==1?'':'s')),$var['sbSyncErrs']?:'0'); + echo " "._('Duration').': '.my_lang(my_check($duration,$speed),2); } if ($idle) { - extract(parse_plugin_cfg('dynamix', true)); list($m,$h) = explode(' ', $parity['hour']); $time = time(); switch ($parity['mode']) { case 0: // check disabled echo "\0"; - echo " Scheduled parity check is disabled"; + echo " "._('Scheduled parity check is disabled'); return; case 1: // daily check $t = mktime($h,$m,0)-$time; @@ -491,10 +498,8 @@ case 'parity': break; } echo "\0"; - echo "Next check scheduled on "; - echo strftime($_POST['time'],$time+$t); - echo "
Due in: "; - echo my_clock(floor($t/60)); + echo sprintf(_('Next check scheduled on **%s**'),my_lang(strftime($_POST['time'],$time+$t))); + echo "
"._('Due in').": ".my_lang(my_clock(floor($t/60)),2); } else { echo "\0"; } diff --git a/plugins/dynamix/include/DashboardApps.php b/plugins/dynamix/include/DashboardApps.php index a652e9705..3411f02a2 100644 --- a/plugins/dynamix/include/DashboardApps.php +++ b/plugins/dynamix/include/DashboardApps.php @@ -1,7 +1,7 @@ " : (substr($icon,0,5)=='icon-' ? "" : ""); - echo "$image$name
$status
"; + echo "$image$name
"._($status)."
"; } - $none = count($containers) ? "No running docker containers" : "No docker containers defined"; + $none = count($containers) ? _('No running docker containers') : _('No docker containers defined'); echo ""; echo ""; } @@ -108,9 +112,9 @@ if ($_POST['vms'] && ($display=='icons' || $display=='vms')) { break; } $image = substr($icon,-4)=='.png' ? "" : (substr($icon,0,5)=='icon-' ? "" : ""); - echo "$image$vm
$status
"; + echo "$image$vm
"._($status)."
"; } - $none = count($vms) ? "No running virtual machines" : "No virtual machines defined"; + $none = count($vms) ? _('No running virtual machines') : _('No virtual machines defined'); echo ""; echo ""; } diff --git a/plugins/dynamix/include/DefaultPageLayout.php b/plugins/dynamix/include/DefaultPageLayout.php index 3b9fb6b39..8c3cc0ccb 100644 --- a/plugins/dynamix/include/DefaultPageLayout.php +++ b/plugins/dynamix/include/DefaultPageLayout.php @@ -73,7 +73,7 @@ if ($themes2) { } $notes = '/var/tmp/unRAIDServer.txt'; if (!file_exists($notes)) file_put_contents($notes,shell_exec("$docroot/plugins/dynamix.plugin.manager/scripts/plugin changes $docroot/plugins/unRAIDServer/unRAIDServer.plg")); -$notes = " " +$notes = " " ?> @@ -101,15 +101,15 @@ function resumeEvents(id,delay) { startDelay += 50; }); } -function plus(value,label,last) { - return value>0 ? (value+' '+label+(value!=1?'s':'')+(last?'':', ')) : ''; +function plus(value,single,plural,last) { + return value>0 ? (value+' '+(value==1?single:plural)+(last?'':', ')) : ''; } function updateTime() { var now = new Date(); var days = parseInt(uptime/86400); var hour = parseInt(uptime/3600%24); var mins = parseInt(uptime/60%60); - $('span.uptime').html(((days|hour|mins)?plus(days,'day',(hour|mins)==0)+plus(hour,'hour',mins==0)+plus(mins,'minute',true):'less than a minute')); + $('span.uptime').html(((days|hour|mins)?plus(days,"","",(hour|mins)==0)+plus(hour,"","",mins==0)+plus(mins,"","",true):"")); uptime += Math.round((now.getTime() - before.getTime())/1000); before = now; if (expiretime > 0) { @@ -119,13 +119,13 @@ function updateTime() { hour = parseInt(remainingtime/3600%24); mins = parseInt(remainingtime/60%60); if (days) { - $('#licenseexpire').html(plus(days,'day',true)+' remaining'); + $('#licenseexpire').html(plus(days,"","",true)+" "); } else if (hour) { - $('#licenseexpire').html(plus(hour,'hour',true)+' remaining').addClass('orange-text'); + $('#licenseexpire').html(plus(hour,"","",true)+" ").addClass('orange-text'); } else if (mins) { - $('#licenseexpire').html(plus(mins,'minute',true)+' remaining').addClass('red-text'); + $('#licenseexpire').html(plus(mins,"","",true)+" ").addClass('red-text'); } else { - $('#licenseexpire').html('less than a minute remaining').addClass('red-text'); + $('#licenseexpire').html("").addClass('red-text'); } } else { $('#licenseexpire').addClass('red-text'); @@ -170,7 +170,7 @@ function done(key) { location.replace(path); } function chkDelete(form, button) { - button.value = form.confirmDelete.checked ? 'Delete' : 'Apply'; + button.value = form.confirmDelete.checked ? '' : ''; button.disabled = false; } function openBox(cmd,title,height,width,load,func,id) { @@ -182,15 +182,12 @@ function openBox(cmd,title,height,width,load,func,id) { function openWindow(cmd,title,height,width) { // open regular window (run in background) var window_name = title.replace(/ /g,"_"); - var form_html = - '
' + - '' + - ''; + var form_html = ''+'" />'+''; var vars = cmd.split('&'); - form_html += ''; + form_html += ''; for (var i = 1; i < vars.length; i++) { var pair = vars[i].split('='); - form_html += ''; + form_html += ''; } form_html += '
'; var form = $(form_html); @@ -269,12 +266,12 @@ function showBannerWarnings() { currentBannerWarning++; } -function addRebootNotice(message="You must reboot for changes to take effect") { +function addRebootNotice(message="") { addBannerWarning(" "+message,false,true); $.post("/plugins/dynamix.plugin.manager/scripts/PluginAPI.php",{action:'addRebootNotice',message:message}); } -function removeRebootNotice(message="You must reboot for changes to take effect") { +function removeRebootNotice(message="") { var bannerIndex = bannerWarnings.indexOf(" "+message); if ( bannerIndex < 0 ) { return; @@ -298,8 +295,8 @@ function hideUpgrade(set) { } function openUpgrade() { hideUpgrade(); - swal({title:'Update Unraid OS',text:'Do you want to update to the new version?',type:'warning',showCancelButton:true},function(){ - openBox('/plugins/dynamix.plugin.manager/scripts/plugin&arg1=update&arg2=unRAIDServer.plg','Update Unraid OS',600,900,true); + swal({title:' Unraid OS',text:'?',type:'warning',showCancelButton:true},function(){ + openBox('/plugins/dynamix.plugin.manager/scripts/plugin&arg1=update&arg2=unRAIDServer.plg',' Unraid OS',600,900,true); }); } function notifier() { @@ -376,7 +373,7 @@ $(function() { $('#'+tab).attr('checked', true); updateTime(); $.jGrowl.defaults.closeTemplate = ''; - $.jGrowl.defaults.closerTemplate = '':'
'?>[ close all notifications ]
'; + $.jGrowl.defaults.closerTemplate = '':'
'?>[ ]
'; $.jGrowl.defaults.sticky = true; $.jGrowl.defaults.check = 100; $.jGrowl.defaults.position = ''; @@ -398,17 +395,13 @@ $.ajaxPrefilter(function(s, orig, xhr){ // add any pre-existing reboot notices $(function() { - - var rebootMessage = ""; - if ( rebootMessage ) { - addBannerWarning(" "+rebootMessage,false,true); - } - + + + var rebootMessage = ""; + if ( rebootMessage ) { + addBannerWarning(" "+rebootMessage,false,true); + } + }); @@ -418,12 +411,12 @@ $(function() { @@ -435,14 +428,14 @@ foreach ($tasks as $button) { $page = $button['name']; echo ""; + echo ""._($page).""; } unset($tasks); if ($display['usage']) my_usage(); echo ""; echo ""; } unset($pages,$page,$pgs,$pg,$icon); @@ -532,17 +525,17 @@ echo '"; ?> @@ -96,7 +100,7 @@ function onlinepoll_load() { $.post('https://keys.lime-technology.com/polls',{timestamp:unraid_timestamp,osversion:unraid_osversion,keyfile:keyfile},function(data) { $('#onlinepoll_panel').hide().html(data).fadeIn('fast'); }).fail(function(data) { - var msg = "

Sorry, an error ("+data.status+") occurred. Please try again later.

"; + var msg = "

. .

"; $('#onlinepoll_panel').hide().html(msg).fadeIn('fast'); }).always(function() { $('#spinner_image').fadeOut('fast'); @@ -108,7 +112,7 @@ function featurerequest_reset() { $('#featureEmail').val(""); } function bugreport_reset() { - $('#bugDescription').val("Bug Description:\n\nHow to reproduce:\n\nExpected results:\n\nActual results:\n\nOther information:\n\n"); + $('#bugDescription').val(":\n\n:\n\n:\n\n:\n\n:\n\n"); $('#bugEmail').val(""); } function comment_reset() { @@ -128,7 +132,7 @@ function form_submit(url, params, $panel, diagnostics) { }).fail(function() { $('#spinner_image').fadeOut('fast'); $panel.fadeOut('fast').find('textarea,input').prop('disabled', false); - var failure_message = '

Sorry, an error (Unable to generate system diagnostics) occurred. Please try again later.

'; + var failure_message = '

(). .

'; $('#thanks_panel').html(failure_message).fadeIn('fast'); }); @@ -142,13 +146,12 @@ function form_submit(url, params, $panel, diagnostics) { $.post(url,params,function(data) { if (data.error) { - var failure_message = '

Sorry, an error ('+data.error+') occurred. Please try again later.

'; + var failure_message = '

. .

'; $('#thanks_panel').html(failure_message).fadeIn('fast'); } else { data.message = data.message || ''; - var url_parts = url.split('/'); - var success_message = '

Thank You!

'+data.message+'

'; + var success_message = '

!

'+data.message+'

'; $('#thanks_panel').html(success_message).fadeIn('fast', function() { var resetfunction = window[url_parts[4]+'_reset']; @@ -161,7 +164,7 @@ function form_submit(url, params, $panel, diagnostics) { if (jqXHR.responseJSON && jqXHR.responseJSON.error) { errorThrown = jqXHR.responseJSON.error; } - var failure_message = '

Sorry, an error ('+errorThrown+') occurred. Please try again later.

'; + var failure_message = '

. .

'; $('#thanks_panel').html(failure_message).fadeIn('fast'); }).always(function() { $('#spinner_image').fadeOut('fast'); @@ -173,7 +176,6 @@ $(function() { $('#control_panel input[type=radio]').click(function() { var showPanel = '#'+$( "#control_panel input[type=radio]:checked" ).val()+'_panel'; $('.allpanels').not(showPanel).fadeOut('fast'); - var loadfunction = window[$( "#control_panel input[type=radio]:checked" ).val()+'_load']; if (typeof loadfunction !== 'undefined' && $.isFunction(loadfunction)) { loadfunction(); diff --git a/plugins/dynamix/include/FileUpload.php b/plugins/dynamix/include/FileUpload.php index b4c99d17d..7a05e9153 100644 --- a/plugins/dynamix/include/FileUpload.php +++ b/plugins/dynamix/include/FileUpload.php @@ -1,21 +1,36 @@ + diff --git a/plugins/dynamix/include/HardwareCollect.php b/plugins/dynamix/include/HardwareCollect.php index 8a02b8803..684d6a69b 100644 --- a/plugins/dynamix/include/HardwareCollect.php +++ b/plugins/dynamix/include/HardwareCollect.php @@ -1,6 +1,6 @@ "; - $write_list = explode(",", $sec[$name]['writeList']); - foreach ($users as $user) { - $idx = $user['idx']; - if ($user['name'] == "root") { - echo ""; - continue; - } - if (in_array( $user['name'], $write_list)) - $userAccess = "read-write"; - else - $userAccess = "read-only"; - echo "{$user['name']}"; - echo ""; - } - echo ""; -} -function input_private_users($sec) { - global $name, $users; - echo ""; - $read_list = explode(",", $sec[$name]['readList']); - $write_list = explode(",", $sec[$name]['writeList']); - foreach ($users as $user) { - $idx = $user['idx']; - if ($user['name'] == "root") { - echo ""; - continue; - } - if (in_array( $user['name'], $read_list)) - $userAccess = "read-only"; - elseif (in_array( $user['name'], $write_list)) - $userAccess = "read-write"; - else - $userAccess = "no-access"; - echo ""; - echo ""; - } - echo "
{$user['name']}
"; -} function is_block($path) { return (@filetype(realpath($path))=='block'); } diff --git a/plugins/dynamix/include/InputSecurity.php b/plugins/dynamix/include/InputSecurity.php new file mode 100644 index 000000000..03a1af2d7 --- /dev/null +++ b/plugins/dynamix/include/InputSecurity.php @@ -0,0 +1,62 @@ + +"; + $write_list = explode(",", $sec[$name]['writeList']); + foreach ($users as $user) { + $idx = $user['idx']; + if ($user['name'] == "root") { + echo ""; + continue; + } + if (in_array( $user['name'], $write_list)) + $userAccess = "read-write"; + else + $userAccess = "read-only"; + echo "{$user['name']}"; + echo ""; + continue; + } + if (in_array( $user['name'], $read_list)) + $userAccess = "read-only"; + elseif (in_array( $user['name'], $write_list)) + $userAccess = "read-write"; + else + $userAccess = "no-access"; + echo "{$user['name']}"; + echo ""; + } + echo ""; +} +?> \ No newline at end of file diff --git a/plugins/dynamix/include/InstallKey.php b/plugins/dynamix/include/InstallKey.php index 1bc791ddd..ab48f690f 100644 --- a/plugins/dynamix/include/InstallKey.php +++ b/plugins/dynamix/include/InstallKey.php @@ -1,5 +1,5 @@ ".str_replace('*',$text,$td_).date($dynamix['notify']['date'].' '.$dynamix['notify']['time'],$text)."$_td" : "$text"; + echo (!$c++) ? "".str_replace('*',$text,$td_).date($dynamix['notify']['date'].' '.$dynamix['notify']['time'],$text)."$_td" : ""._($text).""; } - echo ""; + echo ""; if ($extra) { $text = explode('=',$field,2)[1]; echo "$text"; diff --git a/plugins/dynamix/include/Notify.php b/plugins/dynamix/include/Notify.php index 8323ae7a4..1aafd7f8d 100644 --- a/plugins/dynamix/include/Notify.php +++ b/plugins/dynamix/include/Notify.php @@ -1,6 +1,6 @@ ".htmlspecialchars(my_disk($name)); + return "$name"; } else { - return "".htmlspecialchars(my_disk($name)); + return "$name"; } } elseif (substr($tag,0,5)=='icon-') { - return "".htmlspecialchars(my_disk($name)); + return "$name"; } else { if (substr($tag,0,3)!='fa-') $tag = "fa-$tag"; - return "".htmlspecialchars(my_disk($name)); + return "$name"; } } // hack to embed function output in a quoted string (e.g., in a page Title) // see: http://stackoverflow.com/questions/6219972/why-embedding-functions-inside-of-strings-is-different-than-variables -function _func($x) { return $x; } +function _func($x) {return $x;} $func = '_func'; ?> diff --git a/plugins/dynamix/include/ParityHistory.php b/plugins/dynamix/include/ParityHistory.php index cd8098781..40d31a516 100644 --- a/plugins/dynamix/include/ParityHistory.php +++ b/plugins/dynamix/include/ParityHistory.php @@ -1,6 +1,6 @@ '-01-',' Feb '=>'-02-',' Mar '=>'-03-',' Apr '=>'-04-',' May '=>'-05-',' Jun '=>'-06-',' Jul '=>'-07-',' Aug '=>'-08-',' Sep '=>'-09-',' Oct '=>'-10-',' Nov '=>'-11-',' Dec '=>'-12-']; @@ -26,7 +30,7 @@ function his_duration($time) { $hour = floor($hmss/3600); $mins = $hmss/60%60; $secs = $hmss%60; - return his_plus($days,'day',($hour|$mins|$secs)==0).his_plus($hour,'hr',($mins|$secs)==0).his_plus($mins,'min',$secs==0).his_plus($secs,'sec',true); + return his_plus($days,_('day'),($hour|$mins|$secs)==0).his_plus($hour,_('hr'),($mins|$secs)==0).his_plus($mins,_('min'),$secs==0).his_plus($secs,_('sec'),true); } ?> @@ -39,25 +43,25 @@ function his_duration($time) { "> - +0||$status<>0) $list[] = ""; + if ($duration>0||$status<>0) $list[] = ""; } fclose($handle); } if ($list) for ($i=count($list); $i>=0; --$i) echo $list[$i]; else - echo ""; + echo ""; ?> -
+
\ No newline at end of file diff --git a/plugins/dynamix/include/PortToggle.php b/plugins/dynamix/include/PortToggle.php index ae08dce61..ed8849754 100644 --- a/plugins/dynamix/include/PortToggle.php +++ b/plugins/dynamix/include/PortToggle.php @@ -1,6 +1,6 @@ "; $_span = "";} -echo $pid ? "{$span}Status:Running{$_span}" : "{$span}Status:Stopped{$_span}"; +echo $pid ? "{$span}"._('Status').":"._('Running')."{$_span}" : "{$span}Status:"._('Stopped')."{$_span}"; ?> \ No newline at end of file diff --git a/plugins/dynamix/include/ProtocolData.php b/plugins/dynamix/include/ProtocolData.php index 1a52636cb..b3338711b 100644 --- a/plugins/dynamix/include/ProtocolData.php +++ b/plugins/dynamix/include/ProtocolData.php @@ -1,6 +1,6 @@ .unraid.net - response_complete(406, '{"error":"Cannot provision cert that would overwrite your existing custom cert at /boot/config/ssl/certs/certificate_bundle.pem"}'); + response_complete(406, '{"error":"'._('Cannot provision cert that would overwrite your existing custom cert at').' /boot/config/ssl/certs/certificate_bundle.pem"}'); } exec("/usr/bin/openssl x509 -checkend 2592000 -noout -in /etc/ssl/certs/unraid_bundle.pem",$arrout,$retval_expired); if ($retval_expired === 0) { if ($cli) exit(0); // not within 30 days of cert expire date - response_complete(406, '{"error":"Cannot renew cert until within 30 days of expiry"}'); + response_complete(406, '{"error":"'._('Cannot renew cert until within 30 days of expiry').'"}'); } } $keyfile = @file_get_contents($var['regFILE']); if ($keyfile === false) { if ($cli) exit(0); - response_complete(406, '{"error":"License key required"}'); + response_complete(406, '{"error":"'.('License key required').'"}'); } $keyfile = @base64_encode($keyfile); $internalip = $eth0['IPADDR:0']; @@ -69,7 +74,7 @@ curl_close($ch); if ($cli) { $json = @json_decode($result,true); if (empty($json['bundle'])) { - $strError = 'Server was unable to provision SSL certificate'; + $strError = _('Server was unable to provision SSL certificate'); if (!empty($json['error'])) { $strError .= ' - '.$json['error']; } @@ -80,5 +85,5 @@ if ($cli) { exec("/etc/rc.d/rc.nginx reload"); } -response_complete($httpcode, $result, 'LE Cert Provisioned successfully'); +response_complete($httpcode, $result, _('LE Cert Provisioned successfully')); ?> \ No newline at end of file diff --git a/plugins/dynamix/include/ReloadPage.php b/plugins/dynamix/include/ReloadPage.php index 7e1aa2fbd..e555fbcf0 100644 --- a/plugins/dynamix/include/ReloadPage.php +++ b/plugins/dynamix/include/ReloadPage.php @@ -1,6 +1,6 @@ Copying, {$var['fsCopyPrcnt']}% complete..."; + echo ""._('Copying').", {$var['fsCopyPrcnt']}% "._('complete')."..."; break; case 'Clearing': - echo "Clearing, {$var['fsClearPrcnt']}% complete..."; + echo ""._('Clearing').", {$var['fsClearPrcnt']}% "._('complete')."..."; break; default: echo substr($var['fsState'],-3)=='ing' ? 'wait' : 'stop'; diff --git a/plugins/dynamix/include/ReplaceKey.php b/plugins/dynamix/include/ReplaceKey.php index 7ada107b2..935780c11 100644 --- a/plugins/dynamix/include/ReplaceKey.php +++ b/plugins/dynamix/include/ReplaceKey.php @@ -1,5 +1,5 @@ A registration replacement key has been created for USB Flash GUID "+guid+"

" + - "

An email has been sent to "+email+" containing your key file URL." + - " When received, please paste the URL into the Key file URL box and" + - " click Install Key.

" + - "

If you do not receive an email, please check your spam or junk-email folder.

"; + var msg = "

"+guid+"

" + + "

"+email+" ." + + " Key file URL box and')?>" + + " Install Key')?>.

" + + "

.

"; $('#status_panel').hide().html(msg).slideDown('fast'); $('#input_form').fadeOut('fast'); @@ -49,8 +53,7 @@ function replaceKey(email, guid, keyfile) { $('#spinner_image').fadeOut('fast'); var status = data.status; var obj = data.responseJSON; - var msg = "

Sorry, an error ("+status+") occurred registering USB Flash GUID "+guid+"

" + - "

The error is: "+obj.error+"

"; + var msg = "

"+guid+"

"+"

: "+obj.error+"

"; $('#status_panel').hide().html(msg).slideDown('fast'); }); diff --git a/plugins/dynamix/include/RoutingTable.php b/plugins/dynamix/include/RoutingTable.php index 22f32ef94..789c04517 100644 --- a/plugins/dynamix/include/RoutingTable.php +++ b/plugins/dynamix/include/RoutingTable.php @@ -1,6 +1,6 @@ /dev/null & echo $!',$op); @@ -36,8 +39,8 @@ function PsKill($pid) { if (PsExecute("$docroot/webGui/scripts/notify -s 'Unraid SMTP Test' -d 'Test message received!' -i 'alert' -t")) { $result = exec("tail -3 /var/log/syslog|awk '/sSMTP/ {getline;print}'|cut -d']' -f2|cut -d'(' -f1"); $color = strpos($result, 'Sent mail') ? 'green' : 'red'; - echo "Test result$result"; + echo _("Test result")."$result"; } else { - echo "Test result: No reply from mail server"; + echo _("Test result").": "._('No reply from mail server').""; } ?> diff --git a/plugins/dynamix/include/SelectCase.php b/plugins/dynamix/include/SelectCase.php index 0440bc8c7..aeda30cb6 100644 --- a/plugins/dynamix/include/SelectCase.php +++ b/plugins/dynamix/include/SelectCase.php @@ -1,6 +1,6 @@ -
custom image
-
default image
+
+
diff --git a/plugins/dynamix/include/ShareData.php b/plugins/dynamix/include/ShareData.php index 53d5345f1..9a3f287f7 100644 --- a/plugins/dynamix/include/ShareData.php +++ b/plugins/dynamix/include/ShareData.php @@ -1,6 +1,6 @@ There are no exportable user shares"; + echo ""._('There are no exportable user shares').""; exit; } // Natural sorting of share names @@ -39,8 +43,7 @@ uksort($shares,'strnatcasecmp'); function user_share_settings($protocol,$share) { if (empty($share)) return; if ($protocol!='yes' || $share['export']=='-') return "-"; - if ($share['export']=='e') return ucfirst($share['security']); - return ''.ucfirst($share['security']).''; + return ($share['export']=='e') ? _(ucfirst($share['security'])) : ''._(ucfirst($share['security'])).''; } function globalInclude($name) { @@ -76,14 +79,14 @@ foreach ($shares as $name => $share) { $row++; $color = $share['color']; switch ($color) { - case 'green-on' : $orb = 'circle'; $color = 'green'; $help = 'All files protected'; break; - case 'yellow-on': $orb = 'warning'; $color = 'yellow'; $help = 'Some or all files unprotected'; break; + case 'green-on' : $orb = 'circle'; $color = 'green'; $help = _('All files protected'); break; + case 'yellow-on': $orb = 'warning'; $color = 'yellow'; $help = _('Some or all files unprotected'); break; } if ($crypto) switch ($share['luksStatus']) { case 0: $luks = ""; break; - case 1: $luks = "All files encrypted"; break; - case 2: $luks = "Some or all files unencrypted"; break; - default: $luks = "Unknown encryption state'"; break; + case 1: $luks = ""._('All files encrypted').""; break; + case 2: $luks = ""._('Some or all files unencrypted').""; break; + default: $luks = ""._('Unknown encryption state').""; break; } else $luks = ""; echo ""; echo "$help$luks$name"; @@ -92,37 +95,37 @@ foreach ($shares as $name => $share) { echo "".user_share_settings($var['shareNFSEnabled'], $sec_nfs[$name]).""; echo "".user_share_settings($var['shareAFPEnabled'], $sec_afp[$name]).""; $cmd="/webGui/scripts/share_size"."&arg1=".urlencode($name)."&arg2=ssz1"; - $cache = ucfirst($share['useCache']); + $cache = _(ucfirst($share['useCache'])); if (array_key_exists($name, $ssz1)) { echo "$cache"; echo "".my_scale($ssz1[$name]['disk.total']*1024, $unit)." $unit"; echo "".my_scale($share['free']*1024, $unit)." $unit"; - echo ""; + echo ""; echo ""; foreach ($ssz1[$name] as $diskname => $disksize) { if ($diskname=='disk.total') continue; $include = $share['include']; $inside = in_array($diskname, array_filter(array_diff($myDisks, explode(',',$share['exclude'])), 'shareInclude')); echo "" : " warning'>"); - echo "".my_disk($diskname).":"; - echo "".($inside ? "" : "Share is outside the list of designated disks").""; + echo "".my_lang(my_disk($diskname),3).":"; + echo "".($inside ? "" : ""._('Share is outside the list of designated disks')."").""; echo ""; echo ""; echo ""; echo ""; echo "".my_scale($disksize*1024, $unit)." $unit"; echo "".my_scale($disks[$diskname]['fsFree']*1024, $unit)." $unit"; - echo ""; + echo ""; echo ""; } } else { echo "$cache"; - echo "Compute..."; + echo ""._('Compute')."..."; echo "".my_scale($share['free']*1024, $unit)." $unit"; - echo ""; + echo ""; echo ""; } } if ($row==0) { - echo "There are no exportable user shares"; + echo ""._('There are no exportable user shares').""; } diff --git a/plugins/dynamix/include/SmartInfo.php b/plugins/dynamix/include/SmartInfo.php index a9755a571..5f0600273 100644 --- a/plugins/dynamix/include/SmartInfo.php +++ b/plugins/dynamix/include/SmartInfo.php @@ -1,6 +1,6 @@ ".implode('',array_map('normalize', $info)).""; $empty = false; } - if ($empty) echo "Can not read attributes"; + if ($empty) echo ""._('Can not read attributes').""; } else { // probably a NMVe or SAS device that smartmontools doesn't know how to parse in to a SMART Attributes Data Structure foreach ($output as $line) { @@ -116,7 +120,7 @@ case "capabilities": $empty = false; } } - if ($empty) echo "Can not read capabilities"; + if ($empty) echo ""._('Can not read capabilities').""; break; case "identify": $passed = ['PASSED','OK']; @@ -128,13 +132,13 @@ case "identify": if (!$line) continue; if (strpos($line,'VALID ARGUMENTS')!==false) break; list($title,$info) = array_map('trim', explode(':', $line, 2)); - if (in_array($info,$passed)) $info = "Passed"; - if (in_array($info,$failed)) $info = "Failed"; + if (in_array($info,$passed)) $info = ""._('Passed').""; + if (in_array($info,$failed)) $info = ""._('Failed').""; echo "".normalize(preg_replace('/ is:$/',':',"$title:"),' ')."$info"; $empty = false; } if ($empty) { - echo "Can not read identification"; + echo ""._('Can not read identification').""; } else { $file = '/boot/config/disk.log'; $disks = parse_ini_file('state/disks.ini',true); @@ -142,10 +146,10 @@ case "identify": $disk = $disks[$name]['id']; $info = &$extra[$disk]; $periods = ['6','12','18','24','36','48','60']; - echo "Manufacturing date:"; - echo "Date of purchase:"; - echo "Warranty period:"; + echo ""._('Date of purchase').":"; + echo ""._('Warranty period').":"; } break; @@ -171,28 +175,28 @@ case "stop": case "update": if (!exec("hdparm -C ".escapeshellarg("/dev/$port")."|grep -Pom1 'active|unknown'")) { $cmd = $_POST['type']=='New' ? "cmd=/webGui/scripts/hd_parm&arg1=up&arg2=$name" : "cmdSpinup=$name"; - echo "Unavailable - disk must be spun up"; + echo ""._('Unavailable - disk must be spun up').""; break; } $progress = exec("smartctl -c $type ".escapeshellarg("/dev/$port")."|grep -Pom1 '\d+%'"); if ($progress) { - echo " self-test in progress, ".(100-substr($progress,0,-1))."% complete"; + echo " "._('self-test in progress').", ".(100-substr($progress,0,-1))."% "._('complete').""; break; } $result = trim(exec("smartctl -l selftest $type ".escapeshellarg("/dev/$port")."|grep -m1 '^# 1'|cut -c26-55")); if (!$result) { - echo "No self-tests logged on this disk"; + echo ""._('No self-tests logged on this disk').""; break; } if (strpos($result, "Completed without error")!==false) { - echo "$result"; + echo ""._($result).""; break; } if (strpos($result, "Aborted")!==false or strpos($result, "Interrupted")!==false) { - echo "$result"; + echo ""._($result).""; break; } - echo "Errors occurred - Check SMART report"; + echo ""._('Errors occurred - Check SMART report').""; break; case "selftest": echo shell_exec("smartctl -l selftest $type ".escapeshellarg("/dev/$port")."|awk 'NR>5'"); diff --git a/plugins/dynamix/include/Syslog.php b/plugins/dynamix/include/Syslog.php index 8db2a70e5..1afdd9cb6 100644 --- a/plugins/dynamix/include/Syslog.php +++ b/plugins/dynamix/include/Syslog.php @@ -1,6 +1,6 @@
-
Model: +
:
M/B:
-
BIOS: +
:
-
CPU: +
:
-
HVM: +
: '; if (strpos($strCPUInfo,'vmx')===false && strpos($strCPUInfo, 'svm')===false) { // CPU doesn't support virtualization - echo "Not Available"; + echo _("Not Available"); } else { // Motherboard either doesn't support virtualization or BIOS has it disabled - echo "Disabled"; + echo _("Disabled"); } echo ''; } ?>
-
IOMMU: +
: '; if (strpos($strCPUInfo,'vmx')===false && strpos($strCPUInfo, 'svm')===false) { // CPU doesn't support virtualization so iommu would be impossible - echo "Not Available"; + echo _("Not Available"); } else { // Motherboard either doesn't support iommu or BIOS has it disabled - echo "Disabled"; + echo _("Disabled"); } echo ''; } ?>
-
Cache: +
:
-
Memory: +
: =1) $memory_maximum += $size*pow(1024,$base); if (!$ecc && $device['Error Correction Type']!='None') $ecc = "{$device['Error Correction Type']} "; @@ -181,7 +185,7 @@ if ($memory_installed >= 1024) { // If maximum < installed then roundup maximum to the next power of 2 size of installed. E.g. 6 -> 8 or 12 -> 16 $low = $memory_maximum < $memory_installed; if ($low) $memory_maximum = pow(2,ceil(log($memory_installed)/log(2))); -echo "$memory_installed $unit $memory_type $ecc(max. installable capacity $memory_maximum $unit".($low?'*':'').")"; +echo "$memory_installed $unit $memory_type $ecc("._('max. installable capacity')." $memory_maximum $unit".($low?'*':'').")"; ?>
-
Network: +
:
-
Kernel: +
:
-
OpenSSL: +
:
-
Uptime: 
+
: 
- + -More +
diff --git a/plugins/dynamix/include/ToggleState.php b/plugins/dynamix/include/ToggleState.php index 55b51310f..44cbda1e1 100644 --- a/plugins/dynamix/include/ToggleState.php +++ b/plugins/dynamix/include/ToggleState.php @@ -1,6 +1,6 @@ +/','/^(null|yes|no|true|false|on|off|none)$/i','/ +/'],['','$1.',' '],$text)] ?? $text; + return strpos($data,'*')===false ? $data : preg_replace(['/\*\*(.+?)\*\*/','/\*(.+?)\*/'],['$1','$1'],$data); +} +function parse_lang_file($file) { + return array_filter(parse_ini_string(preg_replace(['/"/m','/^(null|yes|no|true|false|on|off|none)=/mi','/^([^>].*)=([^"\'`].*)$/m','/^:((help|plug)\d*)$/m','/^:end$/m'],['\'','$1.=','$1="$2"',"_$1_=\"",'"'],str_replace("=\n","=''\n",file_get_contents($file)))),'strlen'); +} +function rewrite($text) { + return preg_replace_callback('/_\((.+?)\)_/m',function($m){return _($m[1]);},preg_replace(["/^:((help|plug)\d*)$/m","/^:end$/m"],["",""],$text)); +} +function my_lang($text,$do=0) { + global $language; + switch ($do) { + case 0: // date translation + $months = isset($language['Months_array']) ? explode(' ',$language['Months_array']) : []; + $days = isset($language['Days_array']) ? explode(' ',$language['Days_array']) : []; + foreach ($months as $month) { + [$word,$that] = explode(':',$month); + if (strpos($text,$word)!==false) {$text = str_replace($word,$that,$text); break;} + } + foreach ($days as $day) { + [$word,$that] = explode(':',$day); + if (strpos($text,$word)!==false) {$text = str_replace($word,$that,$text); break;} + } + if (isset($language['today'])) $text = str_replace('today',$language['today'],$text); + if (isset($language['yesterday'])) $text = str_replace('yesterday',$language['yesterday'],$text); + if (isset($language['days ago'])) $text = str_replace('days ago',$language['days ago'],$text); + break; + case 1: // number translation + $numbers = isset($language['Numbers_array']) ? explode(' ',$language['Numbers_array']) : []; + foreach ($numbers as $number) { + [$word,$that] = explode(':',$number); + if (strpos($text,$word)!==false) {$text = str_replace($word,$that,$text); break;} + } + break; + case 2: // time translation + $time1 = ['days'=>$language['days']??'','hours'=>$language['hours']??'','minutes'=>$language['minutes']??'','seconds'=>$language['seconds']??'']; + $time2 = ['day'=>$language['day']??'','hour'=>$language['hour']??'','minute'=>$language['minute']??'','second'=>$language['second']??'']; + foreach ($time1 as $word => $that) { + if ($that && strpos($text,$word)!==false) { + $text = str_replace($word,$that,$text); + } else { + $one = substr($word,0,-1); + if ($time2[$one]) $text = str_replace($one,$time2[$one],$text); + } + } + if (isset($language['Average speed'])) $text = str_replace('Average speed',$language['Average speed'],$text); + break; + case 3: // device translation + [$p1,$p2] = explode(' ',$text); + $text = rtrim(_($p1)." $p2"); + } + return $text; +} +function translate($key) { + global $language; + if ($plug = isset($language[$key])) eval('?>'.Markdown($language[$key])); + return !$plug; +} +$language = []; +$locale = $_SESSION['locale']; + +if ($locale) { + $uri = explode('/',explode('?',$_SERVER['REQUEST_URI'])[0]); + $text = "$docroot/languages/$locale/translations.txt"; + if (file_exists($text)) { + $data = "$docroot/languages/$locale/translations.dot"; + if (!file_exists($data)) file_put_contents($data,serialize(parse_lang_file($text))); + $language = unserialize(file_get_contents($data)); + } + foreach($uri as $add) { + if (!$add) continue; + $add = strtolower($add); + $text = "$docroot/languages/$locale/$add.txt"; + if (file_exists($text)) { + $data = "$docroot/languages/$locale/$add.dot"; + if (!file_exists($data)) file_put_contents($data,serialize(parse_lang_file($text))); + $language = array_merge($language,unserialize(file_get_contents($data))); + } + } +} +?> diff --git a/plugins/dynamix/include/TrialRequest.php b/plugins/dynamix/include/TrialRequest.php index ec53dd0d5..7ba1c005e 100644 --- a/plugins/dynamix/include/TrialRequest.php +++ b/plugins/dynamix/include/TrialRequest.php @@ -1,5 +1,5 @@
-

+



-
Trial" onclick="startTrial()" disabled>
+
" onclick="startTrial()" disabled>
@@ -54,16 +58,14 @@ function startTrial() { $.post('https://keys.lime-technology.com/account/trial',{timestamp:timestamp,guid:guid},function(data) { $.post('/webGui/include/TrialRequest.php',{trial:data.trial,csrf_token:''},function(data2) { $('#spinner_image,#status_panel').fadeOut('fast'); - parent.swal({title:'Trial ',text:'Thank you for registering USB Flash GUID '+guid+'.',type:'success'},function(){parent.window.location='/Main';}); + parent.swal({title:" ",text:" "+guid+".",type:'success'},function(){parent.window.location='/Main';}); }); }).fail(function(data) { $('#trial_form').find('input').prop('disabled', false); $('#spinner_image').fadeOut('fast'); var status = data.status; var obj = data.responseJSON; - var msg = "

Sorry, an error ("+status+") occurred registering USB Flash GUID "+guid+"

" + - "

The error is: "+obj.error+"

"; - + var msg = "

"+guid+"

"+"

: "+obj.error+"

"; $('#status_panel').hide().html(msg).slideDown('fast'); }); } diff --git a/plugins/dynamix/include/UpdateDNS.php b/plugins/dynamix/include/UpdateDNS.php index b4bdc9e04..6a37c4363 100644 --- a/plugins/dynamix/include/UpdateDNS.php +++ b/plugins/dynamix/include/UpdateDNS.php @@ -1,6 +1,6 @@ diff --git a/plugins/dynamix/include/UpdateOne.php b/plugins/dynamix/include/UpdateOne.php index c82d9e190..fc8c35a46 100644 --- a/plugins/dynamix/include/UpdateOne.php +++ b/plugins/dynamix/include/UpdateOne.php @@ -1,6 +1,6 @@ $val) { @@ -33,7 +37,7 @@ case 'vm': require_once "$docroot/plugins/dynamix.vm.manager/include/libvirt_helpers.php"; foreach ($map as $name => $cpuset) { if (!strlen($cpuset)) { - $reply = ['error' => "Not allowed to assign ZERO cores"]; + $reply = ['error' => _("Not allowed to assign ZERO cores")]; break 2; } $uuid = $lv->domain_get_uuid($lv->get_domain_by_name($name)); diff --git a/plugins/dynamix/include/UpdateTwo.php b/plugins/dynamix/include/UpdateTwo.php index f3265b74b..13eee9c59 100644 --- a/plugins/dynamix/include/UpdateTwo.php +++ b/plugins/dynamix/include/UpdateTwo.php @@ -1,6 +1,6 @@ "Failed to stop '$name'"]; + $reply = ['error' => _('Failed to stop')." '$name'"]; break; } $lv->nvram_backup($uuid); diff --git a/plugins/dynamix/include/Wrappers.php b/plugins/dynamix/include/Wrappers.php index c8d5811c1..87f80674d 100644 --- a/plugins/dynamix/include/Wrappers.php +++ b/plugins/dynamix/include/Wrappers.php @@ -1,6 +1,6 @@
"; + echo "
"; } ?> diff --git a/plugins/dynamix/include/update.ethernet.php b/plugins/dynamix/include/update.ethernet.php index 77b6acf5f..9a8f89ffc 100644 --- a/plugins/dynamix/include/update.ethernet.php +++ b/plugins/dynamix/include/update.ethernet.php @@ -1,6 +1,6 @@