Improving localization
[findit] / src / main.py
index fb86578..cd1bafb 100755 (executable)
@@ -6,6 +6,7 @@
 import sys
 
 from config import Config
+from misc import _
 
 __progname__ = 'FindIT'
 __version__ = '0.2.0'
@@ -39,18 +40,6 @@ under the terms of the GNU General Public License\nas published by the Free \
 Software Foundation; either version 3\nof the License, or (at your option) \
 any later version.'
 
-        import gettext
-        try:
-            # Meaning ru/LC_MESSAGES/program.mo in current dir (sys.path[0])
-            # For /usr/share/locale uncomment next string:
-            #LANGRU = gettext.translation('findit')
-            LANGRU = gettext.translation('findit', sys.path[0], languages=['ru'])
-            LANGRU.install()
-        except IOError:
-            # Comment out before use pygettext
-            def _(text): 
-                return text
-
 #==============================================================================
 
 class Cli_Presentation(object):