Przeglądaj źródła

Added localization for updates

Toby Chui 1 rok temu
rodzic
commit
af83e79d97

+ 23 - 2
web/SystemAO/locale/system_settings/updates.json

@@ -20,14 +20,35 @@
                 "confirm/update/reminder": "請確保您在開始前已備份所有重要的檔案及設定",
                 "confirm/update/reminder": "請確保您在開始前已備份所有重要的檔案及設定",
                 "download/title": "正在準備更新",
                 "download/title": "正在準備更新",
                 "download/wsFallback": "無法與伺服器建立 WebSocket 連接。正在使用 AJAX 下載模式(無進度顯示屬正常狀態) <br>請等待下載完成並不要關閉本視窗。</br>",
                 "download/wsFallback": "無法與伺服器建立 WebSocket 連接。正在使用 AJAX 下載模式(無進度顯示屬正常狀態) <br>請等待下載完成並不要關閉本視窗。</br>",
-
+                "succ/update":"更新下載完成",
+                "succ/restartDesc": "使用 ArozOS 啟動器進行重新啟動或手動移動下載之更新檔以完成更新過程。",
+                "pending/title":"已準備更新",
+                "pending/desc": "使用 ArozOS 啟動器進行重新啟動或手動移動下載之更新檔以完成更新過程。",
+                "failed/title": "更新下載失敗",
+                "failed/error": "已發生不知名錯誤",
+                "launcher/detected/title": "啟動器檢測:",
+                "launcher/desc":"您將會需要手動重新啟動 ArozOS 以完成更新",
+                "launcher/warning": "注意!由於更新失敗時主機將會需要手動重啟,請確保您在重啟的時候有遠端或物理重啟伺服器的方法。",
+                "launcher/restartnow": "立即重啟",
+                "launcher/restartlater": "稍後重啟",
+                "update/vendor/from": "更新自 ",
+                "update/vendor/recommend": "建議",
+                "update/vendor/desc": " 並使用系統內置之預設更新設定",
+                "update/useVendorUpdate": "更新",
+                "update/download/title":"HTTP 下載更新",
+                "update/download/binary": "arozos 執行檔下載連結",
+                "update/download/binaryInstr": "檔案名稱一般擁有這樣的格式:arozos_{OS 平台}_{CPU 架構}",
+                "update/download/webpack": "webpack 壓縮檔下載連結",
+                "update/download/webpackInst": "檔案名稱一般為 webpack.tar.gz",
+                "update/download/execu": "執行自定義更新",
                 "":""
                 "":""
             },
             },
             "titles":{
             "titles":{
 
 
             },
             },
             "placeholder":{
             "placeholder":{
-
+                "Binary Download URL": "執行檔下載連結",
+                "Webpack Download URL": "webpack 下載連結"
             }
             }
         },
         },
         "zh-hk": {
         "zh-hk": {

+ 23 - 22
web/SystemAO/updates/index.html

@@ -76,64 +76,64 @@
             <div id="success" class="ui icon green message" style="display:none;">
             <div id="success" class="ui icon green message" style="display:none;">
                 <i class="green checkmark icon"></i>
                 <i class="green checkmark icon"></i>
                 <div class="content">
                 <div class="content">
-                    <div class="header" id="downloadStatusText">
+                    <div class="header" id="downloadStatusText" locale="succ/update">
                         Update Download Succeed
                         Update Download Succeed
                     </div>
                     </div>
-                    <p>Restart ArozOS using the launcher or apply manual update files overwrite to finish the update process.</p>
+                    <p locale="succ/restartDesc">Restart ArozOS using the launcher or apply manual update files overwrite to finish the update process.</p>
                 </div>
                 </div>
             </div>
             </div>
             <div id="pending" class="ui icon green message" style="display:none;">
             <div id="pending" class="ui icon green message" style="display:none;">
                 <i class="green clock icon"></i>
                 <i class="green clock icon"></i>
                 <div class="content">
                 <div class="content">
-                    <div class="header" id="downloadStatusText">
+                    <div class="header" id="downloadStatusText" locale="pending/title">
                         Update Pending
                         Update Pending
                     </div>
                     </div>
-                    <p>Restart ArozOS using the launcher or apply manual update files overwrite to finish the update process.</p>
+                    <p locale="pending/desc">Restart ArozOS using the launcher or apply manual update files overwrite to finish the update process.</p>
                 </div>
                 </div>
             </div>
             </div>
             <div id="failed" class="ui icon red message" style="display:none;">
             <div id="failed" class="ui icon red message" style="display:none;">
                 <i class="red remove icon"></i>
                 <i class="red remove icon"></i>
                 <div class="content">
                 <div class="content">
-                    <div class="header" id="downloadStatusText">
+                    <div class="header" id="downloadStatusText" locale="failed/title">
                         Update Download Failed
                         Update Download Failed
                     </div>
                     </div>
-                    <p id="failedErrorMessage">Unknown Error Occured</p>
+                    <p id="failedErrorMessage" locale="failed/error">Unknown Error Occured</p>
                 </div>
                 </div>
             </div>
             </div>
             <div id="restartPanel" class="ui message" style="display:none;">
             <div id="restartPanel" class="ui message" style="display:none;">
                 <div class="header">
                 <div class="header">
-                    Launcher Detected: <span id="launcherName">N/A</span>
+                    <span locale="launcher/detected/title">Launcher Detected:</span> <span id="launcherName">N/A</span>
                 </div>
                 </div>
-                <p>You will need to restart ArozOS in order to apply the updates.</p>
-                <p>Warning! Make sure you have physical access to this ArozOS Host before pressing the restart button.<br> Update failure might require a manual restart of the ArozOS system host and its launcher.</p>
-                <button class="ui red button" onclick="restartArozOS();">RESTART NOW</button>
-                <button class="ui button" onclick="restartLater();">Restart Later</button>
+                <p locale="launcher/desc">You will need to restart ArozOS in order to apply the updates.</p>
+                <p locale="launcher/warning">Warning! Make sure you have physical access to this ArozOS Host before pressing the restart button.<br> Update failure might require a manual restart of the ArozOS system host and its launcher.</p>
+                <button class="ui red button" locale="launcher/restartnow" onclick="restartArozOS();">RESTART NOW</button>
+                <button class="ui button" locale="launcher/restartlater" onclick="restartLater();">Restart Later</button>
             </div>
             </div>
             <!-- End of Status Messages -->
             <!-- End of Status Messages -->
             <div class="vendorupdate">
             <div class="vendorupdate">
-                <h4>Update from <span class="vendorName">Vendor</span> (<i class="yellow star icon"></i> Recommended)</h4>
-                <p>Update from <span class="vendorName">your vendor</span> based on the system update configuration that ship with this machine</p>
-                <button class="ui blue button updateBtn" onclick="updateViaVendor();"><i class="cloud upload icon"></i>  Update from Vendor</button>
+                <h4><span locale="update/vendor/from">Update from</span> <span class="vendorName">Vendor</span> (<i class="yellow star icon"></i> <span locale="update/vendor/recommend">Recommended</span>)</h4>
+                <p><span locale="update/vendor/from">Update from</span> <span class="vendorName">your vendor</span> <span locale="update/vendor/desc">based on the system update configuration that ship with this machine</span></p>
+                <button class="ui green button updateBtn" onclick="updateViaVendor();"><i class="cloud upload icon"></i> <span locale="update/useVendorUpdate">Update from Vendor</span></button>
                 <div class="ui divider"></div>
                 <div class="ui divider"></div>
             </div>
             </div>
-            <h4>Update via Download</h4>
-            <p>Binary Executable Download URL</p>
+            <h4 locale="update/download/title">Update via Download</h4>
+            <p locale="update/download/binary">Binary Executable Download URL</p>
             <div class="ui fluid input">
             <div class="ui fluid input">
                 <input id="burl" type="text" placeholder="Binary Download URL">
                 <input id="burl" type="text" placeholder="Binary Download URL">
             </div>
             </div>
-            <small>Usually with pattern like: arozos_{platform}_{cpu_arch}</small>
+            <small locale="update/download/binaryInstr">Usually with pattern like: arozos_{platform}_{cpu_arch}</small>
             <br><br>
             <br><br>
-            <p>Webpack Download URL</p>
+            <p locale="update/download/webpack">Webpack Download URL</p>
             <div class="ui fluid input">
             <div class="ui fluid input">
                 <input id="wurl" type="text" placeholder="Webpack Download URL">
                 <input id="wurl" type="text" placeholder="Webpack Download URL">
             </div>
             </div>
-            <small>Usually with named as: webpack.tar.gz</small>
+            <small locale="update/download/webpackInst">Usually with named as: webpack.tar.gz</small>
             <br><br>
             <br><br>
-            <button class="ui red button updateBtn" onclick="updateViaURL();"><i class="cloud upload icon"></i> Execute Update</button>
-
+            <button class="ui red button updateBtn" onclick="updateViaURL();"><i class="cloud upload icon"></i> <span locale="update/download/execu">Execute Update</span></button>
+  <!-- 
             <div class="ui divider"></div>
             <div class="ui divider"></div>
 
 
-
+          
             <div class="ui message">
             <div class="ui message">
                 <h4><i class="info circle icon"></i>Update Instruction</h4>
                 <h4><i class="info circle icon"></i>Update Instruction</h4>
                 <p>To update your ArozOS system, you will need two files: A compiled binary of the newer version of ArozOS and the webpack compress file in .tar.gz format. You can get the two files on Github, private distribution servers or from cluster
                 <p>To update your ArozOS system, you will need two files: A compiled binary of the newer version of ArozOS and the webpack compress file in .tar.gz format. You can get the two files on Github, private distribution servers or from cluster
@@ -173,6 +173,7 @@
                     </div>
                     </div>
                 </div>
                 </div>
             </div>
             </div>
+            -->
         </div>
         </div>
     </div>
     </div>
     <script>
     <script>