فهرست منبع

多语言multi-language #26

Bhikkhu-Kosalla 5 سال پیش
والد
کامیت
96daa2779e

+ 1 - 1
app/article/add_to_collect_dlg.js

@@ -2,7 +2,7 @@ function add_to_collect_dlg_init() {
   $("[vui='collect-dlg']").each(function () {
     $(this).css("position", "relative");
     $(this).html(
-      "<span class='button_add_to_collect'>添加到文集</span><div class='float_dlg'></div>"
+      "<button class='button_add_to_collect'>" + gLocal.gui.add_to + gLocal.gui.anthology + "</button><div class='float_dlg'></div>"
     );
   });
 

+ 6 - 6
app/article/collect_add_dlg.js

@@ -4,7 +4,7 @@ function collect_add_dlg_init(div) {
   let html = "";
   html += "<div id='collect_add_dlg'>";
   html += "<div >";
-  html += "<div >Collect Title</div>";
+  html += "<div >" + gLocal.gui.anthology + gLocal.gui.title + "</div>";
   html += "<input type='input' id='collect_add_title' />";
   html += "</div>";
   html += "<div>";
@@ -13,15 +13,15 @@ function collect_add_dlg_init(div) {
     "<div style='display:flex;justify-content: space-between;padding-top: 1em;'>";
   html += "<div>";
   html += "<select id='collect_add_dlg_status'>";
-  html += "<option value='1'>私有</option>";
-  html += "<option value='2'>不公开列出</option>";
-  html += "<option value='3'>公开</option>";
+  html += "<option value='1'>" + gLocal.gui.private + "</option>";
+  html += "<option value='2'>" + gLocal.gui.unlisted + "</option>";
+  html += "<option value='3'>" + gLocal.gui.public + "</option>";
   html += "</select>";
 
   html += "</div>";
   html += "<div>";
-  html += "<button onclick='collect_add_cancel()'>Cancel</button>";
-  html += "<button onclick='collect_add_new()'>New</button>";
+  html += "<button onclick='collect_add_cancel()'>" + gLocal.gui.cancel + "</button>";
+  html += "<button onclick='collect_add_new()'>" + gLocal.gui.new + "</button>";
   html += "</div>";
   html += "</div>";
   html += "</div>";

+ 10 - 10
app/article/my_article.js

@@ -26,15 +26,15 @@ function my_article_list() {
               "<div style='flex:2;'>" +
               render_status(iterator.status) +
               "</div>";
-            html += "<div style='flex:1;'>Copy Link</div>";
+            html += "<div style='flex:1;'>" + gLocal.gui.copy_link + "</div>";
             html +=
               "<div style='flex:1;'><a href='../article/my_article_edit.php?id=" +
               iterator.id +
-              "'>Edit</a></div>";
+              "'>" + gLocal.gui.edit + "</a></div>";
             html +=
               "<div style='flex:1;'><a href='../article/?id=" +
               iterator.id +
-              "' target='_blank'>Preview</a></div>";
+              "' target='_blank'>" + gLocal.gui.preview + "</a></div>";
             html += "<div style='flex:1;'>15</div>";
             html += "</div>";
           }
@@ -53,9 +53,9 @@ function render_status(status) {
   status = parseInt(status);
   let html = "";
   let objStatus = [
-    { id: 1, name: "私有", tip: "仅自己可见" },
-    { id: 2, name: "不公开列出", tip: "不能被搜索到,只能通过链接访问" },
-    { id: 3, name: "公开", tip: "所有人均可看到" },
+    { id: 1, name: gLocal.gui.private, tip: gLocal.gui.private_note },
+    { id: 2, name: gLocal.gui.unlisted, tip: gLocal.gui.unlisted_note },
+    { id: 3, name: gLocal.gui.public, tip: gLocal.gui.public_note },
   ];
   html += '<div class="case_dropdown">';
   html += '<input type="hidden" name="status"  value ="' + status + '" />';
@@ -108,8 +108,8 @@ function my_article_edit(id) {
             result.status +
             "'/>";
 
-          html += "<button onclick='article_preview()'>Preview</button>";
-          html += "<input type='checkbox' name='import' />Import Data";
+          html += "<button onclick='article_preview()'>" + gLocal.gui.preview + "</button>";
+          html += "<input type='checkbox' name='import' />" + gLocal.gui.import + gLocal.gui.text;
           html += "</div>";
           html += "<div style='display:flex;'>";
           html += "<div style='flex:4;'>";
@@ -162,7 +162,7 @@ function my_article_save() {
       console.log(result); //打印服务端返回的数据(调试用)
 
       if (result.status == 0) {
-        alert("保存成功");
+        alert(gLocal.gui.saved + gLocal.gui.successful);
       } else {
         alert("error:" + result.message);
       }
@@ -198,7 +198,7 @@ function course_validate_required(field, alerttxt) {
 
 function course_validate_form(thisform) {
   with (thisform) {
-    if (course_validate_required(title, "Title must be filled out!") == false) {
+    if (course_validate_required(title, gLocal.gui.title_necessary + "!") == false) {
       title.focus();
       return false;
     }

+ 3 - 3
app/article/my_article_edit.php

@@ -56,12 +56,12 @@ require_once '../studio/index_head.php';
 	<div class="file_list_block">
 		<div class="tool_bar">
 			<div style="display:flex;">
-				<a href="../article/my_article_index.php">返回</a>
+				<a href="../article/my_article_index.php"><?php echo $_local->gui->back ;?></a>
 				<span id="article_title"></span>
 				<div id="article_collect" vui='collect-dlg' ></div>
 			</div>
 			<div style="display:flex;">
-				<div><a href="../article/index.php?id=<?php echo $_GET["id"];?>" target="_blank">Open in Library</a></div>
+				<div><a href="../article/index.php?id=<?php echo $_GET["id"];?>" target="_blank"><?php echo $_local->gui->scan_in_reader ;?></a></div>
 				<div id="aritcle_status"></div>
 				<span class="icon_btn_div">
 					<span class="icon_btn_tip"></span>
@@ -73,7 +73,7 @@ require_once '../studio/index_head.php';
 				</span>
 				
 				<span class="icon_btn_div">				
-					<span class="icon_btn_tip">回收站</span>
+					<span class="icon_btn_tip"><?php echo $_local->gui->recycle_bin ;?></span>
 					<button id="to_recycle" type="button" class="icon_btn" onclick="article_del()" title=" ">
 						<svg class="icon">
 							<use xlink:href="../studio/svg/icon.svg#ic_delete"></use>

+ 2 - 2
app/article/my_article_index.php

@@ -38,7 +38,7 @@ require_once '../studio/index_head.php';
 	<div class="index_inner " style="margin-left: 18em;margin-top: 5em;">
 		<div class="file_list_block">
 			<div class="tool_bar">
-				<div>作品列表</div>
+				<div><?php echo $_local->gui->text.$_local->gui->list ?></div>
 				<div>
 					<span class="icon_btn_div">
 						<span class="icon_btn_tip"></span>
@@ -51,7 +51,7 @@ require_once '../studio/index_head.php';
 					</span>
 					
 					<span class="icon_btn_div">				
-						<span class="icon_btn_tip">回收站</span>
+						<span class="icon_btn_tip"><?php echo $_local->gui->recycle_bin ;?></span>
 						<button id="to_recycle" type="button" class="icon_btn" onclick="file_del()" title=" ">
 							<svg class="icon">
 								<use xlink:href="../studio/svg/icon.svg#ic_delete"></use>

+ 1 - 1
app/channal/channal.js

@@ -50,7 +50,7 @@ function my_channal_list() {
             html +=
               "<div style='flex:1;'><a href='../channal/my_channal_edit.php?id=" +
               iterator.id +
-              "'>Edit</a></div>";
+              "'>" + gLocal.gui.edit + "</a></div>";
             html += "<div style='flex:1;'>15</div>";
             html += "</div>";
           }

+ 3 - 3
app/channal/my_channal_edit.php

@@ -57,13 +57,13 @@ require_once '../studio/index_head.php';
 	<div class="file_list_block">
 		<div class="tool_bar">
 			<div style="display:flex;">
-				<a href="../channal/my_channal_index.php">返回</a>
+				<a href="../channal/my_channal_index.php"><?php echo $_local->gui->back;?></a>
 				<span id="channal_title"></span>
 			</div>
 			<div style="display:flex;">
 				<div id="aritcle_status"></div>
 				<span class="icon_btn_div">
-					<span class="icon_btn_tip">保存</span>
+					<span class="icon_btn_tip"><?php echo $_local->gui->save;?></span>
 					<button id="edit_save" type="button" class="icon_btn" title=" " onclick="my_channal_save()">
 						<svg class="icon">
 							<use xlink:href="../studio/svg/icon.svg#ic_save"></use>
@@ -72,7 +72,7 @@ require_once '../studio/index_head.php';
 				</span>
 				
 				<span class="icon_btn_div">				
-					<span class="icon_btn_tip">回收站</span>
+					<span class="icon_btn_tip"><?php echo $_local->gui->recycle_bin;?></span>
 					<button id="to_recycle" type="button" class="icon_btn" onclick="channal_del()" title=" ">
 						<svg class="icon">
 							<use xlink:href="../studio/svg/icon.svg#ic_delete"></use>

+ 10 - 1
app/public/lang/default.json

@@ -518,12 +518,21 @@
 		"copied_to_clipboard": "has been copied to clipboard.",
 		"I_know": "Got it!",
 		"text": "DIY text",
-		"anthology": "anthology",
+		"anthology": "anthology ",
 		"channel": "channel & style",
 		"channels": "channels list",
 		"like": "like",
 		"blank": "blank",
 		"vocabulary_list": "words list",
+		"private": "private",
+		"private_note": "No URL for others,Unshown in Subscriber feed, search & related",
+		"unlisted": "unlisted",
+		"unlisted_note": "Can share URL,Unshown in Subscriber feed, search & related",
+		"public": "public",
+		"public_note": "Can share URL,Shows in Subscriber feed, search & related",
+		"copy_link": "copy the Link",
+		"saved": "saved ",
+		"title_necessary": "title is necessary",
 		"": ""
 	},
 	"grammastr": [

+ 10 - 1
app/public/lang/en.json

@@ -517,12 +517,21 @@
 		"copied_to_clipboard": "has been copied to clipboard.",
 		"I_know": "Got it!",
 		"text": "DIY text",
-		"anthology": "anthology",
+		"anthology": "anthology ",
 		"channel": "channel & style",
 		"channels": "channels list",
 		"like": "like",
 		"blank": "blank",
 		"vocabulary_list": "words list",
+		"private": "private",
+		"private_note": "No URL for others,Unshown in Subscriber feed, search & related",
+		"unlisted": "unlisted",
+		"unlisted_note": "Can share URL,Unshown in Subscriber feed, search & related",
+		"public": "public",
+		"public_note": "Can share URL,Shows in Subscriber feed, search & related",
+		"copy_link": "copy the Link",
+		"saved": "saved ",
+		"title_necessary": "title is necessary",
 		"": ""
 	},
 	"grammastr": [

+ 10 - 1
app/public/lang/my.json

@@ -517,12 +517,21 @@
 		"copied_to_clipboard": "has been copied to clipboard.",
 		"I_know": "Got it!",
 		"text": "DIY text",
-		"anthology": "anthology",
+		"anthology": "anthology ",
 		"channel": "channel & style",
 		"channels": "channels list",
 		"like": "like",
 		"blank": "blank",
 		"vocabulary_list": "words list",
+		"private": "private",
+		"private_note": "No URL for others,Unshown in Subscriber feed, search & related",
+		"unlisted": "unlisted",
+		"unlisted_note": "Can share URL,Unshown in Subscriber feed, search & related",
+		"public": "public",
+		"public_note": "Can share URL,Shows in Subscriber feed, search & related",
+		"copy_link": "copy the Link",
+		"saved": "saved ",
+		"title_necessary": "title is necessary",
 		"": "",
 		"": ""
 	},

+ 10 - 1
app/public/lang/si.json

@@ -522,12 +522,21 @@
 		"copied_to_clipboard": "has been copied to clipboard.",
 		"I_know": "Got it!",
 		"text": "DIY text",
-		"anthology": "anthology",
+		"anthology": "anthology ",
 		"channel": "channel & style",
 		"channels": "channels list",
 		"like": "like",
 		"blank": "blank",
 		"vocabulary_list": "words list",
+		"private": "private",
+		"private_note": "No URL for others,Unshown in Subscriber feed, search & related",
+		"unlisted": "unlisted",
+		"unlisted_note": "Can share URL,Unshown in Subscriber feed, search & related",
+		"public": "public",
+		"public_note": "Can share URL,Shows in Subscriber feed, search & related",
+		"copy_link": "copy the Link",
+		"saved": "saved ",
+		"title_necessary": "title is necessary",
 		"": "",
 		"": ""
 	},

+ 11 - 1
app/public/lang/zh-cn.json

@@ -519,12 +519,22 @@
 		"copied_to_clipboard": "已复制到剪切板",
 		"I_know": "我知道了",
 		"text": "著作文章",
-		"anthology": "收藏文集",
+		"anthology": "文集",
 		"channel": "版风管理",
 		"channels": "版风列表",
 		"like": "赞",
 		"blank": "空白",
 		"vocabulary_list": "词汇列表",
+		"private": "私享",
+		"private_note": "仅自己可见,不推订阅,不可搜索",
+		"unlisted": "不公开列出",
+		"unlisted_note": "可通过链接访问,不推订阅,不可搜索",
+		"public": "公开",
+		"public_note": "可通过链接访问,推订阅,可搜索",
+		"copy_link": "复制链接",
+		"saved": "已保存",
+		"title_necessary": "必须填写标题",
+		"": "",
 		"": "",
 		"": "",
 		"": ""

+ 10 - 1
app/public/lang/zh-tw.json

@@ -519,12 +519,21 @@
 		"copied_to_clipboard": "已複製到剪下板",
 		"I_know": "我知道了",
 		"text": "著作文章",
-		"anthology": "收藏文集",
+		"anthology": "文集",
 		"channel": "版風管理",
 		"channels": "版風列表",
 		"like": "贊",
 		"blank": "空白",
 		"vocabulary_list": "詞彙列表",
+		"private": "私享",
+		"private_note": "僅自己可見,不推訂閱,不可搜尋",
+		"unlisted": "不公開列出",
+		"unlisted_note": "可通過連結訪問,不推訂閱,不可搜尋",
+		"public": "公開",
+		"public_note": "可通過連結訪問,推訂閱,可搜尋",
+		"copy_link": "複製連結",
+		"saved": "已儲存",
+		"title_necessary": "必須填寫標題",
 		"": ""
 	},
 	"grammastr": [

+ 1 - 1
app/studio/js/editor.js

@@ -2875,7 +2875,7 @@ function showModifyWin(sWordId) {
 		$("#input_case").val(sCase);
 
 		if (sParentGrammar != "" || sParent2 != "") {
-			document.getElementById("edit_detail_prt_prt").style.display = "flex";
+			document.getElementById("edit_detail_prt_prt").style.display = "block";
 			document.getElementById("svg_parent2").style.transform = "rotate(90deg)";
 		}
 		else {

+ 1 - 1
app/usent/usent_ref.js

@@ -1,5 +1,4 @@
 var _usent_buffer = new Array();
-var now_time = new Date()
 class USentResult {
   constructor(filter = {}) {
     this.filter = filter;
@@ -137,6 +136,7 @@ class USentResult {
             function (data, status) {
               if (status == "success") {
                 let result = JSON.parse(data);
+                let now_time = new Date()
                 console.log(result);
                 for (const iterator of result.update) {
                   $(