Browse Source

Added more localization

Toby Chui 3 years ago
parent
commit
5b27f2961b

+ 11 - 6
src/web/SystemAO/file_system/defaultOpener.html

@@ -8,6 +8,7 @@
         <script type="text/javascript" src="../../script/tocas/tocas.js"></script>
         <script type="text/javascript" src="../../script/jquery.min.js"></script>
         <script type="text/javascript" src="../../script/ao_module.js"></script>
+        <script type="text/javascript" src="../../script/applocale.js"></script>
         <script>
              window.mobilecheck = function() {
                 var check = false;
@@ -59,15 +60,15 @@
     </head>
     <body>
         <div class="ts container" style="padding-top:12px;">
-            <p>Select a default WebApp to open <span id="fext"></span> files.</p>
+            <p><span locale="message/select">Select a default WebApp to open</span> <span id="fext"></span> <span locale="message/files">files.</span></p>
             <div id="moduleList" class="moduleSelector">
                 
             </div>
-            <button id="showallbtn" class="ts fluid tiny button" onclick="showAllModules();">Show All</button>
+            <button id="showallbtn" class="ts fluid tiny button" onclick="showAllModules();" locale="button/showAll">Show All</button>
         </div>
         <div class="bottomControls" align="right">
-            <button class="ts small button" onclick="cancel();">Cancel</button>
-            <button id="confirmBtn" class="ts small primary disabled button" onclick="confirmSelection()">Confirm</button>
+            <button class="ts small button" onclick="cancel();" locale="button/cancel">Cancel</button>
+            <button id="confirmBtn" class="ts small primary disabled button" onclick="confirmSelection()" locale="button/confirm">Confirm</button>
         </div>
         <script>
             var targetFiles = "";
@@ -75,6 +76,10 @@
             var showAll = false;
             var moduleInfo = [];
 
+            //Load applocale
+            applocale.init("../locale/defaultOpener.json", function(){
+                applocale.translate();
+            });
             //Initiate ao_module events
             ao_module_setFixedWindowSize();
 
@@ -122,12 +127,12 @@
                     //Hide systems
                     showAll = false;
                     $("#moduleList").find(".item.hidden").slideUp('fast');
-                    $("#showallbtn").text("Show All");
+                    $("#showallbtn").text(applocale.getString("button/showAll", "Show All"));
                 }else{
                     //Show all
                     $("#moduleList").find(".item.hidden").slideDown('fast');
                     showAll = true;
-                    $("#showallbtn").text("Show Suitable WebApps Only");
+                    $("#showallbtn").text(applocale.getString("button/showRelevent", "Show Suitable WebApps Only"));
                 }
             }
 

+ 5 - 5
src/web/SystemAO/file_system/file_explorer.html

@@ -1567,9 +1567,9 @@
                                     $("#folderList").show();
                                     $("#folderList").html(`<div class="ts basic segment ${currentTheme}">
                                         <div class="ts header">
-                                            <i class="remove icon ${currentTheme}"></i> <span class="${currentTheme}">This Folder Cannot Be Opened</span>
-                                            <div class="sub header ${currentTheme}" style="margin-top:12px;">The server return the following error message: <br><code>${data.error.toUpperCase()}</code><br>
-                                                ${ao_module_utils.timeConverter(Date.now()/1000)}</div>
+                                            <i class="remove icon ${currentTheme}"></i> <span class="${currentTheme}">${applocale.getString("message/folderCannotOpen","This Folder Cannot Be Opened")}</span>
+                                            <div class="sub header ${currentTheme}" style="margin-top:12px;">${applocale.getString("message/folderCannotOpen/codedesc","The server return the following error message:")} <br><code>${data.error.toUpperCase()}</code><br>
+                                                ${new Date().toLocaleString(undefined, {year: 'numeric', month: '2-digit', day: '2-digit', weekday:"long", hour: '2-digit', hour12: false, minute:'2-digit', second:'2-digit'})}</div>
                                         </div>
                                     </div>`);
                                     $("#fileList").hide();
@@ -5005,8 +5005,8 @@
                             $("#folderList").show();
                             $("#folderList").html(`<div class="ts basic segment ${currentTheme}">
                                 <div class="ts header ${currentTheme}">
-                                    <i class="question icon" ${currentTheme}></i> <span class="${currentTheme}">No Matching Results</span>
-                                    <div class="sub header ${currentTheme}">The host return no matching results for your keyword "${keyword}". <br>Check your spelling and if your wildcard are valid.</div>
+                                    <i class="question icon" ${currentTheme}></i> <span class="${currentTheme}">${applocale.getString("message/noMatchResults","No Matching Results")}</span>
+                                    <div class="sub header ${currentTheme}">${applocale.getString("message/noMatchResultsDesc","The host return no matching results for your keyword")} "${keyword}". <br>${applocale.getString("message/noMatchResultsInst","Check your spelling and your wildcard characters.")}</div>
                                 </div>
                             </div>`);
                         }else{

+ 39 - 22
src/web/SystemAO/file_system/file_share.html

@@ -1,6 +1,6 @@
 <html>
     <head>
-        <title>File Share</title>
+        <title locale="title/title">File Share</title>
         <meta charset="UTF-8">
         <meta name="viewport" content="width=device-width, initial-scale=1.0 user-scalable=no">
         <style>
@@ -15,31 +15,31 @@
                 <div class="width: 100%; ">
                     <div style="display: block; margin-left: auto; margin-right: auto;" align="center">
                         <div id="qrcode" style="border: 10px solid white; background-color: white;">
-                            <h1>Loading</h1>
+                            <h1><br><i class="ui loading spinner icon"></i><br></h1>
                         </div>
                     </div>
                     <div style="width: 100%">
-                        <a id="sharelink" href="" target="_blank" style="margin-top:8px; font-size: 120%; padding-left: 20px; padding-right: 20px; word-break: break-all; overflow-wrap: anywhere;">Scan this QR Code to copy the share link</a>
+                        <a id="sharelink" href="" target="_blank" style="margin-top:8px; font-size: 120%; padding-left: 20px; padding-right: 20px; word-break: break-all; overflow-wrap: anywhere;"></a>
                     </div>
                     
                 </div>
             </div>
             <div id="shareSettingOptions" class="eight wide column" style="padding-left: 12px; display:none;">
                 <div class="ui header whiteTheme">
-                    Share Settings
-                    <div class="sub header whiteTheme">Change who can see this file</div>
+                    <span locale="share/setting/title">Share Settings</span>
+                    <div class="sub header whiteTheme" locale="share/setting/subtitle">Change who can see this file</div>
                 </div>
                 <div id="shareSettingForm" class="ui form">
                     <div class="field">
-                        <label><p class="whiteTheme">Visable options:</p></label>
+                        <label><p class="whiteTheme" locale="share/setting/options">Visable options:</p></label>
                         <div class="ui checkboxes">
                             <div class="ui radio checkbox">
                                 <input id="anyone" type="radio" class="shareoption" name="shareopt" value="anyone" onchange="updateSharePermission(this);">
                                 <label for="anyone">
                                     <div class="ui header">
                                         <div class="content whiteTheme">
-                                            <i class="globe icon"></i> Anyone with the link
-                                            <div class="sub header whiteTheme">Anyone who has the link can access this file</div>
+                                            <i class="globe icon"></i> <span locale="share/setting/anyoneWithLink">Anyone with the link</span>
+                                            <div class="sub header whiteTheme" locale="share/setting/anyoneWithLink/desc">Anyone who has the link can access this file</div>
                                         </div>
                                     </div>
                                 </label>
@@ -50,8 +50,8 @@
                                 <label for="signedin">
                                     <div class="ui header">
                                         <div class="content whiteTheme">
-                                            <i class="user circle outline icon"></i> Anyone signed in
-                                            <div class="sub header whiteTheme">Anyone who has signed in can access this file</div>
+                                            <i class="user circle outline icon"></i> <span locale="share/setting/anyoneSignedIn">Anyone signed in</span>
+                                            <div class="sub header whiteTheme" locale="share/setting/anyoneSignedIn/desc">Anyone who has signed in can access this file</div>
                                         </div>
                                     </div>
                                 </label>
@@ -62,15 +62,15 @@
                                 <label for="samegroup">
                                     <div class="ui header">
                                         <div class="content whiteTheme">
-                                            <i class="users icon"></i> Users in the same group
-                                            <div class="sub header whiteTheme">Anyone who is in the same group as you do</div>
+                                            <i class="users icon"></i> <span locale="share/setting/sameGroup">Users in the same group</span>
+                                            <div class="sub header whiteTheme" locale="share/setting/sameGroup/desc">Anyone who is in the same group as you do</div>
                                         </div>
                                     </div>
                                 </label>
                             </div>
                         <br><br>
                         <div id="udpateNotification" style="display:none;" class="ui green inverted segment">
-                                <i class=" checkmark icon"></i> Share Setting Updated
+                                <i class=" checkmark icon"></i> <span locale="share/setting/updated">Share Setting Updated</span>
                         </div>
                         </div>
                     </div>
@@ -80,10 +80,10 @@
         <div class="ui divider"></div>
         <div style="width: 100%; padding-right: 12px;" align="right">
             <div class="ui button popupbuttons whiteTheme allowHover" onclick="copyLinkToClipboard(this)">
-                <i class="copy icon"></i> Copy
+                <i class="copy icon"></i> <span locale="button/copy">Copy</span>
             </div> 
             <div id="sharingRemoveBtn" class="ui red button popupbuttons negative whiteTheme allowHover" onclick="removeSharing()">
-                <i class="remove icon"></i> Remove
+                <i class="remove icon"></i> <span locale="button/remove">Remove</span>
             </div> 
         </div>
         <script>
@@ -112,12 +112,18 @@
             var shareingFileData = {};
             var initialized = false;
             var fileSharingURL = "";
+            
 
             function PageReady(){
                 if (initialized){
                     return;
                 }
                 initialized = true;
+                //Do localization
+                applocale.init(relpath + "../SystemAO/locale/file_share.json", function(){
+                    applocale.translate();
+                });
+
                 $(".checkbox").checkbox();
                 var inputFile = ao_module_loadInputFiles();
                 if (inputFile == null){
@@ -145,7 +151,7 @@
                         //As the share mode is defined by the caller, hide the setting interface
                         $("#shareSettingOptions").hide();
                         $.ajax({
-                            url: "../../system/file_system/share/edit",
+                            url: relpath + "../system/file_system/share/edit",
                             data: {uuid: shareEditingUUID, mode: shareingFileData.shareMode},
                             success: function(data){
                                 if (data.error !== undefined){
@@ -169,11 +175,12 @@
                         $("#shareSettingOptions").show();
                     }
                 });
+
             }
 
             function initFileDetails(shareingFileData, callback=undefined){
                 $.ajax({
-                    url: "../../system/file_system/share/new",
+                    url: relpath + "../system/file_system/share/new",
                     data: {path: shareingFileData.filepath},
                     success: function(data){
                         if (data.error !== undefined){
@@ -216,7 +223,7 @@
 
                 //The target file to remove
                 $.ajax({
-                    url: "../../system/file_system/share/delete",
+                    url: relpath + "../system/file_system/share/delete",
                     data: {path: shareingFileData.filepath},
                     success: function(data){
                         if (data.error !== undefined){
@@ -227,7 +234,7 @@
                             $(".checkbox").addClass("disabled");
                             $("#sharelink").text("");
                             $("#sharelink").attr("href", "#");
-                            $("#qrcode").html(`<br><br><h1><i class="green checkmark icon"></i> Share Removed</h1>`);
+                            $("#qrcode").html(`<br><br><h1><i class="green checkmark icon"></i> ${applocale.getString("message/removed", "Share Removed")}</h1>`);
 
                             //If the file is located on desktop and it is web desktop mode
                             if (ao_module_virtualDesktop == true){
@@ -247,7 +254,7 @@
             function updateSharePermission(object){
                 var newPermission = $(object).attr('value');
                 $.ajax({
-                    url: "../../system/file_system/share/edit",
+                    url: relpath + "../system/file_system/share/edit",
                     data: {uuid: shareEditingUUID, mode: newPermission},
                     success: function(data){
                         if (data.error !== undefined){
@@ -265,7 +272,12 @@
                 if (location.protocol !== 'https:') {
                     protocol = "http://";
                 }
-                var shareURL = protocol + window.location.hostname + ":" + window.location.port + "/share/" + uuid;
+
+                var port = ":" + window.location.port;
+                if (window.location.port == ""){
+                    port = "";
+                }
+                var shareURL = protocol + window.location.hostname + port + "/share/" + uuid;
                 shareEditingUUID = uuid;
                 fileSharingURL = shareURL;
                 new QRCode(document.getElementById("qrcode"), shareURL);
@@ -317,6 +329,11 @@
                 script.setAttribute('src', relpath + "qrcode.min.js");
                 document.getElementsByTagName('head')[0].appendChild(script);
 
+                //Inject applocale
+                script = document.createElement('script');
+                script.setAttribute('src', relpath + "applocale.js");
+                document.getElementsByTagName('head')[0].appendChild(script);
+
                 //Inject semmantic css and js anyway
                 var head  = document.getElementsByTagName('head')[0];
                 var link  = document.createElement('link');
@@ -385,7 +402,7 @@
 
                 //Do visual feedback
                 let oldContent = $(btn).html();
-                $(btn).html(`<i class="green checkmark icon"></i> Copied!`);
+                $(btn).html(`<i class="green checkmark icon"></i> ${applocale.getString("button/copied","Copied!")}`);
                 setTimeout(function(){
                     $(btn).html(oldContent);
                 }, 3000);

+ 69 - 48
src/web/SystemAO/file_system/trashbin.html

@@ -7,6 +7,7 @@
         <script type="text/javascript" src="../../script/jquery.min.js"></script>
         <script type="text/javascript" src="../../script/semantic/semantic.min.js"></script>
         <script type="text/javascript" src="../../script/ao_module.js"></script>
+        <script type="text/javascript" src="../../script/applocale.js"></script>
         <style>
             body{
                 background-color:white;
@@ -45,54 +46,56 @@
         <span class="normalview">
         <div class="ui menu">
             <div class="header item">
-               <img class="ui middle aligned mini image" src="trashbin_img/small_icon.png" style="margin-right:8px; height:28px; width:28px;"></img> Trash Bin
+               <img class="ui middle aligned mini image" src="trashbin_img/small_icon.png" style="margin-right:8px; height:28px; width:28px;"></img> <span locale="title/title">Trash Bin</span>
             </div>
             <div class="right item">
-                <button class="ui negative small button" onclick="clearAll();">Delete All</button>
+                <button class="ui negative small button" onclick="clearAll();" locale="button/deleteAll">Delete All</button>
             </div>
         </div>
         <div class="ui container">
             <div class="ui segment">
                 <table class="ui celled table">
                     <thead>
-                        <tr><th>Filename</th>
-                        <th>Delete Time</th>
-                        <th>Details</th>
-                        <th>Restore</th>
-                    </tr></thead>
+                        <tr>
+                            <th locale="list/filename">Filename</th>
+                            <th locale="list/deleteTime">Delete Time</th>
+                            <th locale="list/details">Details</th>
+                            <th locale="list/restore">Restore</th>
+                        </tr>
+                    </thead>
                     <tbody id="trashList">
                     </tbody>
                 </table>
                 <div class="ui message" id="scanning">
-                    <i class="loading spinner icon"></i> Scanning for trash in all disks...
+                    <i class="loading spinner icon"></i> <span locale="list/scanning">Scanning for trash in all disks...</span>
                 </div>
             </div>
         </div>
         </span>
         <div class="confirmRemove" style="display:none;">
             <div class="banner">
-                <div class="title">Move <span id="fcount">0 File</span> to Trash Bin?</div>
+                <div class="title"><span locale="opr/move">Move</span> <span id="fcount">0 File</span> <span locale="opr/toTrashBin">to Trash Bin?</span></div>
                 <img id="opricon" src="trashbin_img/trashopr.png" class="ui image"></img>
             </div>
             <div class="content">
-                <div class="info">Deleting: <span class="filename"></span></div>
+                <div class="info"><span locale="opr/delete">Deleting:</span> <span class="filename"></span></div>
                 <div style="position:absolute; bottom:8px;right:4px;">
-                    <button class="ui small button" onclick="ao_module_close();">Cancel</button>
-                    <button class="ui primary small button" onclick="confirmDelete();">Confirm</button>
+                    <button class="ui small button" onclick="ao_module_close();" locale="opr/cancel">Cancel</button>
+                    <button class="ui primary small button" onclick="confirmDelete();" locale="opr/confirm">Confirm</button>
                 </div>
             </div>
         </div>
         <div class="ui modal" style="overflow-y:auto; overflow-x:hidden;">
             <i class="close icon"></i>
-            <div class="header filename">
+            <div class="header filename" locale="message/nofileselected">
                 No File Selected
             </div>
             <div class="ui basic segment">
                 <table class="ui very basic celled table">
                     <thead>
                         <tr>
-                            <th>Property</th>
-                            <th>Value</th>
+                            <th locale="message/property">Property</th>
+                            <th locale="message/value">Value</th>
                         </tr>
                     </thead>
                     <tbody id="detailList">
@@ -101,7 +104,7 @@
                 </table>
             </div>
             <div class="actions">
-                <div class="ui icon blue button" onclick=" $('.ui.modal').modal('hide');">
+                <div class="ui button" onclick=" $('.ui.modal').modal('hide');" locale="detail/ok">
                  OK
                 </div>
             </div>
@@ -112,26 +115,44 @@
             var previousTrashbinFilelist = [];
             var legacyMode = !('WebSocket' in window || 'MozWebSocket' in window); 
 
-            if (deletePendingFiles != null && deletePendingFiles.length > 0){
-                //Handle trash treatment
-                console.log(deletePendingFiles);
-                ao_module_setFixedWindowSize();
-                ao_module_setWindowSize(400,200);
-                $(".normalview").hide();
-                $(".confirmRemove").show();
+            if (!applocale){
+                applocale = {
+                    init: function(json, callback){
+                        if (callback){
+                            callback();
+                        }
+                    }
+                }
+            }
+            applocale.init("../../SystemAO/locale/trashbin.json", function(){
+                applocale.translate();
 
-                //Update graphical information
-                var displayname = deletePendingFiles[0].filename;
-                $("#fcount").text("1 File");
-                if (deletePendingFiles.length > 1){
-                    displayname = displayname + " and " + (deletePendingFiles.length - 1) + " more";
-                    $("#fcount").text(deletePendingFiles.length + " Files");
+                if (deletePendingFiles != null && deletePendingFiles.length > 0){
+                    //Handle trash treatment
+                    console.log(deletePendingFiles);
+                    ao_module_setFixedWindowSize();
+                    //ao_module_setWindowSize(400,200);
+                    $(".normalview").hide();
+                    $(".confirmRemove").show();
+
+                    //Update graphical information
+                    var displayname = deletePendingFiles[0].filename;
+                    $("#fcount").text("1 " + applocale.getString("opr/file", "File"));
+                    if (deletePendingFiles.length > 1){
+                        displayname = displayname + applocale.getString("opr/and", " and ") + (deletePendingFiles.length - 1) + applocale.getString("opr/more", " more");
+                        $("#fcount").text(deletePendingFiles.length + " " + applocale.getString("opr/files", "Files"));
+                    }
+                    $(".filename").text(displayname);
+
+                }else{
+                    //List all trash mode
+                    ao_module_setWindowSize(1080, 580);
+                    initList();
                 }
-                $(".filename").text(displayname);
 
-            }else{
-                initList();
-            }
+            });
+
+           
 
             //Initialize the trash list
             function initList(){
@@ -155,8 +176,8 @@
                         $("#trashList").append(`<tr>
                             <td>${thisFile.OriginalFilename}</td>
                             <td>${thisFile.RemoveDate}</td>
-                            <td><button filedata="${filedata}" class="ui tiny button" onclick="showDetail(this);">Details</button></td>
-                            <td><button filedata="${filedata}" class="ui green tiny button" onclick="restore(this);">Restore</button></td>
+                            <td><button filedata="${filedata}" class="ui tiny button" onclick="showDetail(this);">${applocale.getString("button/details","Details")}</button></td>
+                            <td><button filedata="${filedata}" class="ui green tiny button" onclick="restore(this);">${applocale.getString("button/restore", "Restore")}</button></td>
                         </tr>`);
                         previousTrashbinFilelist.push(thisFile);
                     };
@@ -188,14 +209,14 @@
                                 $("#trashList").append(`<tr>
                                     <td>${thisFile.OriginalFilename}</td>
                                     <td>${thisFile.RemoveDate}</td>
-                                    <td><button filedata="${filedata}" class="ui tiny button" onclick="showDetail(this);">Details</button></td>
-                                    <td><button filedata="${filedata}" class="ui green tiny button" onclick="restore(this);">Restore</button></td>
+                                    <td><button filedata="${filedata}" class="ui tiny button" onclick="showDetail(this);">${applocale.getString("button/details","Details")}</button></td>
+                                    <td><button filedata="${filedata}" class="ui green tiny button" onclick="restore(this);">${applocale.getString("button/restore", "Restore")}</button></td>
                                 </tr>`);
                                 previousTrashbinFilelist.push(thisFile);
                             }
 
                             if (data.length == 0){
-                                $("#trashList").append(`<tr><td colspan="4"><i class="checkmark icon"></i> There are no files or folders in Trashbin.</td></tr>`);
+                                $("#trashList").append(`<tr><td colspan="4"><i class="checkmark icon"></i> ${applocale.getString("message/notrash","There are no files or folders in Trashbin.")}</td></tr>`);
                             }
                             $("#scanning").hide();
                         }
@@ -240,15 +261,15 @@
                 $(".filename").text(filedata.OriginalFilename);
                 $("#detailList").html("");
                 var keyMapping = {
-                    "Filename": "Storage Filename",
-                    "Filepath": "Storage Filepath",
-                    "FileExt": "File Extension",
-                    "IsDir": "Is Directory",
-                    "Filesize": "File Size",
-                    "RemoveTimestamp": "Remove Timestamp",
-                    "RemoveDate": "Remove Datetime",
-                    "OriginalPath": "Original Path",
-                    "OriginalFilename": "Original Filename"
+                    "Filename": applocale.getString("detail/storageFilename", "Storage Filename"),
+                    "Filepath": applocale.getString("detail/storageFilepath","Storage Filepath"),
+                    "FileExt": applocale.getString("detail/fileExt","File Extension"),
+                    "IsDir": applocale.getString("detail/isDir","Is Directory"),
+                    "Filesize": applocale.getString("detail/filesize","File Size"),
+                    "RemoveTimestamp": applocale.getString("detail/removeTimestamp","Remove Timestamp"),
+                    "RemoveDate": applocale.getString("detail/removeDate","Remove Datetime"),
+                    "OriginalPath": applocale.getString("detail/originalPath","Original Path"),
+                    "OriginalFilename": applocale.getString("detail/originalFilename","Original Filename")
                 }
                 for (var [key, value] of Object.entries(filedata)) {
                     console.log(key, value);
@@ -278,7 +299,7 @@
             }
 
             function clearAll(){
-                if (confirm("Confirm deleting ALL FILE PERMANENTLY?")){
+                if (confirm(applocale.getString("message/confirmDelete", "Confirm deleting ALL FILE PERMANENTLY?"))){
                     $.get("../../system/file_system/clearTrash",function(data){
                         initList();
                     });

+ 50 - 0
src/web/SystemAO/locale/defaultOpener.json

@@ -0,0 +1,50 @@
+{
+    "author": "tobychui",
+    "version": "1.0",
+    "keys": {
+        "zh-tw": {
+            "fwtitle" : "選擇預設網頁應用程式",
+            "fontFamily":"\"Microsoft JhengHei\",\"SimHei\", \"Apple LiGothic Medium\", \"STHeiti\"",
+            "strings":{
+                "message/select":"請選擇用作開啟 ",
+                "message/files":" 檔案的預設網頁應用程式",
+
+                "button/showAll":"顯示全部應用程式",
+                "button/showRelevent":"顯示相關應用程式",
+                "button/cancel":"取消",
+                "button/confirm":"確認",
+                "":""
+            },
+            "titles":{
+
+            },
+            "placeholder":{
+
+            }
+        },
+        "zh-hk": {
+            "fwtitle" : "",
+            "strings":{
+
+            },
+            "titles":{
+
+            },
+            "placeholder":{
+
+            }
+        },
+        "zh-cn": {
+            "fwtitle" : "",
+            "strings":{
+
+            },
+            "titles":{
+
+            },
+            "placeholder":{
+
+            }
+        }
+    }
+}

+ 14 - 0
src/web/SystemAO/locale/file_explorer.json

@@ -154,6 +154,12 @@
                 "message/User not logged in":"使用者未登入",
                 "message/Folder not exists":"找不到資料夾",
 
+                "message/noMatchResults":"找不到匹配的檔案",
+                "message/noMatchResultsDesc":"伺服器找不到與此關鍵字匹配的檔案",
+                "message/noMatchResultsInst":"請檢查你的關鍵字或通配符是否正確。",
+
+                "message/folderCannotOpen":"無法開啟此資料夾",
+                "message/folderCannotOpen/codedesc":"伺服器端回傳以下錯誤訊息: ",
 
                 "message/destIdentical": "檔案來源及目的地相同",
                 "message/decodeFilelistFail": "載案置入失敗:無法讀取檔案列表",
@@ -348,6 +354,10 @@
                 "message/User not logged in":"使用者未登入",
                 "message/Folder not exists":"找不到資料夾",
 
+                "message/noMatchResults":"找不到匹配的檔案",
+                "message/noMatchResultsDesc":"伺服器找不到與此關鍵字匹配的檔案",
+                "message/noMatchResultsInst":"請檢查你的關鍵字或通配符是否正確。",
+
                 "message/destIdentical": "檔案來源及目的地相同",
                 "message/decodeFilelistFail": "載案置入失敗:無法讀取檔案列表",
                 "message/uploadFailed": "載案上載失敗:檔案太大或目標儲存裝置已滿",
@@ -541,6 +551,10 @@
                 "message/User not logged in":"使用者未登入",
                 "message/Folder not exists":"找不到资料夹", 
 
+                "message/noMatchResults":"找不到匹配的文件",
+                "message/noMatchResultsDesc":"伺服器找不到与此关键字匹配的文件",
+                "message/noMatchResultsInst":"请检查你的关键字或通配符是否正确。", 
+
                 "message/destIdentical": "文件来源及目的地相同",
                 "message/decodeFilelistFail": "载案置入失败:无法读取文件列表",
                 "message/uploadFailed": "载案上传失败:文件太大或目标储存装置已满",

+ 96 - 0
src/web/SystemAO/locale/file_share.json

@@ -0,0 +1,96 @@
+{
+    "author": "tobychui",
+    "version": "1.0",
+    "keys": {
+        "zh-tw": {
+            "fontFamily":"\"Microsoft JhengHei\",\"SimHei\", \"Apple LiGothic Medium\", \"STHeiti\"",
+            "fwtitle" : "檔案分享",
+            "strings":{
+                "title/title": "檔案分享",
+                "button/copy":"複製到剪貼簿",
+                "button/remove":"移除分享",
+                "button/copied":"已複製!",
+
+                "share/setting/title":"分享設定",
+                "share/setting/subtitle":"設定誰可以存取此檔案",
+                "share/setting/options":"取存設定:",
+                "share/setting/anyoneWithLink":"擁有連接的使用者",
+                "share/setting/anyoneWithLink/desc":"任何擁有分享連接的使用者皆可下載此檔案",
+                "share/setting/anyoneSignedIn":"已登入的使用者",
+                "share/setting/anyoneSignedIn/desc":"任何已登入並擁有分享連接的使用者皆可下載此檔案",
+                "share/setting/sameGroup":"在同一權限群組內的使用者",
+                "share/setting/sameGroup/desc":"任何擁有相同使用者權限的使用者皆可下載此檔案",
+                "share/setting/updated":"存取權限已更新",
+
+                "message/removed": "分享已移除",
+                "qr/loading": "載入中"
+               
+            },
+            "titles":{
+
+            },
+            "placeholder":{
+
+            }
+        },
+        "zh-hk": {
+            "fontFamily":"\"Microsoft JhengHei\",\"SimHei\", \"Apple LiGothic Medium\", \"STHeiti\"",
+            "fwtitle" : "檔案分享",
+            "strings":{
+                "title/title": "檔案分享",
+                "button/copy":"複製到剪貼簿",
+                "button/remove":"移除分享",
+                "button/copied":"已複製!",
+
+                "share/setting/title":"分享設定",
+                "share/setting/subtitle":"設定誰可以存取此檔案",
+                "share/setting/options":"取存設定:",
+                "share/setting/anyoneWithLink":"擁有連接的使用者",
+                "share/setting/anyoneWithLink/desc":"任何擁有分享連接的使用者皆可下載此檔案",
+                "share/setting/anyoneSignedIn":"已登入的使用者",
+                "share/setting/anyoneSignedIn/desc":"任何已登入並擁有分享連接的使用者皆可下載此檔案",
+                "share/setting/sameGroup":"在同一權限群組內的使用者",
+                "share/setting/sameGroup/desc":"任何擁有相同使用者權限的使用者皆可下載此檔案",
+                "share/setting/updated":"存取權限已更新",
+
+                "message/removed": "分享已移除",
+                "qr/loading": "載入中"
+            },
+            "titles":{
+
+            },
+            "placeholder":{
+
+            }
+        },
+        "zh-cn": {
+            "fwtitle" : "文件分享",
+            "strings":{
+                "title/title": "文件分享",
+                "button/copy":"复制到剪贴簿",
+                "button/remove":"移除分享",
+                "button/copied":"已复制!",
+
+                "share/setting/title":"分享设定",
+                "share/setting/subtitle":"设定谁可以存取此文件",
+                "share/setting/options":"取存设定:",
+                "share/setting/anyoneWithLink":"拥有连接的使用者",
+                "share/setting/anyoneWithLink/desc":"任何拥有分享连接的使用者皆可下载此文件",
+                "share/setting/anyoneSignedIn":"已登入的使用者",
+                "share/setting/anyoneSignedIn/desc":"任何已登入并拥有分享连接的使用者皆可下载此文件",
+                "share/setting/sameGroup":"在同一权限群组内的使用者",
+                "share/setting/sameGroup/desc":"任何拥有相同使用者权限的使用者皆可下载此文件",
+                "share/setting/updated":"存取权限已更新",
+
+                "message/removed": "分享已移除",
+                "qr/loading": "载入中" 
+            },
+            "titles":{
+
+            },
+            "placeholder":{
+
+            }
+        }
+    }
+}

+ 159 - 0
src/web/SystemAO/locale/trashbin.json

@@ -0,0 +1,159 @@
+{
+    "author": "tobychui",
+    "version": "1.0",
+    "keys": {
+        "zh-tw": {
+            "fwtitle" : "垃圾箱",
+            "strings":{
+                "title/title":"垃圾箱",
+                
+                "button/deleteAll":"全部刪除",
+                "button/details":"詳情",
+                "button/restore":"恢復",
+
+                "list/filename":"檔案名稱",
+                "list/deleteTime":"刪除時間",
+                "list/details":"詳細資料",
+                "list/restore":"恢復檔案",
+                "list/scanning":"正在從所有虛擬磁碟區掃描回收檔案",
+                
+
+                "opr/move":"移動",
+                "opr/file":"檔案",
+                "opr/files":"檔案",
+                "opr/and":" 及 ",
+                "opr/more":" 等檔案",
+                "opr/toTrashBin":"到垃圾箱?",
+                "opr/delete":"刪除: ",
+                "opr/cancel":"取消",
+                "opr/confirm":"確認",
+                
+                "message/nofileselected":"沒有選擇任何檔案",
+                "message/property":"屬性",
+                "message/value":"數值",
+                "message/notrash":"垃圾箱內沒有檔案或資料夾",
+                "message/confirmDelete":"確認要 **永久刪除** 所有檔案?",
+
+                "detail/storageFilename":"檔案儲存名稱",
+                "detail/storageFilepath":"檔案虛擬儲存路徑",
+                "detail/fileExt":"副檔名",
+                "detail/isDir":"資料夾",
+                "detail/filesize":"檔案大小",
+                "detail/removeTimestamp":"刪除時間戳",
+                "detail/removeDate":"刪除日期",
+                "detail/originalPath":"原始檔案虛擬路徑",
+                "detail/originalFilename":"原始檔案名稱",
+                "detail/ok":"確定",
+                "":""
+            },
+            "titles":{
+
+            },
+            "placeholder":{
+
+            }
+        },
+        "zh-hk": {
+            "fwtitle" : "垃圾箱",
+            "strings":{
+                "title/title":"垃圾箱",
+                
+                "button/deleteAll":"全部刪除",
+                "button/details":"詳情",
+                "button/restore":"恢復",
+
+                "list/filename":"檔案名稱",
+                "list/deleteTime":"刪除時間",
+                "list/details":"詳細資料",
+                "list/restore":"恢復檔案",
+                "list/scanning":"正在從所有虛擬磁碟區掃描回收檔案",
+                
+
+                "opr/move":"移動",
+                "opr/file":"檔案",
+                "opr/files":"檔案",
+                "opr/and":" 及 ",
+                "opr/more":" 等檔案",
+                "opr/toTrashBin":"到垃圾箱?",
+                "opr/delete":"刪除: ",
+                "opr/cancel":"取消",
+                "opr/confirm":"確認",
+                
+                "message/nofileselected":"沒有選擇任何檔案",
+                "message/property":"屬性",
+                "message/value":"數值",
+                "message/notrash":"垃圾箱內沒有檔案或資料夾",
+                "message/confirmDelete":"確認要 **永久刪除** 所有檔案?",
+
+                "detail/storageFilename":"檔案儲存名稱",
+                "detail/storageFilepath":"檔案虛擬儲存路徑",
+                "detail/fileExt":"副檔名",
+                "detail/isDir":"資料夾",
+                "detail/filesize":"檔案大小",
+                "detail/removeTimestamp":"刪除時間戳",
+                "detail/removeDate":"刪除日期",
+                "detail/originalPath":"原始檔案虛擬路徑",
+                "detail/originalFilename":"原始檔案名稱",
+                "detail/ok":"確定",
+                "":""
+            },
+            "titles":{
+
+            },
+            "placeholder":{
+
+            }
+        },
+        "zh-cn": {
+            "fwtitle" : "垃圾箱",
+            "strings":{
+                "title/title":"垃圾箱",
+                
+                "button/deleteAll":"全部删除",
+                "button/details":"详情",
+                "button/restore":"恢复",
+
+                "list/filename":"文件名称",
+                "list/deleteTime":"删除时间",
+                "list/details":"详细资料",
+                "list/restore":"恢复文件",
+                "list/scanning":"正在从所有虚拟磁碟区扫描回收文件",
+                
+
+                "opr/move":"移动",
+                "opr/file":"文件",
+                "opr/files":"文件",
+                "opr/and":" 及 ",
+                "opr/more":" 等文件",
+                "opr/toTrashBin":"到垃圾箱?",
+                "opr/delete":"删除: ",
+                "opr/cancel":"取消",
+                "opr/confirm":"确认",
+                
+                "message/nofileselected":"没有选择任何文件",
+                "message/property":"属性",
+                "message/value":"数值",
+                "message/notrash":"垃圾箱内没有文件或资料夹",
+                "message/confirmDelete":"确认要 **永久删除** 所有文件? ",
+
+                "detail/storageFilename":"文件储存名称",
+                "detail/storageFilepath":"文件虚拟储存路径",
+                "detail/fileExt":"副档名",
+                "detail/isDir":"资料夹",
+                "detail/filesize":"文件大小",
+                "detail/removeTimestamp":"删除时间戳",
+                "detail/removeDate":"删除日期",
+                "detail/originalPath":"原始文件虚拟路径",
+                "detail/originalFilename":"原始文件名称",
+                "detail/ok":"确定",
+                "":"" 
+            },
+            "titles":{
+
+            },
+            "placeholder":{
+
+            }
+        }
+    }
+}

+ 3 - 3
src/web/SystemAO/www/config.html

@@ -39,7 +39,7 @@
                 <ul class="list">
                     <li>You can host a static website using ArozOS</li>
                     <li>All website source are accessiable by your File Manager located inside your user file system</li>
-                    <li>Everyone can access your home page using <a id="homepageLink" target="_blank"><span class="protocol">http:</span>//<span class="hostname"></span>:<span class="port"></span>/www/<span class="username">{your_username}</span>/</a></li>
+                    <li>Everyone can access your home page using <a id="homepageLink" target="_blank"><span class="protocol">http:</span>//<span class="hostname"></span><span class="port"></span>/www/<span class="username">{your_username}</span>/</a></li>
                 </ul>
             </div>
             <div class="ui container">
@@ -75,9 +75,9 @@
 
             //Update tutorial information
             $(".hostname").text(window.location.hostname);
-            $(".port").text(window.location.port);
+            $(".port").text(":" + window.location.port);
             if (window.location.port == ""){
-                $(".port").text("80");
+                $(".port").text("");
             }
             $(".protocol").text(window.location.protocol);