# -*-coding: utf-8 -*-
# vim: sw=4 ts=4 expandtab ai
+from misc import _
+
#==============================================================================
# class OutTable_Control(object):
from os.path import join, abspath, normcase, basename, isdir, getsize
from heapq import nlargest
-from misc import *
+from misc import size_hum_read, _
#==============================================================================
import sys
from config import Config
+from misc import _
__progname__ = 'FindIT'
__version__ = '0.2.0'
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):
if size < 1024**(i+1):
return unit % (size/1024.**i)
return '>1024 Tb'
+
+#==============================================================================
+
+import sys
+import gettext
+import os
+
+os.environ['LANGUAGE'] = 'ru' ###
+
+try:
+ # Meaning ru/LC_MESSAGES/findit.mo is in current dir (sys.path[0])
+ # For /usr/share/locale write `gettext.bindtextdomain('findit')`:
+ gettext.bindtextdomain('findit', sys.path[0])
+ gettext.textdomain('findit')
+ _ = gettext.gettext
+except IOError:
+ # Comment out before use pygettext
+ def _(text):
+ return text