Naraguna:Bennylin/trans-toba.js: Béda antara owahan

tanpa ringkesan besutan
****************************/
function GetSound(str) {
var len = 0;
str = SuperTrim(str);
if (str == null || str == "") {
return "";
}
if (str.length == 1) {
return ResolveCharacterSound(str[0]);
} else {
var core_sound = GetCoreSound(str);
//return "1"+core_sound.CoreSound+"2";
var matra = "";
var konsonan = "";
if (core_sound.len >= 1) {
matra = GetMatra(str.substring(core_sound.len));
//aeiou (suku, wulu, pepet, taling, taling tarung, dll.)
/*if () {
} else {
}*/
} else {
matra = "";
}
if (str.indexOf("nggr") == 0) {
//nggr-
if (vowelPrev) konsonan = "ᬂᬕ᭄ᬭ";
//<vowel>nggr-, e.g. panggrahita else konsonan = "ᬗ᭄ᬕ᭄ᬭ";
//<nonvowel>nggr-, i.e. nggronjal
} else if (str.indexOf("ngg") == 0) {
//ngg-
if (vowelPrev) konsonan = "ᬂᬕ";
//<vowel>ngg-, e.g. tunggal else konsonan = "ᬗ᭄ᬕ";
//<nonvowel>ngg-, i.e. nggambar
} else if (str.indexOf("njl") == 0) {
//njl-
konsonan = "ᬜ᭄ᬚ᭄ᬮ";
} else if (str.indexOf("njr") == 0) {
//njr-
konsonan = "ᬜ᭄ᬚ᭄ᬭ";
} else if (str.indexOf("ngg") == 0) {
//njr-
if (vowelPrev) konsonan = "ᬂᬕ";
//<vowel>ngg-, e.g. tunggal else konsonan = "ᬗ᭄ᬕ";
//<nonvowel>ngg-, i.e. nggambar
} else if (core_sound.CoreSound == "ᬦᬜ᭄ᬘ") {
// -nc-
konsonan = "ᬜ᭄ᬘ";
//-nyc-/*
} else if (core_sound.CoreSound == "ᬦᬜ᭄ᬚ᭄ᬮ") {
// -njl-
konsonan = "ᬜ᭄ᬚ᭄ᬮ";
//-njl-
} else if (core_sound.CoreSound == "ᬦᬜ᭄ᬚ") {
// -njr-
konsonan = "ᬜ᭄ᬚ᭄ᬭ";
//-njr-*/
} else if (core_sound.CoreSound == "ᬦᬜ᭄ᬚ") {
// -nj-
konsonan = "ᬜ᭄ᬚ";
//-nyj-
} else if (core_sound.CoreSound == "ᬤᬟ᭄ᬯ") {
// -dhw-
konsonan = "ᬟ᭄ᬯ";
//-dhw-
} else if (core_sound.CoreSound == "ᬤᬟ") {
// -dhy-
konsonan = "ᬟ";
//-dhy-
} else if (core_sound.CoreSound == "ᬢᬝ᭄ᬯ") {
// -thw-
konsonan = "ᬝ᭄ᬯ";
//-dhw-
} else if (core_sound.CoreSound == "ᬢᬝ") {
// -thy-
konsonan = "ᬝ";
//-dhy-
} else if (findstr(core_sound.CoreSound,'') && matra == "᭄") {
// pengkal
konsonan = core_sound.CoreSound;
matra = "";
//-y-
} else if (findstr(core_sound.CoreSound,'') && matra == "᭄") {
// cakra
konsonan = core_sound.CoreSound;
matra = "᭄ᬭ";
//-r-
} else if (findstr(core_sound.CoreSound,'᭄ᬭ') && matra == "ᭂ") {
// cakra keret
if ((str[0] == "n" && str[1] == "y") || ((str[0] == "t" || str[0] == "d") && str[1] == "h")) {
konsonan = GetCoreSound(str[0]+str[1]).CoreSound + "";
matra = "";
//nyrê-, thrê-, dhrê-
} else if (str[0] == "n" && str[1] == "g") {
if (str[2] == "g") konsonan = "ᬗ᭄ᬕ"; else konsonan = "ᬗ";
matra = "";
//nggrê-/ngrê-
} else {
konsonan = GetCoreSound(str[0]).CoreSound + "";
matra = "";
//-rê-
}
} else if (findstr(core_sound.CoreSound, 'ᬮ') && matra == "ᭂ") {
// nga lelet
if ((str[0] == "n" && str[1] == "y") || ((str[0] == "t" || str[0] == "d") && str[1] == "h")) {
konsonan = GetCoreSound(str[0]+str[1]).CoreSound + "᭄ᬮᭂ";
matra = "";
//nylê-, thlê-, dhlê-
} else if (str[0] == "n" && str[1] == "g") {
if (str[2] == "g") konsonan = "ᬗ᭄ᬕ᭄ᬮᭂ"; else konsonan = "ᬗ᭄ᬮᭂ";
matra = "";
//ngglê-/nglê-
} else if (str[0] == "l") {
konsonan = "ᬍ";
matra = "";
//-lê-
} else {
konsonan = GetCoreSound(str[0]).CoreSound + "᭄ᬮᭂ";
matra = "";
//-lê-
}
} else if (core_sound.CoreSound == 'ᬝ᭄ᬭ' || core_sound.CoreSound == 'ᬟ᭄ᬭ' || core_sound.CoreSound == 'ᬗ᭄ᬭ' || core_sound.CoreSound == 'ᬜ᭄ᬭ') {
// i.e. nyruput
konsonan = core_sound.CoreSound;
if (matra == "᭄") matra = "";
} else if (core_sound.CoreSound == "ᬮᬮ᭄ᬮ") {
// -ll-
konsonan = "ᬮ᭄ᬮ";
//double -l-
} else if (core_sound.CoreSound == "ᬃᬃᬭ") {
// -rr-
konsonan = "ᬃᬭ";
//double -r-
} else if (core_sound.CoreSound == "ᬃᬃᬳ") {
// -rh-
konsonan = "ᬃᬳ";
//-rh-
} else if (core_sound.CoreSound == "ᬃᬃᬮ") {
// -rl-
konsonan = "ᬃᬮ";
//-rl-
} else if (core_sound.CoreSound == "ᬃᬃᬯ") {
// -rw-
if (vowelPrev) konsonan = "ᬃᬯ";
//-rw- -- arwana else konsonan = "ᬭ᭄ᬯ";
//rw- -- rwa/rwi/rwab
} else if (core_sound.CoreSound == "ᬃᬃᬘ") {
// -rc-
konsonan = "ᬃᬘ";
//-rc-
} else if (core_sound.CoreSound == "ᬄᬄᬳ") {
// -hh-
konsonan = "ᬄᬳ";
//double -h-
} else if (core_sound.CoreSound == "ᬄᬄᬮ") {
// -hl-
if (vowelPrev) konsonan = "ᬄᬮ";
//-hl- else konsonan = "ᬳ᭄ᬮ";
//hlam
} else if (core_sound.CoreSound == "ᬄᬄᬯ") {
// -hw-
if (vowelPrev) konsonan = "ᬄᬯ";
//-hw- else konsonan = "ᬳ᭄ᬯ";
//hwab,hwan
} else if (core_sound.CoreSound == "ᬄᬳ") {
// -hy-
if (vowelPrev) konsonan = "ᬄᬬ";
//sembahyang else konsonan = "ᬳ";
//hyang/*
} else if (core_sound.CoreSound == "ᬄᬄ") {
// hrx-
konsonan = "ᬳ᭄ᬭ";
//hrx-
} else if (core_sound.CoreSound == "ᬄᬄ᭄ᬭ") {
// hr-
if (matra == "ᭂ") konsonan = "ᬳ";
//hr- else konsonan = "ᬳ᭄ᬭ";
//hr-
} else if (core_sound.CoreSound == "ᬄᬳ᭄ᬭ") {
// hr-
if (matra == "ᭂ") konsonan = "ᬳ";
//hr- else konsonan = "ᬳ";
//hr-
} else if (core_sound.CoreSound == 'ᬄ' && matra == "᭄") {
// wignyan - 12 April
konsonan = "ᬳ";
//ha
} else if (core_sound.CoreSound == 'ᬄ' && matra != "᭄") {
// wignyan
konsonan = "ᬳ";
//ha
} else if (core_sound.CoreSound == 'ᬃ' && matra == "ᭂ") {
// pa cerek
konsonan = "ᬋ";
matra = "";
//rê
} else if (core_sound.CoreSound == 'ᬃ' && matra != "᭄") {
// layar
konsonan = "ᬭ";
//ra
} else if (core_sound.CoreSound == 'ᬂ' && matra != "᭄") {
// cecak
konsonan = "ᬗ";
//nga
} else if (core_sound.CoreSound == 'ᬂ' && matra == "᭄") {
// cecak
konsonan = "ᬂ";
matra = "";
//cecak
} else {
konsonan = core_sound.CoreSound;
}
return "" + konsonan + matra;
}
}
/***************************
4.288

besutan