From 2918b14fb768ccc18ad8484ac16dfaff2eaaf09b Mon Sep 17 00:00:00 2001 From: phisith Date: Tue, 4 Feb 2020 21:30:05 +0800 Subject: [PATCH 1/9] Make GUI for the search box --- Run | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Run b/Run index fbdf21a..9a01b61 100644 --- a/Run +++ b/Run @@ -1,3 +1,31 @@ +import tkinter as tk +from tkinter import ttk + +HEIGHT = 350 +WIDTH = 450 + +root = tk.Tk() + +canvas = tk.Canvas(root, height=HEIGHT, width=WIDTH) +canvas.pack() + +frame = tk.Frame(root, bg='#d8d8da') +frame.place(relwidth=1, relheight=1) + +btn = tk.Button(root, text="Translate", font=('arial',15,'bold'), fg='black', bg='gray') +btn.place(relx=0.43, rely=0.26,) + +text1 = tk.Label(frame, text='Python Translate App', font=('arial',20,'bold'),fg='black',bg='#d8d8da') +text1.pack() + +text2 = tk.Label(frame, text='Input word to translate:', font=('arial',16,'bold'), bg='#d8d8da',fg='black') +text2.place(relx =0, rely=0.18) + +entry = tk.Entry(frame,bg='white',justify='left',) +entry.place(relx=0, rely=0.25,relwidth=0.38) + +root.mainloop() + from googletrans import Translator translator = Translator() From 1a5b3cb0e15a5219a5dfa2acf37a4ae5a53f9a24 Mon Sep 17 00:00:00 2001 From: phisith Date: Wed, 5 Feb 2020 18:26:46 +0800 Subject: [PATCH 2/9] Develop multiple languages into GUI --- Run | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git a/Run b/Run index 9a01b61..9428744 100644 --- a/Run +++ b/Run @@ -24,6 +24,72 @@ text2.place(relx =0, rely=0.18) entry = tk.Entry(frame,bg='white',justify='left',) entry.place(relx=0, rely=0.25,relwidth=0.38) + +combobox = ttk.Combobox(frame, values=['afrikaans','albanian','amharic','arabic','armenian','azerbaijani','basque', + 'belarusian','bengali','bosnian','bulgarian','catalan','cebuano','chichewa', + 'chinese (simplified)','chinese (traditional)','corsican','croatian','czech', + 'danish','dutch','english','esperanto','estonian','filipino','finnish','french', + 'spanish','sundanese','swahili','swedish','tajik','tamil','telugu','thai', + 'turkish','ukrainian','urdu','uzbek','vietnamese','welsh','xhosa','yiddish', + 'yoruba','zulu','Filipino','Hebrew']) +combobox.pack() +combobox.place(relx=0.69, rely=0.20, relwidth=0.31) + +text3 = tk.Label(frame, text='To:', font=('arial',16,'bold'), bg='#d8d8da',fg='black') +text3.place(relx=0.60, rely=0.20) + +lang1frame = tk.Frame(root, bg='white') +lang1frame.place(relx =0.62, rely=0.28, relwidth=0.38, relheight=0.15) + +combobox2 = ttk.Combobox(frame, values=['afrikaans','albanian','amharic','arabic','armenian','azerbaijani','basque', + 'belarusian','bengali','bosnian','bulgarian','catalan','cebuano','chichewa', + 'chinese (simplified)','chinese (traditional)','corsican','croatian','czech', + 'danish','dutch','english','esperanto','estonian','filipino','finnish','french', + 'frisian','galician','georgian','german','greek','gujarati','haitian creole', + 'hausa','hawaiian','hebrew','hindi','hmong','hungarian','icelandic','igbo', + 'indonesian','irish','italian','japanese','javanese','kannada','kazakh','khmer', + 'korean','kurdish (kurmanji)','kyrgyz','lao','latin','latvian','lithuanian', + 'luxembourgish','macedonian','malagasy','malay','malayalam','maltese','maori', + 'marathi','mongolian','myanmar (burmese)','nepali','norwegian','pashto','persian', + 'polish','portuguese','punjabi','romanian','russian','samoan','scots gaelic', + 'serbian','sesotho','shona','sindhi','sinhala','slovak','slovenian','somali', + 'spanish','sundanese','swahili','swedish','tajik','tamil','telugu','thai', + 'turkish','ukrainian','urdu','uzbek','vietnamese','welsh','xhosa','yiddish', + 'yoruba','zulu','Filipino','Hebrew']) +combobox2.place(relx=0.69, rely=0.44, relwidth=0.31) + +text4 = tk.Label(frame, text='To:', font=('arial',16,'bold'), bg='#d8d8da',fg='black') +text4.place(relx=0.60, rely=0.44) + +lang2frame = tk.Frame(root, bg='white') +lang2frame.place(relx =0.62, rely=0.52, relwidth=0.38, relheight=0.15) + +combobox3 = ttk.Combobox(frame, values=['afrikaans','albanian','amharic','arabic','armenian','azerbaijani','basque', + 'belarusian','bengali','bosnian','bulgarian','catalan','cebuano','chichewa', + 'chinese (simplified)','chinese (traditional)','corsican','croatian','czech', + 'danish','dutch','english','esperanto','estonian','filipino','finnish','french', + 'frisian','galician','georgian','german','greek','gujarati','haitian creole', + 'hausa','hawaiian','hebrew','hindi','hmong','hungarian','icelandic','igbo', + 'indonesian','irish','italian','japanese','javanese','kannada','kazakh','khmer', + 'korean','kurdish (kurmanji)','kyrgyz','lao','latin','latvian','lithuanian', + 'luxembourgish','macedonian','malagasy','malay','malayalam','maltese','maori', + 'marathi','mongolian','myanmar (burmese)','nepali','norwegian','pashto','persian', + 'polish','portuguese','punjabi','romanian','russian','samoan','scots gaelic', + 'serbian','sesotho','shona','sindhi','sinhala','slovak','slovenian','somali', + 'spanish','sundanese','swahili','swedish','tajik','tamil','telugu','thai', + 'turkish','ukrainian','urdu','uzbek','vietnamese','welsh','xhosa','yiddish', + 'yoruba','zulu','Filipino','Hebrew']) +combobox3.place(relx=0.69, rely=0.68, relwidth=0.31) + +text5 = tk.Label(frame, text='To:', font=('arial',16,'bold'), bg='#d8d8da',fg='black') +text5.place(relx=0.60, rely=0.68) + +lang3frame = tk.Frame(root, bg='white') +lang3frame.place(relx =0.62, rely=0.76, relwidth=0.38, relheight=0.15) + +hfframe = tk.Frame(root, bg='white') +hfframe.place(relx =0, rely=0.44, relwidth=0.38, relheight=0.5) + root.mainloop() from googletrans import Translator @@ -51,4 +117,5 @@ while choice != 5: break else: - print(f'{choice} '"(The number is invalid, Please enter again)\n") \ No newline at end of file + print(f'{choice} '"(The number is invalid, Please enter again)\n") + From 2c1232cf0bd5a234c61ba002b425edc387daeff6 Mon Sep 17 00:00:00 2001 From: phisith Date: Wed, 5 Feb 2020 19:43:12 +0800 Subject: [PATCH 3/9] Change the design of GUI for history and favorite --- Run | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Run b/Run index 9428744..bfe639d 100644 --- a/Run +++ b/Run @@ -87,9 +87,11 @@ text5.place(relx=0.60, rely=0.68) lang3frame = tk.Frame(root, bg='white') lang3frame.place(relx =0.62, rely=0.76, relwidth=0.38, relheight=0.15) -hfframe = tk.Frame(root, bg='white') -hfframe.place(relx =0, rely=0.44, relwidth=0.38, relheight=0.5) +listbox = tk.Listbox(root) +listbox.place(relx=0, rely=0.41, relheight=0.25) +listbox2 = tk.Listbox(root) +listbox2.place(relx=0, rely=0.74, relheight=0.25) root.mainloop() from googletrans import Translator From 8d92a67646199bd9153848af09f9555ae2d46d08 Mon Sep 17 00:00:00 2001 From: phisith Date: Wed, 5 Feb 2020 22:33:12 +0800 Subject: [PATCH 4/9] Complete multiple languages in GUI --- Run | 56 +++++++++++++++++++++++++------------------------------- 1 file changed, 25 insertions(+), 31 deletions(-) diff --git a/Run b/Run index bfe639d..d8c059d 100644 --- a/Run +++ b/Run @@ -1,6 +1,26 @@ import tkinter as tk from tkinter import ttk +from googletrans import Translator +translator = Translator() + +def getinput(Userinput,tranto1, tranto2,tranto3): + + #Languages = input("Language that you want to translate to:") + t1 = translator.translate(Userinput, dest=tranto1) + t2 = translator.translate(Userinput, dest=tranto2) + t3 = translator.translate(Userinput, dest=tranto3) + lang1 = t1.text + lang2 = t2.text + lang3 = t3.text + D_t1 =tk.Label(lang1frame,text="" + lang1) + D_t1.place(relx=0,rely=0,relwidth=1, relheight=1) + D_t2 = tk.Label(lang2frame, text="" + lang2) + D_t2.place(relx=0, rely=0, relwidth=1, relheight=1) + D_t3 = tk.Label(lang3frame, text="" + lang3) + D_t3.place(relx=0, rely=0, relwidth=1, relheight=1) + + HEIGHT = 350 WIDTH = 450 @@ -12,8 +32,9 @@ canvas.pack() frame = tk.Frame(root, bg='#d8d8da') frame.place(relwidth=1, relheight=1) -btn = tk.Button(root, text="Translate", font=('arial',15,'bold'), fg='black', bg='gray') -btn.place(relx=0.43, rely=0.26,) +btn = tk.Button(root, text='Translate', font=('arial',15,'bold'), fg='black', bg='gray', + command=lambda: getinput(entry.get(),combobox1.get(),combobox2.get(),combobox3.get())) +btn.place(relx=0.42, rely=0.26,) text1 = tk.Label(frame, text='Python Translate App', font=('arial',20,'bold'),fg='black',bg='#d8d8da') text1.pack() @@ -25,15 +46,14 @@ entry = tk.Entry(frame,bg='white',justify='left',) entry.place(relx=0, rely=0.25,relwidth=0.38) -combobox = ttk.Combobox(frame, values=['afrikaans','albanian','amharic','arabic','armenian','azerbaijani','basque', +combobox1 = ttk.Combobox(frame, values=['afrikaans','albanian','amharic','arabic','armenian','azerbaijani','basque', 'belarusian','bengali','bosnian','bulgarian','catalan','cebuano','chichewa', 'chinese (simplified)','chinese (traditional)','corsican','croatian','czech', 'danish','dutch','english','esperanto','estonian','filipino','finnish','french', 'spanish','sundanese','swahili','swedish','tajik','tamil','telugu','thai', 'turkish','ukrainian','urdu','uzbek','vietnamese','welsh','xhosa','yiddish', 'yoruba','zulu','Filipino','Hebrew']) -combobox.pack() -combobox.place(relx=0.69, rely=0.20, relwidth=0.31) +combobox1.place(relx=0.69, rely=0.20, relwidth=0.31) text3 = tk.Label(frame, text='To:', font=('arial',16,'bold'), bg='#d8d8da',fg='black') text3.place(relx=0.60, rely=0.20) @@ -94,30 +114,4 @@ listbox2 = tk.Listbox(root) listbox2.place(relx=0, rely=0.74, relheight=0.25) root.mainloop() -from googletrans import Translator -translator = Translator() - -choice = 0 -while choice != 5: - choice = int(input("Enter your choice:")) - - if choice == 1: - Userinput = input("Text that you want to translate:") - Languages = input("Language that you want to translate to:") - t1 = translator.translate(Userinput, dest=Languages) - t2 = translator.translate(Userinput, dest='ko') - t3 = translator.translate(Userinput, dest='th') - t1.text - t2.text - t3.text - print(t1.text) - print(t2.text) - print(t3.text) - - elif choice == 6: - print("bye bye") - break - - else: - print(f'{choice} '"(The number is invalid, Please enter again)\n") From ec840992dc1e4d806dba59d1bb68e36570e14d63 Mon Sep 17 00:00:00 2001 From: phisith Date: Thu, 6 Feb 2020 17:11:17 +0800 Subject: [PATCH 5/9] Add history/favorite list --- Run | 18 ++++++++++++++++++ favorite.txt | 0 history.txt | 0 3 files changed, 18 insertions(+) create mode 100644 favorite.txt create mode 100644 history.txt diff --git a/Run b/Run index d8c059d..3a92b6b 100644 --- a/Run +++ b/Run @@ -4,9 +4,27 @@ from tkinter import ttk from googletrans import Translator translator = Translator() +try: + with open('history.txt', 'r') as h: + hl = [line.strip() for line in h] + +except: + hl = [] + +try: + with open('favorite.txt', 'r') as f: + fl = [line.strip() for line in f] + +except: + fl = [] + def getinput(Userinput,tranto1, tranto2,tranto3): #Languages = input("Language that you want to translate to:") + hl.append(Userinput) + with open('history.txt', 'w') as j: + j.write('\n'.join(hl)) + t1 = translator.translate(Userinput, dest=tranto1) t2 = translator.translate(Userinput, dest=tranto2) t3 = translator.translate(Userinput, dest=tranto3) diff --git a/favorite.txt b/favorite.txt new file mode 100644 index 0000000..e69de29 diff --git a/history.txt b/history.txt new file mode 100644 index 0000000..e69de29 From 2d44ee3bb97ef45db5906fdd95c313c67c3c649f Mon Sep 17 00:00:00 2001 From: phisith Date: Thu, 6 Feb 2020 20:51:34 +0800 Subject: [PATCH 6/9] Add Scrollbar for listbox --- Run | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Run b/Run index 3a92b6b..cd44a16 100644 --- a/Run +++ b/Run @@ -24,7 +24,7 @@ def getinput(Userinput,tranto1, tranto2,tranto3): hl.append(Userinput) with open('history.txt', 'w') as j: j.write('\n'.join(hl)) - + t1 = translator.translate(Userinput, dest=tranto1) t2 = translator.translate(Userinput, dest=tranto2) t3 = translator.translate(Userinput, dest=tranto3) @@ -130,6 +130,15 @@ listbox.place(relx=0, rely=0.41, relheight=0.25) listbox2 = tk.Listbox(root) listbox2.place(relx=0, rely=0.74, relheight=0.25) + +scroll = tk.Scrollbar(command=listbox.yview, orient='vertical') +scroll.place(relx=0.365, rely=0.415, relheight=0.24) +listbox.configure(yscrollcommand=scroll.set) + +scroll2 = tk.Scrollbar(command=listbox.yview, orient='vertical') +scroll2.place(relx=0.365, rely=0.745, relheight=0.24) +listbox2.configure(yscrollcommand=scroll.set) + root.mainloop() From 23817402e8fa51dda26f0e4d446de54f134b9614 Mon Sep 17 00:00:00 2001 From: phisith Date: Fri, 7 Feb 2020 18:58:55 +0800 Subject: [PATCH 7/9] Add history/favorite into the select listbox --- Run | 31 +++++++++++++++++++++++++++++++ googletrans/gtoken.py | 3 ++- history.txt | 3 +++ 3 files changed, 36 insertions(+), 1 deletion(-) diff --git a/Run b/Run index cd44a16..bf15576 100644 --- a/Run +++ b/Run @@ -22,6 +22,7 @@ def getinput(Userinput,tranto1, tranto2,tranto3): #Languages = input("Language that you want to translate to:") hl.append(Userinput) + listbox.insert(tk.END, Userinput) with open('history.txt', 'w') as j: j.write('\n'.join(hl)) @@ -38,6 +39,27 @@ def getinput(Userinput,tranto1, tranto2,tranto3): D_t3 = tk.Label(lang3frame, text="" + lang3) D_t3.place(relx=0, rely=0, relwidth=1, relheight=1) +def selectlist(event): + # get selected line index + select = listbox.curselection()[0] + # get the line's text + text_select = listbox.get(select) + + # delete previous text in enter1 + entry.delete(0, 50) + # now display the selected text + entry.insert(0, text_select) + + +def selectlist2(event): + # get selected line index + select2 = listbox2.curselection()[0] + # get the line's text + text_select2 = listbox2.get(select2) + # delete previous text in enter1 + entry.delete(0, 50) + # now display the selected text + entry.insert(0, text_select2) HEIGHT = 350 WIDTH = 450 @@ -139,6 +161,15 @@ scroll2 = tk.Scrollbar(command=listbox.yview, orient='vertical') scroll2.place(relx=0.365, rely=0.745, relheight=0.24) listbox2.configure(yscrollcommand=scroll.set) +for i in hl: + listbox.insert(tk.END, i) + +for j in fl: + listbox2.insert(tk.END, j) + +listbox.bind('', selectlist) +listbox2.bind('', selectlist2) + root.mainloop() diff --git a/googletrans/gtoken.py b/googletrans/gtoken.py index 6b82c33..e57e3c9 100644 --- a/googletrans/gtoken.py +++ b/googletrans/gtoken.py @@ -161,7 +161,8 @@ def acquire(self, text): # assume e means char code array e = [] g = 0 - size = len(text) + #size = len(text) + size = len(2) while g < size: l = a[g] # just append if l is less than 128(ascii: DEL) diff --git a/history.txt b/history.txt index e69de29..68420ae 100644 --- a/history.txt +++ b/history.txt @@ -0,0 +1,3 @@ +go +go +bbf \ No newline at end of file From c4d39688bec7b8fd99c2dcdb33ebd9925859b264 Mon Sep 17 00:00:00 2001 From: phisith Date: Fri, 7 Feb 2020 22:11:28 +0800 Subject: [PATCH 8/9] Add the add button for add favorite word into the listbox --- Run | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Run b/Run index bf15576..a0b1dbe 100644 --- a/Run +++ b/Run @@ -61,6 +61,12 @@ def selectlist2(event): # now display the selected text entry.insert(0, text_select2) +def getfavorite(Addword): + fl.append(Addword) + listbox2.insert(tk.END, Addword) + with open('favorite.txt', 'w') as k: + k.write('\n'.join(fl)) + HEIGHT = 350 WIDTH = 450 @@ -76,6 +82,10 @@ btn = tk.Button(root, text='Translate', font=('arial',15,'bold'), fg='black', bg command=lambda: getinput(entry.get(),combobox1.get(),combobox2.get(),combobox3.get())) btn.place(relx=0.42, rely=0.26,) +btn = tk.Button(root, text='Add Favorite', font=('arial',14,'bold'), fg='black', bg='gray', + command=lambda: getfavorite(entry.get())) +btn.place(relx=0.40, rely=0.34,) + text1 = tk.Label(frame, text='Python Translate App', font=('arial',20,'bold'),fg='black',bg='#d8d8da') text1.pack() From f326a60839953c6691bce7c8589f64bbc1e1e73d Mon Sep 17 00:00:00 2001 From: phisith Date: Sat, 8 Feb 2020 01:36:32 +0800 Subject: [PATCH 9/9] Add internal comment in the code --- Run | 47 +++++++++++++++++++++++++------------------ favorite.txt | 1 + googletrans/gtoken.py | 2 +- history.txt | 4 ++-- 4 files changed, 31 insertions(+), 23 deletions(-) diff --git a/Run b/Run index a0b1dbe..463c525 100644 --- a/Run +++ b/Run @@ -4,6 +4,7 @@ from tkinter import ttk from googletrans import Translator translator = Translator() +#read the history amd favorite file and put it into list try: with open('history.txt', 'r') as h: hl = [line.strip() for line in h] @@ -20,10 +21,9 @@ except: def getinput(Userinput,tranto1, tranto2,tranto3): - #Languages = input("Language that you want to translate to:") - hl.append(Userinput) - listbox.insert(tk.END, Userinput) - with open('history.txt', 'w') as j: + hl.append(Userinput) # put the user input in the list + listbox.insert(tk.END, Userinput) #update the history listbox + with open('history.txt', 'w') as j: #save the text into the file j.write('\n'.join(hl)) t1 = translator.translate(Userinput, dest=tranto1) @@ -32,52 +32,54 @@ def getinput(Userinput,tranto1, tranto2,tranto3): lang1 = t1.text lang2 = t2.text lang3 = t3.text - D_t1 =tk.Label(lang1frame,text="" + lang1) + D_t1 =tk.Label(lang1frame,text="" + lang1) #display the result on GUI D_t1.place(relx=0,rely=0,relwidth=1, relheight=1) - D_t2 = tk.Label(lang2frame, text="" + lang2) + D_t2 = tk.Label(lang2frame, text="" + lang2) #display the result on GUI D_t2.place(relx=0, rely=0, relwidth=1, relheight=1) - D_t3 = tk.Label(lang3frame, text="" + lang3) + D_t3 = tk.Label(lang3frame, text="" + lang3) #display the result on GUI D_t3.place(relx=0, rely=0, relwidth=1, relheight=1) def selectlist(event): - # get selected line index + # get selected text select = listbox.curselection()[0] - # get the line's text + # get the line tex text_select = listbox.get(select) - # delete previous text in enter1 + # delete previous text in the entry entry.delete(0, 50) - # now display the selected text + # display the selected text in the entry box entry.insert(0, text_select) def selectlist2(event): - # get selected line index + # get selected text select2 = listbox2.curselection()[0] - # get the line's text + # get the line text text_select2 = listbox2.get(select2) - # delete previous text in enter1 + # delete previous text in the entry entry.delete(0, 50) - # now display the selected text + # display the selected text in the entry box entry.insert(0, text_select2) def getfavorite(Addword): - fl.append(Addword) - listbox2.insert(tk.END, Addword) - with open('favorite.txt', 'w') as k: + fl.append(Addword) #put the favorite word into the list + listbox2.insert(tk.END, Addword) #update the listbox + with open('favorite.txt', 'w') as k: #save the favorite word into the file k.write('\n'.join(fl)) HEIGHT = 350 WIDTH = 450 root = tk.Tk() - +#Create the GUI windows canvas = tk.Canvas(root, height=HEIGHT, width=WIDTH) canvas.pack() +#set frame and backgroud color frame = tk.Frame(root, bg='#d8d8da') frame.place(relwidth=1, relheight=1) +#translate button and add favorite btn = tk.Button(root, text='Translate', font=('arial',15,'bold'), fg='black', bg='gray', command=lambda: getinput(entry.get(),combobox1.get(),combobox2.get(),combobox3.get())) btn.place(relx=0.42, rely=0.26,) @@ -86,16 +88,18 @@ btn = tk.Button(root, text='Add Favorite', font=('arial',14,'bold'), fg='black', command=lambda: getfavorite(entry.get())) btn.place(relx=0.40, rely=0.34,) +#text display on GUI text1 = tk.Label(frame, text='Python Translate App', font=('arial',20,'bold'),fg='black',bg='#d8d8da') text1.pack() text2 = tk.Label(frame, text='Input word to translate:', font=('arial',16,'bold'), bg='#d8d8da',fg='black') text2.place(relx =0, rely=0.18) +#entry for get input entry = tk.Entry(frame,bg='white',justify='left',) entry.place(relx=0, rely=0.25,relwidth=0.38) - +#combobox combobox1 = ttk.Combobox(frame, values=['afrikaans','albanian','amharic','arabic','armenian','azerbaijani','basque', 'belarusian','bengali','bosnian','bulgarian','catalan','cebuano','chichewa', 'chinese (simplified)','chinese (traditional)','corsican','croatian','czech', @@ -163,6 +167,7 @@ listbox.place(relx=0, rely=0.41, relheight=0.25) listbox2 = tk.Listbox(root) listbox2.place(relx=0, rely=0.74, relheight=0.25) +#scrollbar scroll = tk.Scrollbar(command=listbox.yview, orient='vertical') scroll.place(relx=0.365, rely=0.415, relheight=0.24) listbox.configure(yscrollcommand=scroll.set) @@ -171,12 +176,14 @@ scroll2 = tk.Scrollbar(command=listbox.yview, orient='vertical') scroll2.place(relx=0.365, rely=0.745, relheight=0.24) listbox2.configure(yscrollcommand=scroll.set) +#insert the data from history and favorite .txt into listbox for i in hl: listbox.insert(tk.END, i) for j in fl: listbox2.insert(tk.END, j) +#make the action when click button listbox.bind('', selectlist) listbox2.bind('', selectlist2) diff --git a/favorite.txt b/favorite.txt index e69de29..7ee0823 100644 --- a/favorite.txt +++ b/favorite.txt @@ -0,0 +1 @@ +eat \ No newline at end of file diff --git a/googletrans/gtoken.py b/googletrans/gtoken.py index e57e3c9..3ddb825 100644 --- a/googletrans/gtoken.py +++ b/googletrans/gtoken.py @@ -162,7 +162,7 @@ def acquire(self, text): e = [] g = 0 #size = len(text) - size = len(2) + size = len(a) while g < size: l = a[g] # just append if l is less than 128(ascii: DEL) diff --git a/history.txt b/history.txt index 68420ae..33b9cdd 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,3 @@ go -go -bbf \ No newline at end of file +eat +fly \ No newline at end of file