Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gensha.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import subprocess

langs = ['tam','eng','hin','jpn','rus','fra','tha','ara','chi_sim','spa', 'ind']
langs = ['tam','eng','hin','jpn','rus','fra','tha','ara','chi_sim','spa', 'ind', 'por']

for lang in langs :
file_url = 'https://github.com/tesseract-ocr/tessdata_best/raw/main/'+lang+'.traineddata'
Expand Down
5 changes: 5 additions & 0 deletions gnomeapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ modules:
url: https://github.com/tesseract-ocr/tessdata_best/raw/main/ind.traineddata
sha256: 1f6596041ffb4cd5094e5f98764db43cfde04edb8f02b988f90ebc1353ac73b8
dest: traineddata
- type: file
url: https://github.com/tesseract-ocr/tessdata_best/raw/main/por.traineddata
sha256: 711de9dbb8052067bd42f16b9119967f30bada80d57e2ef24f65d09f531adb04
dest: traineddata

post-install:
- install -p -D -m 0644 "traineddata"/deu.traineddata -t "${FLATPAK_DEST}/share/tessdata/";
Expand All @@ -127,3 +131,4 @@ modules:
- install -p -D -m 0644 "traineddata"/chi_sim.traineddata -t "${FLATPAK_DEST}/share/tessdata/";
- install -p -D -m 0644 "traineddata"/spa.traineddata -t "${FLATPAK_DEST}/share/tessdata/";
- install -p -D -m 0644 "traineddata"/ind.traineddata -t "${FLATPAK_DEST}/share/tessdata/";
- install -p -D -m 0644 "traineddata"/por.traineddata -t "${FLATPAK_DEST}/share/tessdata/";
5 changes: 5 additions & 0 deletions manifests/tesseract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ sources:
url: https://github.com/tesseract-ocr/tessdata_best/raw/main/ind.traineddata
sha256: 1f6596041ffb4cd5094e5f98764db43cfde04edb8f02b988f90ebc1353ac73b8
dest: traineddata
- type: file
url: https://github.com/tesseract-ocr/tessdata_best/raw/main/por.traineddata
sha256: 711de9dbb8052067bd42f16b9119967f30bada80d57e2ef24f65d09f531adb04
dest: traineddata

post-install:
- install -p -D -m 0644 "traineddata"/eng.traineddata -t "${FLATPAK_DEST}/share/tessdata/";
Expand All @@ -64,6 +68,7 @@ post-install:
- install -p -D -m 0644 "traineddata"/nld.traineddata -t "${FLATPAK_DEST}/share/tessdata/";
- install -p -D -m 0644 "traineddata"/tur.traineddata -t "${FLATPAK_DEST}/share/tessdata/";
- install -p -D -m 0644 "traineddata"/ind.traineddata -t "${FLATPAK_DEST}/share/tessdata/";
- install -p -D -m 0644 "traineddata"/por.traineddata -t "${FLATPAK_DEST}/share/tessdata/";


modules:
Expand Down
4 changes: 4 additions & 0 deletions src/components/LanguageButton.vala
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class LanguageButton : Gtk.MenuButton {
var tur = new Gtk.ModelButton () ;
var deu = new Gtk.ModelButton () ;
var ind = new Gtk.ModelButton () ;
var por = new Gtk.ModelButton () ;

deu.text = "German" ;
nld.text = "Dutch" ;
Expand All @@ -31,6 +32,7 @@ public class LanguageButton : Gtk.MenuButton {
fra.text = "French" ;
ara.text = "Arabic" ;
ind.text = "Indonesian" ;
por.text = "Portuguese" ;

deu.clicked.connect (() => { lang.save_pref_language ("deu") ; }) ;
eng.clicked.connect (() => { lang.save_pref_language ("eng") ; }) ;
Expand All @@ -43,6 +45,7 @@ public class LanguageButton : Gtk.MenuButton {
nld.clicked.connect (() => { lang.save_pref_language ("nld") ; }) ;
tur.clicked.connect (() => { lang.save_pref_language ("tur") ; }) ;
ind.clicked.connect (() => { lang.save_pref_language ("ind") ; }) ;
por.clicked.connect (() => { lang.save_pref_language ("por") ; }) ;

menu_list.add (eng) ;
menu_list.add (chi_sim) ;
Expand All @@ -54,6 +57,7 @@ public class LanguageButton : Gtk.MenuButton {
menu_list.add (tur) ;
menu_list.add (rus) ;
menu_list.add (ind) ;
menu_list.add (por) ;

scroll_view.add (menu_list) ;
scroll_view.show_all () ;
Expand Down