summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pychathans/chathans.desktop12
-rwxr-xr-xpychathans/chathans.py61
-rw-r--r--pychathans/po/chathans-ml.po109
-rw-r--r--pychathans/po/chathans.pot108
4 files changed, 266 insertions, 24 deletions
diff --git a/pychathans/chathans.desktop b/pychathans/chathans.desktop
new file mode 100644
index 0000000..6344e5b
--- /dev/null
+++ b/pychathans/chathans.desktop
@@ -0,0 +1,12 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Chathans
+Name[ml]=ചാത്തന്‍സ് പരിവര്‍ത്തകന്‍
+Comment=Converts Malayalam ASCII text/pdf files to Unicode
+Comment[ml]=ആസ്കി ടെക്സ്റ്റ്/പി.ഡി.എഫ് ഫയലുകള്‍ യൂനികോഡിലേക്ക് മാറ്റുക
+Exec=chathans
+Terminal=false
+Type=Application
+StartupNotify=true
+Icon=user_icon
+Categories=Applications;Utility;
diff --git a/pychathans/chathans.py b/pychathans/chathans.py
index 4738fe7..a52192c 100755
--- a/pychathans/chathans.py
+++ b/pychathans/chathans.py
@@ -19,25 +19,35 @@
import os
import sys
import string
+import locale
+import gettext
+from gettext import gettext as _
try:
import gtk
except ImportError:
''' ചാത്തന്‍സിന് കള്‍സില്ലെന്നോ? '''
- print "Chathans requires PyGTK"
+ print _("Chathans requires PyGTK")
raise SystemExit
try:
from payyans import Payyans
except ImportError:
''' ഹൈയ്, പയ്യന്റെ ദുര്‍ജ്ജനസംസര്‍ഗ്ഗമില്ലാതെ നോം സാധനം തൊടാറില്ല! '''
- print "Chathans require Payyans"
+ print _("Chathans require Payyans")
raise SystemExit
-name = "Chathans"
-version = "0.2"
+
+PACKAGE = "chathans"
+gettext.bindtextdomain(PACKAGE, sys.prefix+"/share/locale/")
+gettext.textdomain(PACKAGE)
+#_ = gettext.gettext
+
+name = _("Chathans")
+version = "0.3"
title = name + " " + version
+
class Chathans (gtk.Window):
''' ചാത്തന്‍സ് അഥവാ സര്‍ ചാത്തു. വിക്ടോറിയാ രാജ്ഞിയില്‍ നിന്നും നേരിട്ട് പ്രഭുത്വം ! '''
def __init__(self):
@@ -45,10 +55,11 @@ class Chathans (gtk.Window):
self.MappingFile = None
self.UnicodeFile = None
self.PdfFile = None
+
self.__init_gui()
def __init_gui(self):
- ''' പൂമുഖം തുറന്ന്, ദര്‍ശനം നല്‍കാം... '''
+ ''' പൂമുഖം തുറന്ന്, ദര്‍ശനം നല്‍കാം... '''
gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL)
self.set_title(title)
self.set_default_size(340, 160)
@@ -56,25 +67,25 @@ class Chathans (gtk.Window):
self.connect("destroy", self.__quit)
# ലേബലടിക്ക്.
- ascii_lbl = gtk.Label("ASCII File : ")
- mapping_lbl = gtk.Label("Mapping File : ")
- unicode_lbl = gtk.Label("Unicode File : ")
+ ascii_lbl = gtk.Label(_("ASCII File : "))
+ mapping_lbl = gtk.Label(_("Mapping File : "))
+ unicode_lbl = gtk.Label(_("Unicode File : "))
# പ്രമാണോം പത്രോം ആധാരോം എടുക്ക്വാ..
- 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")
+ 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"))
# മാപ്പ്, സാധാരണ എവിടെ കിട്ടും? അല്ല, എവിടെ കിട്ടും?
mapping_dir = sys.prefix + "/share/payyans/maps/"
mapping_btn.set_current_folder(mapping_dir)
# Define the Actions. Lets get some action, baby!
- convert_btn = gtk.Button("Convert", gtk.STOCK_CONVERT)
+ convert_btn = gtk.Button(_("Convert"), gtk.STOCK_CONVERT)
convert_btn.connect("clicked", self.__convert_file)
- cancel_btn = gtk.Button("Quit", gtk.STOCK_QUIT)
+ cancel_btn = gtk.Button(_("Quit"), gtk.STOCK_QUIT)
cancel_btn.connect("clicked", self.__quit)
- about_btn = gtk.Button("About", gtk.STOCK_ABOUT)
+ about_btn = gtk.Button(_("About"), gtk.STOCK_ABOUT)
about_btn.connect("clicked", self.__show_about)
# Add File Filter for ASCII input file. അരിപ്പ!
@@ -136,7 +147,7 @@ class Chathans (gtk.Window):
gtk.DIALOG_MODAL,
gtk.MESSAGE_INFO,
gtk.BUTTONS_OK,
- "Please select both ASCII file and Mapping file")
+ _("Please select both ASCII file and Mapping file"))
dlg.run()
dlg.destroy()
return
@@ -150,11 +161,11 @@ class Chathans (gtk.Window):
status = payyan.ascii2unicode()
print status
if status == None:
- msg = "Coversion Done - Unicode file :" + self.UnicodeFile
+ msg = _("Coversion Done - Unicode file :") + self.UnicodeFile
if status == 1:
- msg = "Could not find the pdftotext utility. Exiting..."
+ msg = _("Could not find the pdftotext utility. Exiting...")
if status == 2:
- msg = "Syntax Error in Mapping file. Exiting..."
+ msg = _("Syntax Error in Mapping file. Exiting...")
# കത്തിച്ചു കഴിഞ്ഞു.
dlg = gtk.MessageDialog(self.get_toplevel(),
gtk.DIALOG_MODAL,
@@ -169,14 +180,16 @@ class Chathans (gtk.Window):
def __show_about(self, event):
''' അധികപ്രസംഗം !!! '''
dlg = gtk.AboutDialog()
+ autxt1 = _("Chathans: Rajeesh K Nambiar <rajeeshknambiar@gmail.com>")
+ autxt2 = _("Payyans : Santhosh Thottingal, Nishan Naseer,\n\t\t Manu S Madhav, Rajeesh K Nambiar")
+ authors = ["\n" + autxt1 + "\n\n" + autxt2]
+ comments= _("Chathans is an easy to use GUI frontend to Payyans ASCII<->Unicode Converter")
dlg.set_name(name)
dlg.set_version(version)
- autxt1 = "Chathans frontend : Rajeesh K Nambiar <rajeeshknambiar@gmail.com>"
- autxt2 = "Payyans : Santhosh Thottingal, Nishan Naseer, Manu S Madhav"
- authors = ["\n" + autxt1 + "\n" + autxt2]
dlg.set_authors(authors)
- dlg.set_copyright("Copyright (c) Rajeesh K Nambiar")
- dlg.set_license("Licensed under GNU GPL version 3")
+ dlg.set_comments(comments)
+ dlg.set_copyright(_("Copyright (c) Rajeesh K Nambiar"))
+ dlg.set_license(_("Chathans is licensed under GNU GPL version 3"))
dlg.set_website("http://smc.org.in/Payyans")
dlg.run()
@@ -188,7 +201,7 @@ class Chathans (gtk.Window):
gtk.DIALOG_MODAL,
gtk.MESSAGE_QUESTION,
gtk.BUTTONS_YES_NO,
- "Do you really want to Quit?")
+ _("Do you really want to Quit?"))
if ( dlg.run() == gtk.RESPONSE_YES ):
dlg.destroy()
gtk.main_quit()
diff --git a/pychathans/po/chathans-ml.po b/pychathans/po/chathans-ml.po
new file mode 100644
index 0000000..5a72472
--- /dev/null
+++ b/pychathans/po/chathans-ml.po
@@ -0,0 +1,109 @@
+# Chathans Malayalam Localization file.
+# Copyright (C) 2009 Rajeesh K Nambiar
+# This file is distributed under the same license as Chathans package.
+# Rajeesh K Nambiar <rajeeshknambiar@gmail.com>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 0.2\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"
+"Last-Translator: Rajeesh K Nambiar <rajeeshknambiar@gmail.com>\n"
+"Language-Team: ml\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: chathans.py:29
+msgid "Chathans requires PyGTK"
+msgstr "ചാത്തന്‍സിന് PyGTK ആവശ്യമാണ്"
+
+#: chathans.py:36
+msgid "Chathans require Payyans"
+msgstr "ചാത്തന്‍സിന് പയ്യന്‍സ് ആവശ്യമാണ്"
+
+#: chathans.py:45
+msgid "Chathans"
+msgstr "ചാത്തന്‍സ്"
+
+#: chathans.py:69
+msgid "ASCII File : "
+msgstr "ആസ്കി ഫയല്‍"
+
+#: chathans.py:70
+msgid "Mapping File : "
+msgstr "മാപ്പിങ്ങ് ഫയല്‍"
+
+#: chathans.py:71
+msgid "Unicode File : "
+msgstr "യൂണിക്കോഡ് ഫയല്‍"
+
+#: chathans.py:74
+msgid "Select the ASCII File (.txt,.pdf)"
+msgstr "ആസ്കി ഫയല്‍ തിരഞ്ഞെടുക്കൂ"
+
+#: chathans.py:75
+msgid "Select the ASCII-Unicode Mapping File"
+msgstr "ആസ്കി-യൂണിക്കോഡ് മാപ്പിങ്ങ് ഫയല്‍ തിരഞ്ഞെടുക്കൂ"
+
+#: chathans.py:76
+msgid "Select Output Unicode File"
+msgstr "ഉണ്ടാക്കേണ്ട യൂണീക്കോഡ് ഫയല്‍ തിരഞ്ഞെടുക്കൂ"
+
+#: chathans.py:83
+msgid "Convert"
+msgstr "പരിവര്‍ത്തനം ചെയ്യുക"
+
+#: chathans.py:85
+msgid "Quit"
+msgstr "പുറത്തുകടക്കുക"
+
+#: chathans.py:87
+msgid "About"
+msgstr "സംബന്ധിച്ച്"
+
+#: chathans.py:149
+msgid "Please select both ASCII file and Mapping file"
+msgstr "ദയവായി ആസ്കി ഫയലും മാപ്പിങ്ങ് ഫയലും തിരഞ്ഞെടുക്കുക"
+
+#: chathans.py:163
+msgid "Coversion Done - Unicode file :"
+msgstr "പരിവര്‍ത്തനം ചെയ്തു കഴിഞ്ഞു - യൂണിക്കോഡ് ഫയല്‍ :"
+
+#: chathans.py:165
+msgid "Could not find the pdftotext utility. Exiting..."
+msgstr "pdftotext ഉപാധി കണ്ടെത്താന്‍ കഴിഞ്ഞില്ല. നിര്‍ത്തുന്നു..."
+
+#: chathans.py:167
+msgid "Syntax Error in Mapping file. Exiting..."
+msgstr "മാപ്പിങ്ങ് ഫയലില്‍ വ്യാകരണ പിശകുണ്ട്. നിര്‍ത്തുന്നു..."
+
+#: chathans.py:182
+msgid "Chathans: Rajeesh K Nambiar <rajeeshknambiar@gmail.com>"
+msgstr "ചാത്തന്‍സ്: രജീഷ് കെ നമ്പ്യാര്‍ <rajeeshknambiar@gmail.com>"
+
+#: chathans.py:183
+msgid ""
+"Payyans : Santhosh Thottingal, Nishan Naseer,\n"
+"\t\t Manu S Madhav, Rajeesh K Nambiar"
+msgstr ""
+"പയ്യന്‍സ് : സന്തോഷ് തോട്ടിങ്ങല്‍, നിഷാന്‍ നസീര്‍,\n"
+"\t\t മനു എസ് മാധവ്, രജീഷ് കെ നമ്പ്യാര്‍"
+
+#: chathans.py:185
+msgid "Chathans is an easy to use GUI frontend to Payyans ASCII<->Unicode Converter"
+msgstr "ചാത്തന്‍സ് ഉപയോഗിക്കാന്‍ എളുപ്പമുള്ള, പയ്യന്‍സ് എന്ന ആസ്കി<->യൂണിക്കോഡ് പരിവര്‍ത്തകനു വേണ്ടിയുള്ള ഒരു അഭിമുഖീകരണ ഉപാധിയാണ്."
+
+#: chathans.py:190
+msgid "Copyright (c) Rajeesh K Nambiar"
+msgstr "പകര്‍പ്പവകാശം (c) രജീഷ് കെ നമ്പ്യാര്‍"
+
+#: chathans.py:191
+msgid "Chathans is licensed under GNU GPL version 3"
+msgstr "ചാത്തന്‍സ് ഗ്നു GPLന്റെ മൂന്നാം പതിപ്പിനാല്‍ സംരക്ഷിക്കപ്പെട്ടിരിക്കുന്നു"
+
+#: chathans.py:203
+msgid "Do you really want to Quit?"
+msgstr "പുറത്തു കടക്കണമെന്ന് താങ്കള്‍ക്ക് തീര്‍ച്ചയാണോ?"
+
diff --git a/pychathans/po/chathans.pot b/pychathans/po/chathans.pot
new file mode 100644
index 0000000..7dcb80f
--- /dev/null
+++ b/pychathans/po/chathans.pot
@@ -0,0 +1,108 @@
+# Chathans Localization template file.
+# Copyright (c) 2009 Rajeesh K Nambiar
+# This file is distributed under the same license as Chathans package.
+# Rajeesh K Nambiar <rajeeshknambiar@gmail.com>, 2009.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-01-24 14:26+0530\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: chathans.py:29
+msgid "Chathans requires PyGTK"
+msgstr ""
+
+#: chathans.py:36
+msgid "Chathans require Payyans"
+msgstr ""
+
+#: chathans.py:45
+msgid "Chathans"
+msgstr ""
+
+#: chathans.py:69
+msgid "ASCII File : "
+msgstr ""
+
+#: chathans.py:70
+msgid "Mapping File : "
+msgstr ""
+
+#: chathans.py:71
+msgid "Unicode File : "
+msgstr ""
+
+#: chathans.py:74
+msgid "Select the ASCII File (.txt,.pdf)"
+msgstr ""
+
+#: chathans.py:75
+msgid "Select the ASCII-Unicode Mapping File"
+msgstr ""
+
+#: chathans.py:76
+msgid "Select Output Unicode File"
+msgstr ""
+
+#: chathans.py:83
+msgid "Convert"
+msgstr ""
+
+#: chathans.py:85
+msgid "Quit"
+msgstr ""
+
+#: chathans.py:87
+msgid "About"
+msgstr ""
+
+#: chathans.py:149
+msgid "Please select both ASCII file and Mapping file"
+msgstr ""
+
+#: chathans.py:163
+msgid "Coversion Done - Unicode file :"
+msgstr ""
+
+#: chathans.py:165
+msgid "Could not find the pdftotext utility. Exiting..."
+msgstr ""
+
+#: chathans.py:167
+msgid "Syntax Error in Mapping file. Exiting..."
+msgstr ""
+
+#: chathans.py:182
+msgid "Chathans: Rajeesh K Nambiar <rajeeshknambiar@gmail.com>"
+msgstr ""
+
+#: chathans.py:183
+msgid ""
+"Payyans : Santhosh Thottingal, Nishan Naseer,\n"
+"\t\t Manu S Madhav, Rajeesh K Nambiar"
+msgstr ""
+
+#: chathans.py:185
+msgid ""
+"Chathans is an easy to use GUI frontend to Payyans ASCII<->Unicode Converter"
+msgstr ""
+
+#: chathans.py:190
+msgid "Copyright (c) Rajeesh K Nambiar"
+msgstr ""
+
+#: chathans.py:191
+msgid "Chathans is licensed under GNU GPL version 3"
+msgstr ""
+
+#: chathans.py:203
+msgid "Do you really want to Quit?"
+msgstr ""