diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2015-05-10 10:37:00 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2015-05-11 22:31:12 +0200 |
commit | dd98aa44a5084f0590645f5ee9565ab962e6c844 (patch) | |
tree | 8e16fbb20e969eadfea5ba2689e1de4539ffcf94 /src/config.py | |
parent | 861f5c4bbd775b091362766ecafeb7d1955aab2f (diff) | |
download | poezio-dd98aa44a5084f0590645f5ee9565ab962e6c844.tar.gz poezio-dd98aa44a5084f0590645f5ee9565ab962e6c844.tar.bz2 poezio-dd98aa44a5084f0590645f5ee9565ab962e6c844.tar.xz poezio-dd98aa44a5084f0590645f5ee9565ab962e6c844.zip |
Remove gettext support, as we don’t want to translate poezio, and it takes more than 1ms per call.
Diffstat (limited to 'src/config.py')
-rw-r--r-- | src/config.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/config.py b/src/config.py index 3a693be8..3ca53dd2 100644 --- a/src/config.py +++ b/src/config.py @@ -16,7 +16,6 @@ import logging.config import os import sys import pkg_resources -from gettext import gettext as _ from configparser import RawConfigParser, NoOptionError, NoSectionError from os import environ, makedirs, path, remove @@ -410,9 +409,9 @@ class Config(RawConfigParser): elif current.lower() == "true": value = "false" else: - return (_('Could not toggle option: %s.' - ' Current value is %s.') % - (option, current or _("empty")), + return ('Could not toggle option: %s.' + ' Current value is %s.' % + (option, current or "empty"), 'Warning') if self.has_section(section): RawConfigParser.set(self, section, option, value) @@ -420,7 +419,7 @@ class Config(RawConfigParser): self.add_section(section) RawConfigParser.set(self, section, option, value) if not self.write_in_file(section, option, value): - return (_('Unable to write in the config file'), 'Error') + return ('Unable to write in the config file', 'Error') return ("%s=%s" % (option, value), 'Info') def remove_and_save(self, option, section=DEFSECTION): @@ -430,8 +429,8 @@ class Config(RawConfigParser): if self.has_section(section): RawConfigParser.remove_option(self, section, option) if not self.remove_in_file(section, option): - return (_('Unable to save the config file'), 'Error') - return (_('Option %s deleted') % option, 'Info') + return ('Unable to save the config file', 'Error') + return ('Option %s deleted' % option, 'Info') def silent_set(self, option, value, section=DEFSECTION): """ |