diff --git a/conj.js b/conj.js index fb5a6f9..e7c5b0a 100644 --- a/conj.js +++ b/conj.js @@ -34,8 +34,8 @@ function emptyString(str) { var isReallyEmpty = (str == ""); return isReallyEmpty || isContainedSpace; } -original.addEventListener('keypress', generateConjMain); -conjStem.addEventListener('keypress', generateConjMain); +original.addEventListener('keyup', generateConjMain); +conjStem.addEventListener('keyup', generateConjMain); original.addEventListener('change', generateConjMain); conjStem.addEventListener('change', generateConjMain); startConj.addEventListener('click', generateConjMain); @@ -244,6 +244,10 @@ function generateConj(orig_txt, stem_txt, conj_no) { var currentSuffix = suffixTable[currentSuffixTableKey][j]; if (currentSuffix != null) { item.innerHTML = stem_txt + currentSuffix; + // remove duplicated t + if (stem_txt.match(/.*[tT]$/) && currentSuffix[0] == 't') { + item.innerHTML = stem_txt + currentSuffix.substring(1); + } } } } diff --git a/conj.ts b/conj.ts index db3ee0a..44c6ee4 100644 --- a/conj.ts +++ b/conj.ts @@ -40,8 +40,8 @@ function emptyString(str : string){ } -original.addEventListener('keypress', generateConjMain); -conjStem.addEventListener('keypress', generateConjMain); +original.addEventListener('keyup', generateConjMain); +conjStem.addEventListener('keyup', generateConjMain); original.addEventListener('change', generateConjMain); conjStem.addEventListener('change', generateConjMain); startConj.addEventListener('click', generateConjMain); @@ -57,7 +57,8 @@ function generateConjMain(event : any){ conjstem_text = original_text; }; generateConj(original_text, conjstem_text, conj_no); -}} + } +} function checkedIfBroadEnd(str_array : string[]){ for (var i = str_array.length - 1; i >=0; i--){ @@ -302,6 +303,10 @@ function generateConj(orig_txt : string, stem_txt : string, conj_no : Number){ if (currentSuffix != null) { item.innerHTML = stem_txt + currentSuffix; + // remove duplicated t + if (stem_txt.match(/.*[tT]$/) && currentSuffix[0] == 't'){ + item.innerHTML = stem_txt + currentSuffix.substring(1); + } } } diff --git a/index.html b/index.html index c4dfeb0..c06e024 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@

愛爾蘭語動詞變化產生器

Gineadóir Réimniú na Gaeilge

- version 20210112(Github repo
+ version 20210113(Github repo

詞彙原形:
@@ -196,7 +196,7 @@

註:

  1. 以上動詞變化以凱里 (Ciarraí) 和科克 (Corcaigh) 的芒斯特方言 (Gaelainn na Mumhan, Munster Irish) 為準。參考資料:Cork Irishreimnigh.com
  2. + href="http://corkirish.wordpress.com/">Cork Irish、reimnigh.com
  3. 此表不含動名詞和過去分詞
  4. 前面接 do/d',接 do/d' 時動詞要軟音化 (seimhiıú, lenition)(無人稱除外)。d' 接在母音和 fh(軟音化後)前面;do 接在子音前面。
  5. 前接連接詞 dá 時,動詞要暗音化 (urú, eclipsis)。