Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
letterly authored Mar 28, 2024
1 parent 0bd420f commit eeeb892
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 37 deletions.
1 change: 0 additions & 1 deletion interbraille-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -4629,7 +4629,6 @@ otherdata = {
updates: "Ажурирања",
byharris: "Изработено од Harris Mowbray",
choose: "Одберете јазик",
convertascii: "Конвертирај во ASCII брајово писмо",
braille1: "Македонско брајово писмо",
braille2: "Интерпункција на македонско брајово писмо",
},
Expand Down
11 changes: 7 additions & 4 deletions interbraille.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
textarea{
resize: none;
width: 43%;
margin: 3%;
height: 50%;
width: 32%;
margin: 0.2%;
height: 80%;
font-family: Verdana;
font-size: 38px;
font-size: 32px;
border-radius: 10px;
}
.selectblock{
Expand Down Expand Up @@ -62,4 +62,7 @@ td{
}
#link a{
color: darkgreen;
}
#ascii{
font-size: 16px;
}
7 changes: 3 additions & 4 deletions interbraille.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@
</head>
<body>
<h1 id="title">Braille Conversion Website</h1>
<p id="link"><a id="harriswebsite" href="https://harrismowbray.com">By Harris Mowbray</a></p>
<p id="changelog"><a href="interbraille.txt" id="update">Updates</a></p>
<p id="link"><a id="harriswebsite" href="https://harrismowbray.com">By Harris Mowbray</a> | <a href="interbraille.txt" id="update">Updates</a></p>
<h3 id="choose">Choose a Language:</h3>
<div class="selectblock">
<select id="language" onchange="changeLang(this.value)"></select>
</div>
<br>
<textarea id="input" spellcheck="false" onkeyup="printBraille(this.value)"></textarea>
<textarea id="output" contenteditable="false"></textarea>
<button id="asci" onclick="asciize()">Convert to ASCII Braille</button>
<h1 id="brltype"></h1>
<textarea id="ascii" contenteditable="false"></textarea>
<h1 id="brltype"></h1>
<div class="tables">
<table id="t0">
</table>
Expand Down
81 changes: 53 additions & 28 deletions interbraille.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,10 @@ function toBraille(text){

function printBraille(text){
output.value = toBraille(text)
if(document.getElementById("language").value == "lb"){
ascii.textContent = "Sorry, ASCII Braille does not exist for 8-dot systems"
}
else asciize()
}


Expand All @@ -366,7 +370,6 @@ function changeLang(lang){
harriswebsite.textContent = otherdata[lang].byharris ?? "By Harris Mowbray"
update.textContent = otherdata[lang].updates ?? "Updates"
choose.textContent = (otherdata[lang].choose ?? "Choose a Language") + ":"
asci.textContent = otherdata[lang].convertascii ?? "Convert to Braille ASCII"

brltype.textContent = otherdata[lang].braille1 ?? (language.options[language.selectedIndex].text.split(" | ")[0] + " Braille")
thebrltype.textContent = otherdata[lang].braille2 ?? (language.options[language.selectedIndex].text.split(" | ")[0] + " Braille Punctuation")
Expand Down Expand Up @@ -438,32 +441,32 @@ function asciize(){
"⠜": ">",
"⠹": "?",
"⠈": "@",
"⠁": "A",
"⠃": "B",
"⠉": "C",
"⠙": "D",
"⠑": "E",
"⠋": "F",
"⠛": "G",
"⠓": "H",
"⠊": "I",
"⠚": "J",
"⠅": "K",
"⠇": "L",
"⠍": "M",
"⠝": "N",
"⠕": "O",
"⠏": "P",
"⠟": "Q",
"⠗": "R",
"⠎": "S",
"⠞": "T",
"⠥": "U",
"⠧": "V",
"⠺": "W",
"⠭": "X",
"⠽": "Y",
"⠵": "Z",
"⠁": "a",
"⠃": "b",
"⠉": "c",
"⠙": "d",
"⠑": "e",
"⠋": "f",
"⠛": "g",
"⠓": "h",
"⠊": "i",
"⠚": "j",
"⠅": "k",
"⠇": "l",
"⠍": "m",
"⠝": "n",
"⠕": "o",
"⠏": "p",
"⠟": "q",
"⠗": "r",
"⠎": "s",
"⠞": "t",
"⠥": "u",
"⠧": "v",
"⠺": "w",
"⠭": "x",
"⠽": "y",
"⠵": "z",
"⠪": "[",
"⠳": "\\",
"⠻": "]",
Expand All @@ -475,7 +478,29 @@ function asciize(){
v = v.replace(new RegExp(o[0], "g"), o[1])
}

output.value = v
rowlength = 0

v = v.split(" ")
asciival = []
for(vvvv of v){
rowlength += (vvvv.length)
if(rowlength >= 32){
asciival.push(vvvv)
rowlength = vvvv.length
}
else{
if(asciival.length == 0){
asciival[0] = vvvv
}
else{
asciival[asciival.length - 1] += (" " + vvvv)
rowlength++
}
}
}

ascii.value = asciival.join("\n")

}


Expand Down
10 changes: 10 additions & 0 deletions interbraille.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
InterBraille Updates

28 Mar 2024
-.BRL file column now included!

21 Mar 2024
-Braille ASCII is now the third column and the button for it is removed
-Luxembourgish is disabled from Braille ASCII

20 Mar 2024
-Instituted Unicode normalization for Yiddish

17 Mar 2024
-Fixed some issues with Yiddish/Hebrew Braille
-Added the Hebrew punctuation mark ־
Expand Down

0 comments on commit eeeb892

Please sign in to comment.