Browse Source

多语言

Bhikkhu-Kosalla 5 years ago
parent
commit
3cbdb0cb8a

+ 57 - 56
app/collect/index.js

@@ -1,61 +1,62 @@
 function collect_load(begin = 0) {
-    $.get(
-        "list.php", {
-            begin: begin,
-        },
-        function(data, status) {
-            let arrCollectList = JSON.parse(data);
-            let html = "";
-            for (const iterator of arrCollectList.data) {
+	$.get(
+		"list.php",
+		{
+			begin: begin,
+		},
+		function (data, status) {
+			let arrCollectList = JSON.parse(data);
+			let html = "";
+			for (const iterator of arrCollectList.data) {
+				html += "<div class='card collect_card'>";
+				html += "<div class='card_state'>" + gLocal.gui.ongoing + "</div>";
+				html += "<div class='card_info'>"; //卡片信息开始
+				html += "<div class='collect_title'>";
+				html += "<a href='../article/?collect=" + iterator.id + "'>" + iterator.title + "</a>";
+				html += "</div>";
 
-                html += "<div class='card collect_card'>";
-                html +=
-                    "<div class='card_state'>" +
-                    gLocal.gui.ongoing +
-                    "</div>";
-                html += "<div class='card_info'>"; //卡片信息开始
-                html += "<div class='collect_title'>";
-                html += "<a href='../article/?collect=" + iterator.id + "'>" + iterator.title + "</a>";
-                html += "</div>";
+				if (iterator.subtitle && iterator.subtitle != "null") {
+					html += "<div class='subtitle'>" + iterator.subtitle + "</div>";
+				}
+				if (iterator.summary && iterator.summary != "null") {
+					html += "<div class='summary'>" + iterator.summary + "</div>";
+				}
+				if (iterator.tag) {
+					html += "<div style='overflow-wrap: anywhere;'>" + iterator.tag + "</div>";
+				}
+				html += "<div style='margin-top:10px'>" + iterator.username.nickname + "</div>";
 
-                if (iterator.subtitle && iterator.subtitle != "null") {
-                    html += "<div class='subtitle'>" + iterator.subtitle + "</div>";
-                }
-                if (iterator.summary && iterator.summary != "null") {
-                    html += "<div class='summary'>" + iterator.summary + "</div>";
-                }
-                if (iterator.tag) {
-                    html += "<div style='overflow-wrap: anywhere;'>" + iterator.tag + "</div>";
-                }
-                html += "<div style='margin-top:10px'>" + iterator.username.nickname + "</div>";
+				html += "</div>"; //卡片信息关闭
+				const article_limit = 4;
+				let article_count = 0;
+				let article_list = JSON.parse(iterator.article_list);
+				//章节预览链接
+				html += "<div class='article_title_link' >";
 
-                html += "</div>"; //卡片信息关闭
-                const article_limit = 4;
-                let article_count = 0;
-                let article_list = JSON.parse(iterator.article_list);
-                //章节预览链接
-                html += "<div class='article_title_link' >";
+				//!!!!!!請加上不同語言!!!!!
+				html += "<div style='font-weight:700;'>" + gLocal.gui.content + "</div>";
 
-                //!!!!!!請加上不同語言!!!!!
-                html += "<div style='font-weight:700;'>目錄</div>";
-
-                //章節列表
-                html += "<div>";
-                for (const article of article_list) {
-                    html += "<div style='border-top: #707070 1px solid; text-overflow: ellipsis; line-height:2.2em;'>";
-                    html +=
-                        "<a style='color:var(--main_color);font-weight:700;' href='../article/?id=" + article.article + "' target='_blank'>" + article.title + "</a>";
-                    html += "</div>";
-                    article_count++;
-                    if (article_count > article_limit) {
-                        break;
-                    }
-                }
-                html += "</div>"; //章節列表結束
-                html += "</div>"; //章节预览链接结束
-                html += "</div>"; //card内容 结束
-            }
-            $("#book_list").html(html);
-        }
-    );
-}
+				//章節列表
+				html += "<div>";
+				for (const article of article_list) {
+					html += "<div style='border-top: #707070 1px solid; text-overflow: ellipsis; line-height:2.2em;'>";
+					html +=
+						"<a style='color:var(--main_color);font-weight:700;' href='../article/?id=" +
+						article.article +
+						"' target='_blank'>" +
+						article.title +
+						"</a>";
+					html += "</div>";
+					article_count++;
+					if (article_count > article_limit) {
+						break;
+					}
+				}
+				html += "</div>"; //章節列表結束
+				html += "</div>"; //章节预览链接结束
+				html += "</div>"; //card内容 结束
+			}
+			$("#book_list").html(html);
+		}
+	);
+}

+ 8 - 6
app/collect/index.php

@@ -231,9 +231,11 @@ include "../pcdl/html_head.php";
 
     <div class="collect_section">
         <div class="section_inner">
-            <div class="left_content">
+            <div class="left_content">
                 <div style="display:flex;">
-                    <h2 style="margin-right:auto;">文集</h2>
+                    <h2 style="margin-right:auto">
+                        <?php echo $_local->gui->composition;?>
+                    </h2>
                     <div level="7" class="tag_others" style="padding-bottom:5px; margin-right:5px;">
                         <select>
                             <option><?php echo $_local->gui->all; ?></option>
@@ -255,14 +257,14 @@ include "../pcdl/html_head.php";
                 </div>
             </div>
             <div class="right_content">
-                <h2>熱門主題</h2>
+                <h2><?php echo $_local->gui->hot_topic; ?></h2>
                 <div class="disable" style="display:flex; margin:1em 0; flex-wrap:wrap;">
                     <div class="tag">sīla</div>
                     <div class="tag">smādhi</div>
                     <div class="tag">paññā</div>
-                    <div class="tag">本生</div>
-                    <div class="tag">visuddhimaga</div>
-                    <div class="tag">入出息</div>
+                    <div class="tag">jātaka</div>
+                    <div class="tag">visuddhimagga</div>
+                    <div class="tag">ānāpānassati</div>
                 </div>
                 <h2><?php echo $_local->gui->author; ?></h2>
                 <div class="disable" style="margin:1em 0;">

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

@@ -564,6 +564,7 @@
 		"subfield": "subfield",
 		"local": "Local",
 		"form_sent": "Form sentences with the words given & copy to clipboard",
+		"hot_topic": "hot topic",
 		"": ""
 	},
 	"grammastr": [

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

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

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

@@ -563,6 +563,7 @@
 		"subfield": "subfield",
 		"local": "Local",
 		"form_sent": "Form sentences with the words given & copy to clipboard",
+		"hot_topic": "hot topic",
 		"": "",
 		"": ""
 	},

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

@@ -568,6 +568,7 @@
 		"subfield": "subfield",
 		"local": "Local",
 		"form_sent": "Form sentences with the words given & copy to clipboard",
+		"hot_topic": "hot topic",
 		"": "",
 		"": ""
 	},

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

@@ -565,6 +565,7 @@
 		"subfield": "分栏",
 		"local": "本地",
 		"form_sent": "连词成句到剪切板",
+		"hot_topic": "热门主题",
 		"": ""
 	},
 	"grammastr": [

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

@@ -565,6 +565,7 @@
 		"subfield": "分欄",
 		"local": "本地",
 		"form_sent": "連詞成句到剪下板",
+		"hot_topic": "熱門主題",
 		"": ""
 	},
 	"grammastr": [

+ 13 - 86
documents/users_guide/zh-cn/grammar_abbr.md

@@ -1,94 +1,21 @@
 ## 基本操作
-- 通过下拉菜单选择填入语法信息
-- 首先选定类型——带外框的,比如:动词
-- 然后选择后续的内容,比如:三 单 现
-- 以上涉及的**语法缩略语**可以参照下面的表格
-- 调整**语法信息**和**虚词公式**,列举这个词可能的含义
+
+-   通过下拉菜单选择填入语法信息
+-   首先选定类型——带外框的,比如:动词
+-   然后选择后续的内容,比如:三 单 现
+-   以上涉及的**语法缩略语**可以参照下面的表格
+-   调整**语法信息**和**虚词公式**,列举这个词可能的含义
 
 ## 连读词拆分
+
 连读词拆分使用教程 (暂缺)
 
 ## 复合词拆分
+
 复合词拆分使用教程(文本暂缺)
-- [YouTube](https://youtu.be/iN1t0Rq9aKk "按住Ctrl键点开")
-- [优酷](https://v.youku.com/v_show/id_XNDgwOTg4NDQ4MA==.html "按住Ctrl键点开")
-- [百度网盘](https://pan.baidu.com/s/1nXZG2GQkkkfblNnshDuS_w "按住Ctrl键点开")  提取码:pali 
 
-## 语法缩略语表
-| 巴利        | 英           | 中       | 全                          |
-| :---------- | :----------- | :------- | :-------------------------- |
-| na          | nt.          | 中       | neuter                      |
-| pu          | m.           | 阳       | masculine                   |
-| thī         | f.           | 阴       | feminine                    |
-| eka         | u            | 单       | singular                    |
-| bahu        | pl.          | 复       | plural                      |
-| paccatta    | nom.         | 主       | nominative                  |
-| upayoga     | acc.         | 宾       | accusative                  |
-| karaṇa      | inst.        | 具       | instrumental                |
-| sampadāna   | dat.         | 目的     | dative                      |
-| nissakka    | abl.         | 源       | ablative                    |
-| sāmi        | gen.         | 属       | genitive                    |
-| bhumma      | loc.         | 处       | locative                    |
-| āmantana    | voc.         | 呼       | vocative                    |
-| āṇatti      | imp.         | 命令     | imperative                  |
-| parikappa   | cond.        | 条件     | conditional                 |
-| parikappa   | opt.         | 潜       | optative (potential)        |
-| paccuppanna | pres.        | 现       | present tense               |
-| atīta       | aor.         | 过       | past tense                  |
-| anāgata     | fut.         | 将       | future tense                |
-| amha        | 1p.          | 第一     | 1st person                  |
-| tumha       | 2p.          | 第二     | 2nd person                  |
-| ta          | 3p.          | 第三     | 3rd perspm                  |
-|             | Ger.         | 连续     |                             |
-|             | Abs.         | 绝对     | absolutive                  |
-|             | Inf.         | 不定     | infinitive                  |
-|             | prp.         | 现分     | present participle          |
-|             | pp.          | 过分     | past participle             |
-|             | fpp.         | 未被分   | passive future participle   |
-|             | Grd.         | 义务     |                             |
-| nāma        | n.           | 名       | noun                        |
-| kriyā       | v.           | 动       | verb                        |
-| kriyā:bya   | v.ind.       | 动不变   | verb indeclinable           |
-| bya         | ind.         | 不变     | indeclinable                |
-| karaṇattha  | adv.         | 副       | adverb                      |
-| ti          | adj.         | 形       | adjective                   |
-| ti          | n.a.         | 三性     | of the three gender         |
-|             | num.         | 数       | numerals                    |
-|             | pron.        | 代       | pronoun                     |
-|             | v:base.      | 动原型   | verb : root                 |
-|             | n.a:base.    | 三性词干 |                             |
-|             | adj:base.    | 形词干   |                             |
-|             | n:base.      | 名词干   |                             |
-|             | pron:base.   | 代词干   |                             |
-|             | num:base.    | 数词干   | numerals : root             |
-|             | conj.        | 连       | cojunction                  |
-|             | prep.        | 介       | preposition                 |
-|             | interj.      | 感叹     | interjection                |
-| samāsa.     | comp.        | 复合     |                             |
-|             | prefix.      | 前缀     | prefix                      |
-|             | part         | 待定片段 |                             |
-| dhātu       | root.        | 词根     |                             |
-|             | suffix.      | 后缀     |                             |
-| vibhatti    | case end.    | 语尾     |                             |
-| sandhi      | slur.        | 连读     |                             |
-|             | note.        | 原版注释 | note from original article  |
-|             | pf.          | 完成     | perfect tense               |
-|             | act.         | 主动     | active                      |
-|             | prpa.        | 主动现分 | active present participle   |
-|             | prpp.        | 现分     | passive  present participle |
-|             | ppa.         | 主过分   | active past participle      |
-|             | ppp.         | 被过分   | passive  past participle    |
-|             | futp.        | 未分     | future participle           |
-|             | fpa.         | 未主分   | active future participle    |
-|             | Pass.        | 被动     | passive                     |
-|             | Caus.        | 使役     |                             |
-|             | desid.       | 意欲     |                             |
-|             | intens.      | 强意     | intensive                   |
-|             | denom.       | 名动     | demonstrative               |
-|             | pron.per.    | 人代     | personal pronoun            |
-|             | pron.demon.  | 指代     | demonstrative pronoun       |
-|             | pron.rel.    | 关代     | relative pronoun            |
-|             | pron.interr. | 疑代     | interrogative pronoun       |
-|             | pron.indef.  | 不定代   | indefinite pronoun          |
-| attano      | med.         | 返照     |                             |
-| attano      | refl.        | 返照     | reflexive                   |
+-   [YouTube](https://youtu.be/iN1t0Rq9aKk "按住Ctrl键点开")
+-   [优酷](https://v.youku.com/v_show/id_XNDgwOTg4NDQ4MA==.html "按住Ctrl键点开")
+-   [百度网盘](https://pan.baidu.com/s/1nXZG2GQkkkfblNnshDuS_w "按住Ctrl键点开") 提取码:pali
+
+## [巴利语法缩略语表](https://visuddhinanda.gitbook.io/pali-handbook/can-kao-shou-ce/grammar-abbr)