Bhikkhu-Kosalla 5 лет назад
Родитель
Сommit
57f99744cf
5 измененных файлов с 100 добавлено и 92 удалено
  1. 2 2
      app/public/lang/zh-cn.json
  2. 2 2
      app/public/lang/zh-tw.json
  3. 2 2
      app/term/my_dict_list.php
  4. 1 0
      app/term/term.css
  5. 93 86
      app/term/term_edit_dlg.js

+ 2 - 2
app/public/lang/zh-cn.json

@@ -350,7 +350,7 @@
 		"word_selection_apply_to": "单词抉择应用于",
 		"wordmap": "词源树",
 		"wordnum": "文本总量:",
-		"words": "词",
+		"words": "个单词",
 		"wordtype": "单词类型",
 		"workload": "工程评估",
 		"xml_data": "XML 数据",
@@ -520,7 +520,7 @@
 		"I_know": "我知道了",
 		"text": "文章",
 		"anthology": "文集",
-		"channel": "妙笔多多",
+		"channel": "版本风格",
 		"channels": "版本风格列表",
 		"like": "赞",
 		"blank": "空白",

+ 2 - 2
app/public/lang/zh-tw.json

@@ -350,7 +350,7 @@
 		"word_selection_apply_to": "單詞抉擇套用至",
 		"wordmap": "詞源樹",
 		"wordnum": "文字總量:",
-		"words": "詞",
+		"words": "個單詞",
 		"wordtype": "單詞類型",
 		"workload": "工程評估",
 		"xml_data": "XML資料",
@@ -520,7 +520,7 @@
 		"I_know": "我知道了",
 		"text": "著作文章",
 		"anthology": "文集",
-		"channel": "妙筆多多",
+		"channel": "版本風格",
 		"channels": "版本風格列表",
 		"like": "贊",
 		"blank": "空白",

+ 2 - 2
app/term/my_dict_list.php

@@ -33,7 +33,7 @@ require_once '../studio/index_head.php';
 
 		<div class="tool_bar">
 	<div>
-	Term
+        <?php echo $_local->gui->terms_system;?>
 	</div>
 
 	<div>
@@ -87,7 +87,7 @@ if($iCountWords==0){
     echo "<div id='setting_user_dict_count'>您的术语字典中没有单词。</div>";
 }
 else{
-    echo "<div id='setting_user_dict_count'>您的术语字典中已经有{$iCountWords}个单词。</div>";
+    echo "<div id='setting_user_dict_count'>".$_local->gui->my_term."&nbsp;".$_local->gui->include."{$iCountWords}".$_local->gui->words."</div>";
     $iPages=ceil($iCountWords/$iOnePage);
     if($iCurrPage>$iPages){
         $iCurrPage=$iPages;

+ 1 - 0
app/term/term.css

@@ -306,6 +306,7 @@ note .ref {
 	bottom: -1.3em;
 	right: 0;
 	max-width: 100%;
+	right: 1.3em;
 }
 note:hover .ref {
 	/*border-top: solid 1px var(--border-line-color);*/

+ 93 - 86
app/term/term_edit_dlg.js

@@ -1,100 +1,107 @@
-function term_edit_dlg_init(title = "Trem") {
-  $("body").append(
-    '<div id="term_edit_dlg" title="' +
-      title +
-      '"><div id="term_edit_dlg_content"></div></div>'
-  );
+function term_edit_dlg_init(title = gLocal.gui.dict_terms) {
+	$("body").append('<div id="term_edit_dlg" title="' + title + '"><div id="term_edit_dlg_content"></div></div>');
 
-  $("#term_edit_dlg").dialog({
-    autoOpen: false,
-    width: 550,
-    buttons: [
-      {
-        text: "Save",
-        click: function () {
-          term_edit_dlg_save();
-          $(this).dialog("close");
-        },
-      },
-      {
-        text: "Cancel",
-        click: function () {
-          $(this).dialog("close");
-        },
-      },
-    ],
-  });
+	$("#term_edit_dlg").dialog({
+		autoOpen: false,
+		width: 550,
+		buttons: [
+			{
+				text: gLocal.gui.save,
+				click: function () {
+					term_edit_dlg_save();
+					$(this).dialog("close");
+				},
+			},
+			{
+				text: gLocal.gui.cancel,
+				click: function () {
+					$(this).dialog("close");
+				},
+			},
+		],
+	});
 }
 function term_edit_dlg_open(id = "") {
-  if (id == "") {
-    $("#term_edit_dlg").dialog("open");
-  } else {
-    $.post(
-      "../term/term_get_id.php",
-      {
-        id: id,
-      },
-      function (data) {
-        let word = JSON.parse(data);
-        let html = term_edit_dlg_render(word);
-        $("#term_edit_dlg_content").html(html);
-        $("#term_edit_dlg").dialog("open");
-      }
-    );
-  }
+	if (id == "") {
+		$("#term_edit_dlg").dialog("open");
+	} else {
+		$.post(
+			"../term/term_get_id.php",
+			{
+				id: id,
+			},
+			function (data) {
+				let word = JSON.parse(data);
+				let html = term_edit_dlg_render(word);
+				$("#term_edit_dlg_content").html(html);
+				$("#term_edit_dlg").dialog("open");
+			}
+		);
+	}
 }
 
 function term_edit_dlg_render(word = "") {
-  if (word == "") {
-    word = new Object();
-    word.pali = "";
-  }
-  let output = "";
-  output +=
-    "<input type='hidden' id='term_edit_form_id' value='" + word.guid + "'>";
-  output += "<fieldset>";
-  output += "<legend>Spell</legend>";
-  output +=
-    "<input type='input' id='term_edit_form_word' value='" + word.word + "'>";
-  output += "</fieldset>";
+	if (word == "") {
+		word = new Object();
+		word.pali = "";
+	}
+	let output = "";
+	output += "<input type='hidden' id='term_edit_form_id' value='" + word.guid + "'>";
+	output += "<fieldset>";
+	output += "<legend>" + gLocal.gui.spell + "</legend>";
+	output +=
+		"<input type='input' id='term_edit_form_word' value='" +
+		word.word +
+		"'placeholder=" +
+		gLocal.gui.required +
+		">";
+	output += "</fieldset>";
 
-  output += "<fieldset>";
-  output += "<legend>Meaning</legend>";
-  output +=
-    "<input type='input' id='term_edit_form_meaning' value='" +
-    word.meaning +
-    "'>";
-  output += "</fieldset>";
+	output += "<fieldset>";
+	output += "<legend>" + gLocal.gui.first_choice_word + "</legend>";
+	output +=
+		"<input type='input' id='term_edit_form_meaning' value='" +
+		word.meaning +
+		"' placeholder=" +
+		gLocal.gui.required +
+		">";
+	output += "</fieldset>";
 
-  output += "<fieldset>";
-  output += "<legend>Meaning</legend>";
-  output +=
-    "<input type='input' id='term_edit_form_othermeaning value='" +
-    word.other_meaning +
-    "'>";
-  output += "</fieldset>";
+	output += "<fieldset>";
+	output += "<legend>" + gLocal.gui.other_meaning + "</legend>";
+	output +=
+		"<input type='input' id='term_edit_form_othermeaning value='" +
+		word.other_meaning +
+		"' placeholder=" +
+		gLocal.gui.optional +
+		">";
+	output += "</fieldset>";
 
-  output += "<fieldset>";
-  output += "<legend>Language</legend>";
-  output +=
-    "<input type='input' id='term_edit_form_language' value='" +
-    word.language +
-    "'>";
-  output += "</fieldset>";
+	output += "<fieldset>";
+	output += "<legend>" + gLocal.gui.language + "</legend>";
+	output +=
+		"<input type='input' id='term_edit_form_language' value='" +
+		word.language +
+		"' placeholder=" +
+		gLocal.gui.required +
+		" >";
+	output += "</fieldset>";
 
-  output += "<fieldset>";
-  output += "<legend>Channal</legend>";
-  output +=
-    "<input type='input' id='term_edit_form_channal' value='" +
-    word.channal +
-    "'>";
-  output += "</fieldset>";
+	output += "<fieldset>";
+	output += "<legend>" + gLocal.gui.channel + "</legend>";
+	output +=
+		"<input type='input' id='term_edit_form_channal' value='" +
+		word.channal +
+		"' placeholder=" +
+		gLocal.gui.optional +
+		">";
+	output += "</fieldset>";
 
-  output += "<fieldset>";
-  output += "<legend>Note</legend>";
-  output += "<textarea id='term_edit_form_note'>" + word.note + "</textarea>";
-  output += "</fieldset>";
+	output += "<fieldset>";
+	output += "<legend>" + gLocal.gui.encyclopedia + "</legend>";
+	output += "<textarea id='term_edit_form_note' placeholder=" + gLocal.gui.optional + ">" + word.note + "</textarea>";
+	output += "</fieldset>";
 
-  return output;
+	return output;
 }
 function term_edit_dlg_save() {}