From cb32ee0447403aad868169bb5acecc8764dbf8c1 Mon Sep 17 00:00:00 2001 From: Rajeesh K Nambiar Date: Fri, 30 Jan 2009 12:22:22 +0530 Subject: Chathans: Add ability for u2a and a2u conversions --- pychathans/chathans.py | 58 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 45 insertions(+), 13 deletions(-) (limited to 'pychathans') diff --git a/pychathans/chathans.py b/pychathans/chathans.py index a52192c..ee34c3a 100755 --- a/pychathans/chathans.py +++ b/pychathans/chathans.py @@ -44,7 +44,7 @@ gettext.textdomain(PACKAGE) #_ = gettext.gettext name = _("Chathans") -version = "0.3" +version = "0.4" title = name + " " + version @@ -75,6 +75,10 @@ class Chathans (gtk.Window): ascii_btn = gtk.FileChooserButton(_("Select the ASCII File (.txt,.pdf)")) mapping_btn = gtk.FileChooserButton(_("Select the ASCII-Unicode Mapping File")) unicode_btn = gtk.FileChooserButton(_("Select Output Unicode File")) + + # ആസ്കി-യൂണിക്കോഡ് ആണോ, അതോ യൂണിക്കോഡ്-ആസ്കിയോ? + a2u_radio = gtk.RadioButton(None, (_("ASCII-to-Unicode"))) + u2a_radio = gtk.RadioButton(a2u_radio, (_("Unicode-to-ASCII"))) # മാപ്പ്, സാധാരണ എവിടെ കിട്ടും? അല്ല, എവിടെ കിട്ടും? mapping_dir = sys.prefix + "/share/payyans/maps/" @@ -95,6 +99,9 @@ class Chathans (gtk.Window): ascii_filter.add_pattern("*.[Pp][Dd][Ff]") ascii_btn.add_filter(ascii_filter) + self.a2u_radio = a2u_radio + self.u2a_radio = u2a_radio + self.ascii_btn = ascii_btn self.mapping_btn = mapping_btn self.unicode_btn = unicode_btn @@ -115,17 +122,23 @@ class Chathans (gtk.Window): hbox3.pack_start(unicode_lbl) hbox3.pack_end(unicode_btn) + radio_box = gtk.HBox() + radio_box.set_border_width(12) + radio_box.pack_start(a2u_radio) + radio_box.pack_start(u2a_radio) + btn_box = gtk.HButtonBox() btn_box.set_border_width(4) btn_box.pack_start(convert_btn) btn_box.pack_start(about_btn) btn_box.pack_start(cancel_btn) - + vbox1 = gtk.VBox() vbox1.set_border_width(4) vbox1.pack_start(hbox1) vbox1.pack_start(hbox2) vbox1.pack_start(hbox3) + vbox1.pack_start(radio_box) vbox1.pack_end(btn_box) frame = gtk.Frame() @@ -140,28 +153,47 @@ class Chathans (gtk.Window): self.AsciiFile = self.ascii_btn.get_filename() self.MappingFile = self.mapping_btn.get_filename() self.UnicodeFile = self.unicode_btn.get_filename() - - if ( self.AsciiFile == None + + if self.a2u_radio.get_active() == True: + direction = "a2u" + from_file = self.AsciiFile + to_file = self.UnicodeFile + else: + direction = "u2a" + from_file = self.UnicodeFile + to_file = self.AsciiFile + + if ( from_file == None or self.MappingFile == None ): dlg = gtk.MessageDialog(self.get_toplevel(), gtk.DIALOG_MODAL, gtk.MESSAGE_INFO, gtk.BUTTONS_OK, - _("Please select both ASCII file and Mapping file")) + _("Please select both Input file and Mapping file")) dlg.run() dlg.destroy() return - if self.UnicodeFile == None: - (inp_file, inp_ext) = os.path.splitext(self.AsciiFile) - self.UnicodeFile = inp_file + "-unicode" + ".txt" + if to_file == None: + (inp_file, inp_ext) = os.path.splitext(from_file) + if direction == "a2u": + self.UnicodeFile = inp_file + "-unicode" + ".txt" + else: + self.AsciiFile = inp_file + "-ascii" + ".txt" # ഓഹ്, പയ്യന്‍! നീ വ്യാഘ്രമാകുന്നു. - payyan = Payyans(self.AsciiFile, self.UnicodeFile, self.MappingFile) - status = payyan.ascii2unicode() + if direction == "a2u": + payyan = Payyans(self.AsciiFile, self.UnicodeFile, self.MappingFile) + status = payyan.ascii2unicode() + else: + payyan = Payyans(self.UnicodeFile, self.AsciiFile, self.MappingFile) + status = payyan.unicode2ascii() print status - if status == None: - msg = _("Coversion Done - Unicode file :") + self.UnicodeFile + if status == 0: + if direction == "a2u": + msg = _("Coversion Done - Unicode file : ") + self.UnicodeFile + else: + msg = _("Conversion Done - ASCII file : ") + self.AsciiFile if status == 1: msg = _("Could not find the pdftotext utility. Exiting...") if status == 2: @@ -198,7 +230,7 @@ class Chathans (gtk.Window): def __quit(self, event): ''' ന്നാ, കട്ടേം പടോം മടക്കാം ! ''' dlg = gtk.MessageDialog(self.get_toplevel(), - gtk.DIALOG_MODAL, + gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT, gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO, _("Do you really want to Quit?")) -- cgit From e25411a0451ce78b31350d42bd9527dad59d59ba Mon Sep 17 00:00:00 2001 From: Rajeesh K Nambiar Date: Sun, 1 Feb 2009 10:39:16 +0530 Subject: Chathans: Add functionality for giving output filename from file chooser --- pychathans/chathans.py | 61 +++++++++++++++++----- pychathans/po/chathans-ml.po | 117 ++++++++++++++++++++++++------------------- pychathans/po/chathans.pot | 78 +++++++++++++++++------------ 3 files changed, 158 insertions(+), 98 deletions(-) (limited to 'pychathans') diff --git a/pychathans/chathans.py b/pychathans/chathans.py index ee34c3a..dc90840 100755 --- a/pychathans/chathans.py +++ b/pychathans/chathans.py @@ -34,7 +34,7 @@ try: from payyans import Payyans except ImportError: ''' ഹൈയ്, പയ്യന്റെ ദുര്‍ജ്ജനസംസര്‍ഗ്ഗമില്ലാതെ നോം സാധനം തൊടാറില്ല! ''' - print _("Chathans require Payyans") + print _("Chathans requires Payyans") raise SystemExit @@ -44,7 +44,7 @@ gettext.textdomain(PACKAGE) #_ = gettext.gettext name = _("Chathans") -version = "0.4" +version = "0.5" title = name + " " + version @@ -72,9 +72,13 @@ class Chathans (gtk.Window): unicode_lbl = gtk.Label(_("Unicode File : ")) # പ്രമാണോം പത്രോം ആധാരോം എടുക്ക്വാ.. - ascii_btn = gtk.FileChooserButton(_("Select the ASCII File (.txt,.pdf)")) + #ascii_btn = gtk.FileChooserButton(_("Select the ASCII File (.txt,.pdf)")) + ascii_btn = gtk.Button("ASCII File...",None) + ascii_btn.connect("clicked", self.__choose_ascii_file) + unicode_btn = gtk.Button("Unicode File...",None) + unicode_btn.connect("clicked", self.__choose_unicode_file) mapping_btn = gtk.FileChooserButton(_("Select the ASCII-Unicode Mapping File")) - unicode_btn = gtk.FileChooserButton(_("Select Output Unicode File")) + #unicode_btn = gtk.FileChooserButton(_("Select Output Unicode File")) # ആസ്കി-യൂണിക്കോഡ് ആണോ, അതോ യൂണിക്കോഡ്-ആസ്കിയോ? a2u_radio = gtk.RadioButton(None, (_("ASCII-to-Unicode"))) @@ -92,13 +96,6 @@ class Chathans (gtk.Window): about_btn = gtk.Button(_("About"), gtk.STOCK_ABOUT) about_btn.connect("clicked", self.__show_about) - # Add File Filter for ASCII input file. അരിപ്പ! - ascii_filter = gtk.FileFilter() - ascii_filter.set_name("*.txt,*.pdf") - ascii_filter.add_pattern("*.[Tt][Xx][Tt]") - ascii_filter.add_pattern("*.[Pp][Dd][Ff]") - ascii_btn.add_filter(ascii_filter) - self.a2u_radio = a2u_radio self.u2a_radio = u2a_radio @@ -148,11 +145,49 @@ class Chathans (gtk.Window): self.show_all() + def __choose_ascii_file(self, event): + if self.u2a_radio.get_active() == True: + the_action = gtk.FILE_CHOOSER_ACTION_SAVE + else: + the_action = gtk.FILE_CHOOSER_ACTION_OPEN + filechooser = gtk.FileChooserDialog(title=_("Select the ASCII File (.txt,.pdf)"), + action=the_action, + buttons=(gtk.STOCK_OPEN, gtk.RESPONSE_ACCEPT, + gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)) + # Add File Filter for ASCII input file. അരിപ്പ! + ascii_filter = gtk.FileFilter() + ascii_filter.set_name("*.txt,*.pdf") + ascii_filter.add_pattern("*.[Tt][Xx][Tt]") + ascii_filter.add_pattern("*.[Pp][Dd][Ff]") + filechooser.add_filter(ascii_filter) + filechooser.connect("response", self.__get_file, "a") + filechooser.run() + + def __get_file(self, dialog, response, in_data): + dialog.hide() + if response == gtk.RESPONSE_ACCEPT: + if in_data == "a": + self.AsciiFile = dialog.get_filename() + else: + self.UnicodeFile = dialog.get_filename() + + def __choose_unicode_file(self, event): + if self.a2u_radio.get_active() == True: + the_action = gtk.FILE_CHOOSER_ACTION_SAVE + else: + the_action = gtk.FILE_CHOOSER_ACTION_OPEN + filechooser = gtk.FileChooserDialog(title=_("Select the Unicode File"), + action=the_action, + buttons=(gtk.STOCK_OPEN, gtk.RESPONSE_ACCEPT, + gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)) + filechooser.connect("response", self.__get_file, "u") + filechooser.run() + def __convert_file(self, event): ''' പയ്യനെ വിളിക്ക്യാ, ഇനി നോം ഗ്യാലറിയിലിരുന്ന് കളി കാണട്ടെ. ''' - self.AsciiFile = self.ascii_btn.get_filename() + #self.AsciiFile = self.ascii_btn.get_filename() self.MappingFile = self.mapping_btn.get_filename() - self.UnicodeFile = self.unicode_btn.get_filename() + #self.UnicodeFile = self.unicode_btn.get_filename() if self.a2u_radio.get_active() == True: direction = "a2u" diff --git a/pychathans/po/chathans-ml.po b/pychathans/po/chathans-ml.po index 5a72472..e96e0dd 100644 --- a/pychathans/po/chathans-ml.po +++ b/pychathans/po/chathans-ml.po @@ -1,109 +1,122 @@ -# Chathans Malayalam Localization file. +# Chathans Localization Template File. # Copyright (C) 2009 Rajeesh K Nambiar # This file is distributed under the same license as Chathans package. # Rajeesh K Nambiar , 2009. # +#, fuzzy msgid "" msgstr "" -"Project-Id-Version: 0.2\n" +"Project-Id-Version: Chathans 0.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-01-24 14:26+0530\n" -"PO-Revision-Date: 2009-01-24 15:01+0530\n" +"POT-Creation-Date: 2009-02-01 10:21+0530\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Rajeesh K Nambiar \n" -"Language-Team: ml\n" +"Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" +"Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: chathans.py:29 +#: chathans.py:30 msgid "Chathans requires PyGTK" -msgstr "ചാത്തന്‍സിന് PyGTK ആവശ്യമാണ്" +msgstr "ചാത്തന്‍സിന് pygtk ആവശ്യമാണ്" -#: chathans.py:36 -msgid "Chathans require Payyans" +#: chathans.py:37 +msgid "Chathans requires Payyans" msgstr "ചാത്തന്‍സിന് പയ്യന്‍സ് ആവശ്യമാണ്" -#: chathans.py:45 +#: chathans.py:46 msgid "Chathans" msgstr "ചാത്തന്‍സ്" -#: chathans.py:69 +#: chathans.py:70 msgid "ASCII File : " msgstr "ആസ്കി ഫയല്‍" -#: chathans.py:70 +#: chathans.py:71 msgid "Mapping File : " msgstr "മാപ്പിങ്ങ് ഫയല്‍" -#: chathans.py:71 +#: chathans.py:72 msgid "Unicode File : " msgstr "യൂണിക്കോഡ് ഫയല്‍" -#: chathans.py:74 -msgid "Select the ASCII File (.txt,.pdf)" -msgstr "ആസ്കി ഫയല്‍ തിരഞ്ഞെടുക്കൂ" - -#: chathans.py:75 +#: chathans.py:80 msgid "Select the ASCII-Unicode Mapping File" -msgstr "ആസ്കി-യൂണിക്കോഡ് മാപ്പിങ്ങ് ഫയല്‍ തിരഞ്ഞെടുക്കൂ" +msgstr "ആസ്കി-യുണിക്കോഡ് മാപ്പിങ്ങ് ഫയല്‍ തിരഞ്ഞെടുക്കുക" + +#: chathans.py:84 +msgid "ASCII-to-Unicode" +msgstr "ആസ്കി-യൂണിക്കോഡ്" -#: chathans.py:76 -msgid "Select Output Unicode File" -msgstr "ഉണ്ടാക്കേണ്ട യൂണീക്കോഡ് ഫയല്‍ തിരഞ്ഞെടുക്കൂ" +#: chathans.py:85 +msgid "Unicode-to-ASCII" +msgstr "യൂണിക്കോഡ്-ആസ്കി" -#: chathans.py:83 +#: chathans.py:92 msgid "Convert" msgstr "പരിവര്‍ത്തനം ചെയ്യുക" -#: chathans.py:85 +#: chathans.py:94 msgid "Quit" -msgstr "പുറത്തുകടക്കുക" +msgstr "പുറത്ത് പോവുക" -#: chathans.py:87 +#: chathans.py:96 msgid "About" msgstr "സംബന്ധിച്ച്" -#: chathans.py:149 -msgid "Please select both ASCII file and Mapping file" -msgstr "ദയവായി ആസ്കി ഫയലും മാപ്പിങ്ങ് ഫയലും തിരഞ്ഞെടുക്കുക" +#: chathans.py:153 +msgid "Select the ASCII File (.txt,.pdf)" +msgstr "ആസ്കി ഫയല്‍ (.txt,.pdf) തിരഞ്ഞെടുക്കുക" + +#: chathans.py:179 +msgid "Select the Unicode File" +msgstr "യൂണിക്കോഡ് ഫയല്‍ തിരഞ്ഞെടുക്കുക" + +#: chathans.py:207 +msgid "Please select both Input file and Mapping file" +msgstr "ദയവായി പരിവര്‍ത്തനം ചെയ്യേണ്ട ഫയലും മാപ്പിങ്ങ് ഫയലും തിരഞ്ഞെടുക്കുക" + +#: chathans.py:229 +msgid "Coversion Done - Unicode file : " +msgstr "പരിവര്‍ത്തനം ചെയ്തു കഴിഞ്ഞു - യൂണിക്കോഡ് ഫയല്‍ : " -#: chathans.py:163 -msgid "Coversion Done - Unicode file :" -msgstr "പരിവര്‍ത്തനം ചെയ്തു കഴിഞ്ഞു - യൂണിക്കോഡ് ഫയല്‍ :" +#: chathans.py:231 +msgid "Conversion Done - ASCII file : " +msgstr "പരിവര്‍ത്തനം ചെയ്തു കഴിഞ്ഞു - ആസ്കി ഫയല്‍ : " -#: chathans.py:165 +#: chathans.py:233 msgid "Could not find the pdftotext utility. Exiting..." -msgstr "pdftotext ഉപാധി കണ്ടെത്താന്‍ കഴിഞ്ഞില്ല. നിര്‍ത്തുന്നു..." +msgstr "pdftotext ഉപാധി കണ്ടെത്താന്‍ സാധിച്ചില്ല. നിര്‍ത്തുന്നു..." -#: chathans.py:167 +#: chathans.py:235 msgid "Syntax Error in Mapping file. Exiting..." -msgstr "മാപ്പിങ്ങ് ഫയലില്‍ വ്യാകരണ പിശകുണ്ട്. നിര്‍ത്തുന്നു..." +msgstr "മാപ്പിങ്ങ് ഫയലില്‍ വ്യാകരണപ്പിശകുണ്ട്. നിര്‍ത്തുന്നു..." -#: chathans.py:182 +#: chathans.py:250 msgid "Chathans: Rajeesh K Nambiar " -msgstr "ചാത്തന്‍സ്: രജീഷ് കെ നമ്പ്യാര്‍ " +msgstr "ചാത്തന്‍സ് : രജീഷ് കെ നമ്പ്യാര്‍ " -#: chathans.py:183 +#: chathans.py:251 msgid "" "Payyans : Santhosh Thottingal, Nishan Naseer,\n" "\t\t Manu S Madhav, Rajeesh K Nambiar" msgstr "" -"പയ്യന്‍സ് : സന്തോഷ് തോട്ടിങ്ങല്‍, നിഷാന്‍ നസീര്‍,\n" -"\t\t മനു എസ് മാധവ്, രജീഷ് കെ നമ്പ്യാര്‍" +"പയ്യന്‍സ് :‌ സന്തോഷ് തോട്ടിങ്ങല്‍, നിഷാന്‍ നസീര്‍,\n" +"\t\t മനു എസ് മാധവ്, രജീഷ് കെ നമ്പ്യാര്‍" -#: chathans.py:185 -msgid "Chathans is an easy to use GUI frontend to Payyans ASCII<->Unicode Converter" -msgstr "ചാത്തന്‍സ് ഉപയോഗിക്കാന്‍ എളുപ്പമുള്ള, പയ്യന്‍സ് എന്ന ആസ്കി<->യൂണിക്കോഡ് പരിവര്‍ത്തകനു വേണ്ടിയുള്ള ഒരു അഭിമുഖീകരണ ഉപാധിയാണ്." - -#: chathans.py:190 +#: chathans.py:253 +msgid "" +"Chathans is an easy to use GUI frontend to Payyans ASCII<->Unicode Converter" +msgstr "" +"ചാത്തന്‍സ് ഉപയോഗിക്കാന്‍ എളുപ്പമുള്ള, പയ്യന്‍സ് ആസ്കി<->യൂണിക്കോഡ് പരിവര്‍ത്തകനു വേണ്ടിയുള്ള ഒരു അഭിമുഖോപാധിയാണ്" +#: chathans.py:258 msgid "Copyright (c) Rajeesh K Nambiar" msgstr "പകര്‍പ്പവകാശം (c) രജീഷ് കെ നമ്പ്യാര്‍" -#: chathans.py:191 +#: chathans.py:259 msgid "Chathans is licensed under GNU GPL version 3" -msgstr "ചാത്തന്‍സ് ഗ്നു GPLന്റെ മൂന്നാം പതിപ്പിനാല്‍ സംരക്ഷിക്കപ്പെട്ടിരിക്കുന്നു" +msgstr "ചാത്തന്‍സ് ഗ്നു ജിപിഎല്‍ മൂന്നാം പതിപ്പു പ്രകാരം സംരക്ഷിക്കപ്പെട്ടിരിക്കുന്നു" -#: chathans.py:203 +#: chathans.py:271 msgid "Do you really want to Quit?" -msgstr "പുറത്തു കടക്കണമെന്ന് താങ്കള്‍ക്ക് തീര്‍ച്ചയാണോ?" - +msgstr "പുറത്ത് കടക്കണമെന്ന് താങ്കള്‍ക്ക് തീര്‍ച്ചയാണോ?" diff --git a/pychathans/po/chathans.pot b/pychathans/po/chathans.pot index 7dcb80f..b747d0b 100644 --- a/pychathans/po/chathans.pot +++ b/pychathans/po/chathans.pot @@ -1,14 +1,14 @@ -# Chathans Localization template file. -# Copyright (c) 2009 Rajeesh K Nambiar -# This file is distributed under the same license as Chathans package. -# Rajeesh K Nambiar , 2009. +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-01-24 14:26+0530\n" +"POT-Creation-Date: 2009-02-01 10:21+0530\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,93 +16,105 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: chathans.py:29 +#: chathans.py:30 msgid "Chathans requires PyGTK" msgstr "" -#: chathans.py:36 -msgid "Chathans require Payyans" +#: chathans.py:37 +msgid "Chathans requires Payyans" msgstr "" -#: chathans.py:45 +#: chathans.py:46 msgid "Chathans" msgstr "" -#: chathans.py:69 +#: chathans.py:70 msgid "ASCII File : " msgstr "" -#: chathans.py:70 +#: chathans.py:71 msgid "Mapping File : " msgstr "" -#: chathans.py:71 +#: chathans.py:72 msgid "Unicode File : " msgstr "" -#: chathans.py:74 -msgid "Select the ASCII File (.txt,.pdf)" +#: chathans.py:80 +msgid "Select the ASCII-Unicode Mapping File" msgstr "" -#: chathans.py:75 -msgid "Select the ASCII-Unicode Mapping File" +#: chathans.py:84 +msgid "ASCII-to-Unicode" msgstr "" -#: chathans.py:76 -msgid "Select Output Unicode File" +#: chathans.py:85 +msgid "Unicode-to-ASCII" msgstr "" -#: chathans.py:83 +#: chathans.py:92 msgid "Convert" msgstr "" -#: chathans.py:85 +#: chathans.py:94 msgid "Quit" msgstr "" -#: chathans.py:87 +#: chathans.py:96 msgid "About" msgstr "" -#: chathans.py:149 -msgid "Please select both ASCII file and Mapping file" +#: chathans.py:153 +msgid "Select the ASCII File (.txt,.pdf)" +msgstr "" + +#: chathans.py:179 +msgid "Select the Unicode File" +msgstr "" + +#: chathans.py:207 +msgid "Please select both Input file and Mapping file" +msgstr "" + +#: chathans.py:229 +msgid "Coversion Done - Unicode file : " msgstr "" -#: chathans.py:163 -msgid "Coversion Done - Unicode file :" +#: chathans.py:231 +msgid "Conversion Done - ASCII file : " msgstr "" -#: chathans.py:165 +#: chathans.py:233 msgid "Could not find the pdftotext utility. Exiting..." msgstr "" -#: chathans.py:167 +#: chathans.py:235 msgid "Syntax Error in Mapping file. Exiting..." msgstr "" -#: chathans.py:182 +#: chathans.py:250 msgid "Chathans: Rajeesh K Nambiar " msgstr "" -#: chathans.py:183 +#: chathans.py:251 msgid "" "Payyans : Santhosh Thottingal, Nishan Naseer,\n" "\t\t Manu S Madhav, Rajeesh K Nambiar" msgstr "" -#: chathans.py:185 +#: chathans.py:253 msgid "" "Chathans is an easy to use GUI frontend to Payyans ASCII<->Unicode Converter" msgstr "" -#: chathans.py:190 +#: chathans.py:258 msgid "Copyright (c) Rajeesh K Nambiar" msgstr "" -#: chathans.py:191 +#: chathans.py:259 msgid "Chathans is licensed under GNU GPL version 3" msgstr "" -#: chathans.py:203 +#: chathans.py:271 msgid "Do you really want to Quit?" msgstr "" -- cgit From a8d3aa77b0bbf70b4230752da9ff0c4ec57730ee Mon Sep 17 00:00:00 2001 From: Rajeesh K Nambiar Date: Sun, 1 Feb 2009 19:11:25 +0530 Subject: Chathans: Show filenames in ASCII/Unicode file chooser buttons --- pychathans/chathans.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pychathans') diff --git a/pychathans/chathans.py b/pychathans/chathans.py index dc90840..ebc6b2a 100755 --- a/pychathans/chathans.py +++ b/pychathans/chathans.py @@ -168,8 +168,10 @@ class Chathans (gtk.Window): if response == gtk.RESPONSE_ACCEPT: if in_data == "a": self.AsciiFile = dialog.get_filename() + self.ascii_btn.set_label(os.path.basename(self.AsciiFile)) else: self.UnicodeFile = dialog.get_filename() + self.unicode_btn.set_label(os.path.basename(self.UnicodeFile)) def __choose_unicode_file(self, event): if self.a2u_radio.get_active() == True: -- cgit From 3d50a60f763b88c4a9c39be748652a2162ddbc5a Mon Sep 17 00:00:00 2001 From: Rajeesh K Nambiar Date: Sun, 1 Feb 2009 19:43:24 +0530 Subject: Chathans: Add install script --- pychathans/install.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 pychathans/install.sh (limited to 'pychathans') diff --git a/pychathans/install.sh b/pychathans/install.sh new file mode 100755 index 0000000..ffb855f --- /dev/null +++ b/pychathans/install.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# +# Copyright (c) 2009 Rajeesh K Nambiar +# This program is a free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +if [ $UID -ne 0 ]; then + echo "You need to be root to install Chathans" + exit 1 +fi + +install -m 0755 chathans.py /usr/bin/chathans +install -m 0644 chathans.desktop /usr/share/applications/chathans.desktop +for lc in po/chathans-*.po; do + mo_file=po/`basename ${lc} .po`.mo + msgfmt -o ${mo_file} ${lc} + _lang=`echo ${lc} | cut -d - -f2 | cut -d . -f1` + mkdir -p /usr/share/locale/${_lang}/LC_MESSAGES/ + install -m 0644 ${mo_file} /usr/share/locale/${_lang}/LC_MESSAGES/chathans.mo +done +echo "Installation complete" +exit 0 -- cgit From fe95fb9d0ec4a610867629799ed252620937f36a Mon Sep 17 00:00:00 2001 From: Rajeesh K Nambiar Date: Mon, 2 Feb 2009 15:07:56 +0530 Subject: Chathans: cleanup README file --- pychathans/doc/README | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pychathans') diff --git a/pychathans/doc/README b/pychathans/doc/README index 7fbfff1..1ce5408 100644 --- a/pychathans/doc/README +++ b/pychathans/doc/README @@ -4,9 +4,9 @@ Chathans Chathans is a GUI for the ASCII to Unicode converter, Payyans. It is written in PyGTK. Both the names, Payyans and Chathans are chosen as a tribute to two of the most famous characters -created by renowned Malayalam author V.K.N +by renowned Malayalam author V.K.N Chathans is developed by Rajeesh K Nambiar Swathanthra Malayalam Computing -Patches and Bug Reports are alwyas welcome. +Patches and Bug Reports are always welcome. -- cgit From 64150dcd5fd28967bafaace77489bf356cf325f8 Mon Sep 17 00:00:00 2001 From: Santhosh Thottingal Date: Tue, 3 Feb 2009 22:54:41 +0530 Subject: charset=UTF-8 in po file --- pychathans/po/chathans-ml.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pychathans') diff --git a/pychathans/po/chathans-ml.po b/pychathans/po/chathans-ml.po index e96e0dd..00d02e7 100644 --- a/pychathans/po/chathans-ml.po +++ b/pychathans/po/chathans-ml.po @@ -13,7 +13,7 @@ msgstr "" "Last-Translator: Rajeesh K Nambiar \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: chathans.py:30 -- cgit