Explorar o código

Merge branch 'master' of https://github.com/visuddhinanda/mint

visuddhinanda %!s(int64=5) %!d(string=hai) anos
pai
achega
f1acbd5e3a

+ 8 - 9
app/dict/split.php

@@ -13,12 +13,10 @@ f(word){
 	1. 从单词尾部切去一个字母
 	2. lookup first part . 
 	2. 查询剩余部分
-	if successful 
+	if confidence value>0.8 
 	如果有结果
-		- get the confidence index of first part
+		- get the confidence value 
 		获取该部分的信心指数
-		- to pull first part and confidence in stack
-		把第一部分的拼写及其信心指数压入堆栈
 		- process the remaining part at same way
 		用同样的方法处理剩余部分
 		- f(stack.first element)
@@ -103,7 +101,7 @@ $path[]=array("",0);
 $path[]=array("",0);
 
 	global $sandhi ;
-	//sandhi table 语尾表
+	//sandhi rules table 语尾表
 	$sandhi[]=array("a"=>"","b"=>"","c"=>"","len"=>0,"adj_len"=>0,"advance"=>false);
 	$sandhi[]=array("a"=>"a","b"=>"a","c"=>"ā","len"=>1,"adj_len"=>0,"advance"=>false);
 	$sandhi[]=array("a"=>"ā","b"=>"ā","c"=>"ā","len"=>1,"adj_len"=>0,"advance"=>false);
@@ -143,7 +141,8 @@ $path[]=array("",0);
 	$sandhi[]=array("a"=>"iti","b"=>"a","c"=>"icca","len"=>4,"adj_len"=>0,"advance"=>false);
 
 /*
-other sandhi rule. can be use but program must be slow
+other sandhi rule. can be use but program will be slow down
+其他连音规则,如果使用则会让程序运行变慢
 
 $sandhi[]=array("a"=>"u[ūnaṃ]","b"=>"a","c"=>"ūnama","len"=>5,"adj_len"=>0,"advance"=>false);
 $sandhi[]=array("a"=>"ī[īnaṃ]","b"=>"a","c"=>"īnama","len"=>5,"adj_len"=>0,"advance"=>false);
@@ -192,7 +191,7 @@ $sandhi[]=array("a"=>"ṃ","b"=>"api","c"=>"mpi","len"=>3,"adj_len"=>0);
 	//$sandhi[]=array("a"=>"ī","b"=>"","c"=>"i","len"=>1,"adj_len"=>0,"advance"=>true);
 
 
-//diphthong table
+//diphthong table双元音表
 $search  = array('aa', 'ae', 'ai', 'ao', 'au', 'aā', 'aī', 'aū', 'ea', 'ee', 'ei', 'eo', 'eu', 'eā', 'eī', 'eū', 'ia', 'ie', 'ii', 'io', 'iu', 'iā', 'iī', 'iū', 'oa', 'oe', 'oi', 'oo', 'ou', 'oā', 'oī', 'oū', 'ua', 'ue', 'ui', 'uo', 'uu', 'uā', 'uī', 'uū', 'āa', 'āe', 'āi', 'āo', 'āu', 'āā', 'āī', 'āū', 'īa', 'īe', 'īi', 'īo', 'īu', 'īā', 'īī', 'īū', 'ūa', 'ūe', 'ūi', 'ūo', 'ūu', 'ūā', 'ūī', 'ūū');
 $replace = array('a-a', 'a-e', 'a-i', 'a-o', 'a-u', 'a-ā', 'a-ī', 'a-ū', 'e-a', 'e-e', 'e-i', 'e-o', 'e-u', 'e-ā', 'e-ī', 'e-ū', 'i-a', 'i-e', 'i-i', 'i-o', 'i-u', 'i-ā', 'i-ī', 'i-ū', 'o-a', 'o-e', 'o-i', 'o-o', 'o-u', 'o-ā', 'o-ī', 'o-ū', 'u-a', 'u-e', 'u-i', 'u-o', 'u-u', 'u-ā', 'u-ī', 'u-ū', 'ā-a', 'ā-e', 'ā-i', 'ā-o', 'ā-u', 'ā-ā', 'ā-ī', 'ā-ū', 'ī-a', 'ī-e', 'ī-i', 'ī-o', 'ī-u', 'ī-ā', 'ī-ī', 'ī-ū', 'ū-a', 'ū-e', 'ū-i', 'ū-o', 'ū-u', 'ū-ā', 'ū-ī', 'ū-ū');
 
@@ -346,7 +345,7 @@ function isExsit($word,$adj_len=0){
 			
 		}
 	} 
-
+//fomular of confidence value 信心值计算公式
 	if($isFound)
 	{
 		if(isset($confidence["{$word}"])){
@@ -372,7 +371,7 @@ function isExsit($word,$adj_len=0){
 /*
 核心拆分函数
 
-$strWord, 要查询的词
+$strWord, word to be look up 要查询的词
 $deep, 当前递归深度
 $express=true, 快速查询
 $adj_len=0 长度校正系数

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

@@ -563,6 +563,7 @@
 		"timezone": "Timezone",
 		"subfield": "subfield",
 		"local": "Local",
+		"form_sent": "Form sentences with the words given & copy to clipboard",
 		"": ""
 	},
 	"grammastr": [

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

@@ -562,6 +562,7 @@
 		"timezone": "Timezone",
 		"subfield": "subfield",
 		"local": "Local",
+		"form_sent": "Form sentences with the words given & copy to clipboard",
 		"": ""
 	},
 	"grammastr": [

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

@@ -562,6 +562,7 @@
 		"timezone": "Timezone",
 		"subfield": "subfield",
 		"local": "Local",
+		"form_sent": "Form sentences with the words given & copy to clipboard",
 		"": "",
 		"": ""
 	},

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

@@ -567,6 +567,7 @@
 		"timezone": "Timezone",
 		"subfield": "subfield",
 		"local": "Local",
+		"form_sent": "Form sentences with the words given & copy to clipboard",
 		"": "",
 		"": ""
 	},

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

@@ -564,6 +564,7 @@
 		"timezone": "时区",
 		"subfield": "分栏",
 		"local": "本地",
+		"form_sent": "连词成句到剪切板",
 		"": ""
 	},
 	"grammastr": [

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

@@ -564,6 +564,7 @@
 		"timezone": "時區",
 		"subfield": "分欄",
 		"local": "本地",
+		"form_sent": "連詞成句到剪下板",
 		"": ""
 	},
 	"grammastr": [

+ 5 - 3
app/studio/index_tool_bar.php

@@ -135,9 +135,11 @@
 		<!-- tool bar begin-->
 		<div class='index_toolbar'>
 			<div id="index_nav">
-			<svg class="icon" style="height: 3em;width: 15em;padding-top: 3px;">
-				<use xlink:href="../public/images/svg/wikipali_banner.svg#wikipali_banner"></use>
-			</svg>
+			<a href="../pcdl">
+				<svg class="icon" style="height: 3em;width: 15em;padding-top: 3px;">
+					<use xlink:href="../public/images/svg/wikipali_banner.svg#wikipali_banner"></use>
+				</svg>
+			</a>
 			</div>
 			<div >
 					<div>

+ 4 - 4
app/studio/js/render.js

@@ -1224,7 +1224,7 @@ function render_sent_tool_bar(elementBlock, begin) {
 	//拷贝词意到剪贴板
 	output +=
 		"<button class='icon_btn' title='" +
-		"copy meaning" +
+		gLocal.gui.form_sent +
 		"' class='rel_map' onclick=\"sent_copy_meaning('" +
 		abook +
 		"','" +
@@ -1234,7 +1234,7 @@ function render_sent_tool_bar(elementBlock, begin) {
 		"','" +
 		iEnd +
 		"')\">" +
-		'<svg style="transform: rotate(-90deg); fill: var(--link-color);" t="1601482033694" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18290"><path d="M903.3 650.8H791.9V511.3H540.5V399.9h167.7c30.9 0 55.9-25.5 55.9-56.4V120.3c0-31.3-25.1-56.4-55.9-56.4H316.4c-30.9 0-55.5 25.1-55.5 56.4 0 0 0 222.8-0.4 223.2 0 31.3 25.1 56.4 55.9 56.4h168.2v111.4H232.8v139.6H120.9c-30.9-0.1-55.9 25-55.9 55.9v196.4c0 30.4 25.1 55.5 55.9 55.9h279.6c30.9 0 55.9-25.1 55.9-55.9V706.8c0-30.9-25.1-55.9-55.9-55.9H288.7v-83.7H736v83.7H624.2c-30.9 0-55.9 25.1-55.9 55.9v196.4c0 30.9 25.1 55.9 55.9 55.9h279.1c30.9 0 55.9-25.1 55.9-55.9V706.8c0-30.9-25-56-55.9-56z" p-id="18291"></path></svg>' +
+		'<svg style="fill: var(--link-color);" t="1611985739555" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6173" width="200" height="200"><path d="M423.198 640a83.84 83.84 0 0 1-64-28.8 259.84 259.84 0 0 1-26.88-308.48L441.118 128a261.12 261.12 0 1 1 448 272l-35.2 57.6a83.84 83.84 0 1 1-145.92-90.24l35.2-57.6a92.8 92.8 0 0 0-158.72-96.64l-107.52 176.64a92.8 92.8 0 0 0 9.6 109.44 83.84 83.84 0 0 1-64 139.52z" p-id="6174"></path><path d="M357.918 1024a261.12 261.12 0 0 1-222.72-397.44l31.36-50.56a83.84 83.84 0 1 1 144 87.68l-31.36 51.2a92.8 92.8 0 0 0 30.72 128 91.52 91.52 0 0 0 70.4 10.88 92.16 92.16 0 0 0 57.6-41.6l107.52-177.92a93.44 93.44 0 0 0-6.4-105.6 83.84 83.84 0 1 1 134.4-103.68 262.4 262.4 0 0 1 17.28 296.96L581.278 896a259.84 259.84 0 0 1-163.84 120.32 263.68 263.68 0 0 1-59.52 7.68z" p-id="6175"></path></svg>' +
 		"</button>";
 
 	//功能按钮结束
@@ -1510,7 +1510,7 @@ function renderWordParBlockInner(elementBlock) {
 				//拷贝词意到剪贴板
 				output +=
 					"<button class='icon_btn' title='" +
-					"copy meaning" +
+					gLocal.gui.form_sent +
 					"' class='rel_map' onclick=\"sent_copy_meaning('" +
 					book +
 					"','" +
@@ -1520,7 +1520,7 @@ function renderWordParBlockInner(elementBlock) {
 					"','" +
 					nextEnd +
 					"')\">" +
-					'<svg style="transform: rotate(-90deg); fill: var(--link-color);" t="1601482033694" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18290"><path d="M903.3 650.8H791.9V511.3H540.5V399.9h167.7c30.9 0 55.9-25.5 55.9-56.4V120.3c0-31.3-25.1-56.4-55.9-56.4H316.4c-30.9 0-55.5 25.1-55.5 56.4 0 0 0 222.8-0.4 223.2 0 31.3 25.1 56.4 55.9 56.4h168.2v111.4H232.8v139.6H120.9c-30.9-0.1-55.9 25-55.9 55.9v196.4c0 30.4 25.1 55.5 55.9 55.9h279.6c30.9 0 55.9-25.1 55.9-55.9V706.8c0-30.9-25.1-55.9-55.9-55.9H288.7v-83.7H736v83.7H624.2c-30.9 0-55.9 25.1-55.9 55.9v196.4c0 30.9 25.1 55.9 55.9 55.9h279.1c30.9 0 55.9-25.1 55.9-55.9V706.8c0-30.9-25-56-55.9-56z" p-id="18291"></path></svg>' +
+					'<svg style="fill: var(--link-color);" t="1611985739555" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6173" width="200" height="200"><path d="M423.198 640a83.84 83.84 0 0 1-64-28.8 259.84 259.84 0 0 1-26.88-308.48L441.118 128a261.12 261.12 0 1 1 448 272l-35.2 57.6a83.84 83.84 0 1 1-145.92-90.24l35.2-57.6a92.8 92.8 0 0 0-158.72-96.64l-107.52 176.64a92.8 92.8 0 0 0 9.6 109.44 83.84 83.84 0 0 1-64 139.52z" p-id="6174"></path><path d="M357.918 1024a261.12 261.12 0 0 1-222.72-397.44l31.36-50.56a83.84 83.84 0 1 1 144 87.68l-31.36 51.2a92.8 92.8 0 0 0 30.72 128 91.52 91.52 0 0 0 70.4 10.88 92.16 92.16 0 0 0 57.6-41.6l107.52-177.92a93.44 93.44 0 0 0-6.4-105.6 83.84 83.84 0 1 1 134.4-103.68 262.4 262.4 0 0 1 17.28 296.96L581.278 896a259.84 259.84 0 0 1-163.84 120.32 263.68 263.68 0 0 1-59.52 7.68z" p-id="6175"></path></svg>' +
 					"</button>";
 
 				output += "</div>";