From 65bfc8ed4e1c3d5507c15e7cf605467a2377328c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E3=80=87=E4=B8=83=E4=BA=94=E5=85=AB=E4=B8=83?= <146841109+307587@users.noreply.github.com> Date: Thu, 10 Oct 2024 11:14:21 +0000 Subject: [PATCH 01/11] =?UTF-8?q?Update=20consts.ts=EF=BC=9A=E9=80=99?= =?UTF-8?q?=E4=BA=9B=E5=B0=B1=E6=98=AF=E6=88=91=E8=AA=AA=E7=9A=84=E5=9C=A8?= =?UTF-8?q?=E7=99=BD=E8=A1=A8=E5=8A=A0=E6=9B=B4=E5=A4=9A=E5=85=A7=E5=AE=B9?= =?UTF-8?q?=EF=BC=8C#58?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/consts.ts | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/consts.ts b/src/consts.ts index b8ac95a..bdf0768 100644 --- a/src/consts.ts +++ b/src/consts.ts @@ -19,10 +19,34 @@ const is = (...x) => 音韻地位.屬於(...x); /** @type { 音韻地位["判斷"] } */ const when = (...x) => 音韻地位.判斷(...x); -if (!音韻地位) return [ - // 在此輸入方案選項…… +if (!音韻地位) return [ // 在此輸入方案選項。以下提供一些範本 + ['選項代號(非必要)|選項名\n新行描述(非必要)\n可以加入更多行', [2, '選項1', '選項2']], + ['是非題,是非皆可作預設選項', false], ]; +function 聲母規則() { // 在此輸入聲母推導規則 + return when([ + ['幫母', '幫母讀音'], + ], '無聲母規則'); +} + +function 聲母規則() { + return when([ + + ], '無韻母規則'); +} + +function 聲調規則() { + return when([ + + ], '無聲調規則'); +} + +let 聲母 = 聲母規則(); +let 韻母 = 韻母規則(); +let 聲調 = 聲調規則(); + +return 聲母 + 韻母 + 聲調; `.trimStart(); export const defaultArticle = From d691e41bb193bafe3d19b8f0c81d5c24a58721ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E3=80=87=E4=B8=83=E4=BA=94=E5=85=AB=E4=B8=83?= <146841109+307587@users.noreply.github.com> Date: Sun, 8 Dec 2024 03:17:59 +0000 Subject: [PATCH 02/11] Update consts.ts --- src/consts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/consts.ts b/src/consts.ts index bdf0768..10ec771 100644 --- a/src/consts.ts +++ b/src/consts.ts @@ -19,7 +19,7 @@ const is = (...x) => 音韻地位.屬於(...x); /** @type { 音韻地位["判斷"] } */ const when = (...x) => 音韻地位.判斷(...x); -if (!音韻地位) return [ // 在此輸入方案選項。以下提供一些範本 +if (!音韻地位) return [ // 在此輸入方案選項。以下提供一些範本,方案設定格式:https://github.com/nk2028/tshet-uinh-deriver-tools/wiki/%E6%8E%A8%E5%B0%8E%E6%96%B9%E6%A1%88%E8%A8%AD%E5%AE%9A%E9%A0%85%E5%88%97%E8%A1%A8%E6%A0%BC%E5%BC%8F ['選項代號(非必要)|選項名\n新行描述(非必要)\n可以加入更多行', [2, '選項1', '選項2']], ['是非題,是非皆可作預設選項', false], ]; From 570e799449d4b34e3cc58b09cc5a6422ef90c3d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E3=80=87=E4=B8=83=E4=BA=94=E5=85=AB=E4=B8=83?= <146841109+307587@users.noreply.github.com> Date: Sun, 8 Dec 2024 03:20:34 +0000 Subject: [PATCH 03/11] Update consts.ts --- src/consts.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/consts.ts b/src/consts.ts index 10ec771..21d4d11 100644 --- a/src/consts.ts +++ b/src/consts.ts @@ -19,14 +19,14 @@ const is = (...x) => 音韻地位.屬於(...x); /** @type { 音韻地位["判斷"] } */ const when = (...x) => 音韻地位.判斷(...x); -if (!音韻地位) return [ // 在此輸入方案選項。以下提供一些範本,方案設定格式:https://github.com/nk2028/tshet-uinh-deriver-tools/wiki/%E6%8E%A8%E5%B0%8E%E6%96%B9%E6%A1%88%E8%A8%AD%E5%AE%9A%E9%A0%85%E5%88%97%E8%A1%A8%E6%A0%BC%E5%BC%8F - ['選項代號(非必要)|選項名\n新行描述(非必要)\n可以加入更多行', [2, '選項1', '選項2']], - ['是非題,是非皆可作預設選項', false], +if (!音韻地位) return [ // 在此輸入方案選項;以下提供一些範本,方案設定格式:https://github.com/nk2028/tshet-uinh-deriver-tools/wiki/%E6%8E%A8%E5%B0%8E%E6%96%B9%E6%A1%88%E8%A8%AD%E5%AE%9A%E9%A0%85%E5%88%97%E8%A1%A8%E6%A0%BC%E5%BC%8F + //['選項代號(非必要)|選項名\n新行描述(非必要)\n可以加入更多行', [2, '選項1', '選項2']], + //['是非題,是非皆可作預設選項', false], ]; function 聲母規則() { // 在此輸入聲母推導規則 return when([ - ['幫母', '幫母讀音'], + //例:['幫母', '幫母讀音'], ], '無聲母規則'); } From 29eeb9a83f4a0ac1df9ce24c91fe1d1fd9132436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E3=80=87=E4=B8=83=E4=BA=94=E5=85=AB=E4=B8=83?= <146841109+307587@users.noreply.github.com> Date: Sun, 8 Dec 2024 11:41:16 +0000 Subject: [PATCH 04/11] Update consts.ts --- src/consts.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/consts.ts b/src/consts.ts index 21d4d11..11ee54d 100644 --- a/src/consts.ts +++ b/src/consts.ts @@ -46,6 +46,12 @@ let 聲母 = 聲母規則(); let 韻母 = 韻母規則(); let 聲調 = 聲調規則(); +//if (is`入聲`) { //入聲承陽的方言可以用這段 + //if (韻母.endsWith('m')) 韻母 = 韻母.slice(0, -1) + 'p'; + //else if (韻母.endsWith('n')) 韻母 = 韻母.slice(0, -1) + 't'; + //else if (韻母.endsWith('ŋ')) 韻母 = 韻母.slice(0, -1) + 'k'; +//} + return 聲母 + 韻母 + 聲調; `.trimStart(); From 948a48820f81dc2905c4162cb30ded5eaa8e2878 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E3=80=87=E4=B8=83=E4=BA=94=E5=85=AB=E4=B8=83?= <146841109+307587@users.noreply.github.com> Date: Mon, 9 Dec 2024 05:09:28 +0000 Subject: [PATCH 05/11] Update consts.ts closes #57 --- src/consts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/consts.ts b/src/consts.ts index 11ee54d..cbb80ea 100644 --- a/src/consts.ts +++ b/src/consts.ts @@ -52,7 +52,7 @@ let 聲調 = 聲調規則(); //else if (韻母.endsWith('ŋ')) 韻母 = 韻母.slice(0, -1) + 'k'; //} -return 聲母 + 韻母 + 聲調; +return 聲母 + 韻母 + 聲調; //想只要音韻地位的話可以改成「return 音韻地位」 `.trimStart(); export const defaultArticle = From c0d5ffbe9ec6afda3f1f492756194e8c74cfb373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E3=80=87=E4=B8=83=E4=BA=94=E5=85=AB=E4=B8=83?= <146841109+307587@users.noreply.github.com> Date: Sun, 15 Dec 2024 15:48:48 +0000 Subject: [PATCH 06/11] Update src/consts.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sêkai Zhou --- src/consts.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/consts.ts b/src/consts.ts index cbb80ea..a1ac899 100644 --- a/src/consts.ts +++ b/src/consts.ts @@ -19,7 +19,8 @@ const is = (...x) => 音韻地位.屬於(...x); /** @type { 音韻地位["判斷"] } */ const when = (...x) => 音韻地位.判斷(...x); -if (!音韻地位) return [ // 在此輸入方案選項;以下提供一些範本,方案設定格式:https://github.com/nk2028/tshet-uinh-deriver-tools/wiki/%E6%8E%A8%E5%B0%8E%E6%96%B9%E6%A1%88%E8%A8%AD%E5%AE%9A%E9%A0%85%E5%88%97%E8%A1%A8%E6%A0%BC%E5%BC%8F +if (!音韻地位) return [ + // 在此輸入方案選項;以下提供一些範本,方案設定格式:https://github.com/nk2028/tshet-uinh-deriver-tools/wiki/%E6%8E%A8%E5%B0%8E%E6%96%B9%E6%A1%88%E8%A8%AD%E5%AE%9A%E9%A0%85%E5%88%97%E8%A1%A8%E6%A0%BC%E5%BC%8F //['選項代號(非必要)|選項名\n新行描述(非必要)\n可以加入更多行', [2, '選項1', '選項2']], //['是非題,是非皆可作預設選項', false], ]; From 172cf77e7e834969a0fd8c63b9a16b2d68fda463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E3=80=87=E4=B8=83=E4=BA=94=E5=85=AB=E4=B8=83?= <146841109+307587@users.noreply.github.com> Date: Sun, 15 Dec 2024 15:49:30 +0000 Subject: [PATCH 07/11] Update src/consts.ts Co-authored-by: graphemecluster --- src/consts.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/consts.ts b/src/consts.ts index a1ac899..13c3b9c 100644 --- a/src/consts.ts +++ b/src/consts.ts @@ -22,7 +22,8 @@ const when = (...x) => 音韻地位.判斷(...x); if (!音韻地位) return [ // 在此輸入方案選項;以下提供一些範本,方案設定格式:https://github.com/nk2028/tshet-uinh-deriver-tools/wiki/%E6%8E%A8%E5%B0%8E%E6%96%B9%E6%A1%88%E8%A8%AD%E5%AE%9A%E9%A0%85%E5%88%97%E8%A1%A8%E6%A0%BC%E5%BC%8F //['選項代號(非必要)|選項名\n新行描述(非必要)\n可以加入更多行', [2, '選項1', '選項2']], - //['是非題,是非皆可作預設選項', false], + [`核取方塊選項 + 預設值須為勾選(true)或不勾選(false)之一`, false], ]; function 聲母規則() { // 在此輸入聲母推導規則 From adeb4c72430643d639cbe3874ca2a47e6692a0d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E3=80=87=E4=B8=83=E4=BA=94=E5=85=AB=E4=B8=83?= <146841109+307587@users.noreply.github.com> Date: Sun, 15 Dec 2024 15:51:05 +0000 Subject: [PATCH 08/11] Update src/consts.ts Co-authored-by: graphemecluster --- src/consts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/consts.ts b/src/consts.ts index 13c3b9c..a2c49df 100644 --- a/src/consts.ts +++ b/src/consts.ts @@ -28,7 +28,7 @@ if (!音韻地位) return [ function 聲母規則() { // 在此輸入聲母推導規則 return when([ - //例:['幫母', '幫母讀音'], + // ['幫母', '幫母讀音'], ], '無聲母規則'); } From c717ad7c954b08bfdf6428766c2d7caf93de9730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E3=80=87=E4=B8=83=E4=BA=94=E5=85=AB=E4=B8=83?= <146841109+307587@users.noreply.github.com> Date: Sun, 15 Dec 2024 15:51:54 +0000 Subject: [PATCH 09/11] Update src/consts.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sêkai Zhou --- src/consts.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/consts.ts b/src/consts.ts index a2c49df..2f2090d 100644 --- a/src/consts.ts +++ b/src/consts.ts @@ -48,13 +48,13 @@ let 聲母 = 聲母規則(); let 韻母 = 韻母規則(); let 聲調 = 聲調規則(); -//if (is`入聲`) { //入聲承陽的方言可以用這段 +//if (is`入聲`) { //if (韻母.endsWith('m')) 韻母 = 韻母.slice(0, -1) + 'p'; //else if (韻母.endsWith('n')) 韻母 = 韻母.slice(0, -1) + 't'; //else if (韻母.endsWith('ŋ')) 韻母 = 韻母.slice(0, -1) + 'k'; //} -return 聲母 + 韻母 + 聲調; //想只要音韻地位的話可以改成「return 音韻地位」 +return 聲母 + 韻母 + 聲調; `.trimStart(); export const defaultArticle = From 0c73a9a1d4cd1c3cc4f812cf388665ed1f5cd0e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E3=80=87=E4=B8=83=E4=BA=94=E5=85=AB=E4=B8=83?= <146841109+307587@users.noreply.github.com> Date: Sun, 15 Dec 2024 15:53:24 +0000 Subject: [PATCH 10/11] Update src/consts.ts Co-authored-by: graphemecluster --- src/consts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/consts.ts b/src/consts.ts index 2f2090d..2c9c424 100644 --- a/src/consts.ts +++ b/src/consts.ts @@ -26,7 +26,7 @@ if (!音韻地位) return [ 預設值須為勾選(true)或不勾選(false)之一`, false], ]; -function 聲母規則() { // 在此輸入聲母推導規則 +function 聲母規則() { return when([ // ['幫母', '幫母讀音'], ], '無聲母規則'); From f0bf005e728e07eca003a3cdfcc341d80449c8b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E3=80=87=E4=B8=83=E4=BA=94=E5=85=AB=E4=B8=83?= <146841109+307587@users.noreply.github.com> Date: Sun, 15 Dec 2024 15:55:07 +0000 Subject: [PATCH 11/11] Update src/consts.ts Co-authored-by: graphemecluster --- src/consts.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/consts.ts b/src/consts.ts index 2c9c424..5be2387 100644 --- a/src/consts.ts +++ b/src/consts.ts @@ -21,7 +21,12 @@ const when = (...x) => 音韻地位.判斷(...x); if (!音韻地位) return [ // 在此輸入方案選項;以下提供一些範本,方案設定格式:https://github.com/nk2028/tshet-uinh-deriver-tools/wiki/%E6%8E%A8%E5%B0%8E%E6%96%B9%E6%A1%88%E8%A8%AD%E5%AE%9A%E9%A0%85%E5%88%97%E8%A1%A8%E6%A0%BC%E5%BC%8F - //['選項代號(非必要)|選項名\n新行描述(非必要)\n可以加入更多行', [2, '選項1', '選項2']], + [`程式中使用的選項名稱(選擇性)|顯示的選項名稱 + 換行後為選項描述(選擇性) + 可以加入更多行`, + [2, '選項1', '選項2'], + // ^ 表示預設值 + ], [`核取方塊選項 預設值須為勾選(true)或不勾選(false)之一`, false], ];