Skip to content

Commit

Permalink
Fix mongol: transcription of ꡎꡖꡡ
Browse files Browse the repository at this point in the history
  • Loading branch information
untunt committed Nov 25, 2023
1 parent 14ce9b4 commit b4b5a19
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions mongol.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ if (!音韻地位) return [...[
'◌\u0332 橫線(U+0332)',
'◌\u035F 雙長音符(U+035F)',
] : null], // 原文爲整個音節加下劃線
], ...(選項?.顯示 === 'unt 2023 擬音 ⭐' ? [] : [
], ...(選項?.顯示?.includes(' 擬音') ? [] : [
'',
['兩字母韻拼寫相同時加後綴區分', true],
...(選項?.兩字母韻拼寫相同時加後綴區分 ?? true ? [
Expand Down Expand Up @@ -426,22 +426,21 @@ function 八思巴字to轉寫(str) {
};

const 後處理替換列表字典 = {
'照那斯圖 1987 轉寫 ⭐': [['ėa', 'ė']].concat(
'照那斯圖 1987 轉寫 ⭐': [['ėa', 'ė'], ['bꞏo', 'boꞏo']].concat(
選項['ꡠ、ꡦ 的轉寫'] === 'ꡠė ꡦe(八思巴字蒙古語風格)' ? [['ė', 'E'], ['e', 'ė'], ['E', 'e'],] : []
),
'吉池孝一 2005 轉寫': [
[/(?<=[fšhy])1/g, 選項.聲母附加數字?.split(' ')[0][0]],
[/(?<=[fšhy])2/g, 選項.聲母附加數字?.split(' ')[1][0]]
[/(?<=[fšhy])2/g, 選項.聲母附加數字?.split(' ')[1][0]],
],
'Coblin 2007 轉寫': [[//, 'h']],
'Coblin 2007 轉寫': [[//, 'h'], ["b'o", "ba'o"]],
'Coblin 2007 擬音': [
[/ʋ$/, 'w'],
[//, 'x'], ['ʰa', 'A'], ['ʰi', 'ə'], [/(?<=s|z)ə$/, 'ɿ'], [/ə$/, 'ʅ'],
['ÿaŋ', 'jaŋ'], ['ÿa', 'jɛ'], ['ÿ', 'j'], ['jj', 'j'],
['juŋ', 'yuŋ'], ['ju', 'y'], ['jɔ', 'yɔ'], [/jwj|jw|wj/, 'y'],
[/^y/, 'jy'],
['uɛ', 'uɛ̌'],
['paʔɔ', 'paw'],
],
'沈鐘偉 2008/2015 轉寫兼擬音': [
[/ɦj(?=w?ɛ)/, 'ɦ'],
Expand All @@ -453,14 +452,13 @@ function 八思巴字to轉寫(str) {
[/ʋ$/, 'w'],
[/(?<=u|y)e/, 'j'],
['\u0332', 選項.零聲母陽調下加?.slice(1, 2)],
['p0o', 'pa0o'],
],
'unt 2023 轉寫 ⭐': [['Ea', 'e'], ['Ee', 'ee'], ['E', '']],
};

// 無元音字母時,補上一個 a
if (str === 'ꡎꡖꡡ') {
str = 'ꡎaꡖꡡ';
} else if (![...'ꡞꡟꡠꡡ'].some(元音 => (str.includes(元音)))) {
if (![...'ꡞꡟꡠꡡ'].some(元音 => (str.includes(元音)))) {
if (str.length > 1 && 'ꡏꡋꡃꡭꡓ'.includes(str.slice(-1))) {
// 有韻尾則 a 補在韻尾前
str = str.slice(0, -1) + 'a' + str.slice(-1);
Expand Down

0 comments on commit b4b5a19

Please sign in to comment.