Skip to content

Commit

Permalink
எழில் வெளியீடு எண் 0.99 பர்சியோதனை வழுக்கள் #201
Browse files Browse the repository at this point in the history
- fix *pira* keyboard label
- fix tamil-99 keystroke to avoid non-Tamil unicode forms
  • Loading branch information
Muthiah Annamalai committed Sep 5, 2017
1 parent b480b10 commit 97c9504
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
6 changes: 3 additions & 3 deletions editor/OSKeyboardWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self,lang,keys3rows,shift_keys3rows):
self.keys3rows_btns = []
self.mode = u"non-numeric"
self.spc = u" "*16
self.shift_words = [u"பிர", u"Shift"]
self.shift_words = [u"பிற", u"Shift"]
self.shiftmode = False

def __str__(self):
Expand Down Expand Up @@ -58,8 +58,8 @@ def padded(self,key_rows,numerickdb=False):
if numerickdb:
rows2[-1][1] = u"ஆங்"
else:
if rows2[-1][0].find(u"பிர") == -1:
rows2[-1].insert(0,u"பிர")
if rows2[-1][0].find(u"பிற") == -1:
rows2[-1].insert(0,u"பிற")
rows2[-1].insert(len(rows2[-1]),u"<- அழி")
rows2.append([u"0-9",u"ஆங்",self.spc+u"வெளி"+self.spc,u"் ",u"இடு"])
if numerickdb:
Expand Down
21 changes: 19 additions & 2 deletions editor/ezhuthi.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,15 +551,32 @@ def insert_tamil99_at_cursor(widget,value,lang=u"Tamil"):
ed.textview.place_cursor_onscreen()
return
elif value == u"் ":
if not m_start.starts_line():
offset = m_start.get_offset()
m_prev = ed.textbuffer.get_iter_at_offset(offset-1)
old_value = ed.textbuffer.get_text(m_prev,m_start,True)
# encoding conversion
if not PYTHON3:
try:
old_value = old_value.decode("UTF-8")
except Exception as e:
pass
if not (old_value in tamil.utf8.grantha_agaram_letters):
# these letters in keyboard cannot be used with pulli - it is bad combination of unicode points
# and don't form valid letters in Tamil; so we will keep them
ed.textbuffer.insert_at_cursor(tamil.utf8.ayudha_letter)
else:
ed.textbuffer.insert_at_cursor(value)
return
ed.textbuffer.insert_at_cursor(value)
ed.textview.place_cursor_onscreen()
return

# dispose of English language stuff
if lang.lower().find("eng") >= 0:
Editor.insert_at_cursor(widget,value)
return

if not m_start.starts_line():
offset = m_start.get_offset()
m_prev = ed.textbuffer.get_iter_at_offset(offset-1)
Expand Down

0 comments on commit 97c9504

Please sign in to comment.