allow usage of ' for . in cherokee

This commit is contained in:
Daniel Løvbrøtte Olsen 2019-03-14 23:32:30 +01:00
parent 919ee380d2
commit bb4b7a6534
2 changed files with 13 additions and 13 deletions

View File

@ -1,4 +1,4 @@
const version = "2.2.0";
const version = "2.2.1";
import x2i from "./x2i";
import { existsSync } from "fs";
@ -91,7 +91,7 @@ Thanks to Tuugaalikkuluk for the encoding`;
function xchr(roomId) {
var message = `I'm sadly not smart enough to know which syllable to use in certain situations.
That means you have to help me out a little.
Write the wanted syllables down, but separate them by a dot (.)
Write the wanted syllables down, but separate them by a dot (.) or an apostrophe (')
Thanks to Tuugaalikkuluk for the encoding

View File

@ -23,37 +23,37 @@ export function convert(input: string)
else if (i==1) {
if (rom[0].toLowerCase()=='a') {
c=c+'';
if(rom[1]=="."&& isAlpha(rom[2])) rom=rom.slice(2)
if((rom[1] == "." || rom[1] == "'")&& isAlpha(rom[2])) rom=rom.slice(2)
else rom=rom.slice(1);
}
else if (rom[0].toLowerCase()=='e') {
c=c+'';
if(rom[1]=="."&& isAlpha(rom[2])) rom=rom.slice(2);
if((rom[1] == "." || rom[1] == "'")&& isAlpha(rom[2])) rom=rom.slice(2);
else rom=rom.slice(1);
}
else if (rom[0].toLowerCase()=='i') {
c=c+'';
if(rom[1]=="."&& isAlpha(rom[2])) rom=rom.slice(2);
if((rom[1] == "." || rom[1] == "'")&& isAlpha(rom[2])) rom=rom.slice(2);
else rom=rom.slice(1);
}
else if (rom[0].toLowerCase()=='o') {
c=c+'Ꭳ';
if(rom[1]=="."&& isAlpha(rom[2])) rom=rom.slice(2);
if((rom[1] == "." || rom[1] == "'")&& isAlpha(rom[2])) rom=rom.slice(2);
else rom=rom.slice(1);
}
else if (rom[0].toLowerCase()=='u') {
c=c+'Ꭴ';
if(rom[1]=="."&& isAlpha(rom[2])) rom=rom.slice(2);
if((rom[1] == "." || rom[1] == "'")&& isAlpha(rom[2])) rom=rom.slice(2);
else rom=rom.slice(1);
}
else if (rom[0].toLowerCase()=='v') {
c=c+'';
if(rom[1]=="."&& isAlpha(rom[2])) rom=rom.slice(2);
if((rom[1] == "." || rom[1] == "'")&& isAlpha(rom[2])) rom=rom.slice(2);
else rom=rom.slice(1);
}
else if (rom[0].toLowerCase()=='s') {
c=c+'Ꮝ';
if(rom[1]=="."&& isAlpha(rom[2])) rom=rom.slice(2);
if((rom[1] == "." || rom[1] == "'")&& isAlpha(rom[2])) rom=rom.slice(2);
else rom=rom.slice(1);
}
else {
@ -78,7 +78,7 @@ export function convert(input: string)
};
if(flag) {
c=c+syl[j][k];
if(rom[2]=="."&& isAlpha(rom[3])) rom=rom.slice(3);
if((rom[2] == "." || rom[2] == "'")&& isAlpha(rom[3])) rom=rom.slice(3);
else rom=rom.slice(2);
}
else {
@ -103,17 +103,17 @@ export function convert(input: string)
};
if(flag) {
c=c+syl[j][k];
if(rom[3]=="." && isAlpha(rom[4])) rom=rom.slice(4);
if((rom[3] == "." || rom[3] == "'") && isAlpha(rom[4])) rom=rom.slice(4);
else rom=rom.slice(3);
}
else if (rom.slice(0,3).toLowerCase()=="nah") {
c=c+"";
if(rom[3]=="." && isAlpha(rom[4])) rom=rom.slice(4);
if((rom[3] == "." || rom[3] == "'") && isAlpha(rom[4])) rom=rom.slice(4);
else rom=rom.slice(3);
}
else if (rom.slice(0,3).toLowerCase()=="hna") {
c=c+"Ꮏ";
if(rom[3]=="." && isAlpha(rom[4])) rom=rom.slice(4);
if((rom[3] == "." || rom[3] == "'") && isAlpha(rom[4])) rom=rom.slice(4);
else rom=rom.slice(3);
}
else {