Some renaming/cleanup in i18n tools.

This commit is contained in:
Bastien Montagne 2013-03-19 08:33:24 +00:00
parent dc3ce6db6a
commit fbbbb90af3
7 changed files with 11 additions and 9 deletions

@ -30,7 +30,7 @@ import re
import sys
# XXX Relative import does not work here when used from Blender...
from bl_i18n_utils import settings as i18n_settings, utils
from bl_i18n_utils import settings as settings_i18n, utils
import bpy
@ -43,10 +43,10 @@ filter_message = ignore_reg.match
def init_spell_check(settings, lang="en_US"):
try:
from bl_i18n_utils import spell_check_utils
return spell_check_utils.SpellChecker(settings, lang)
from bl_i18n_utils import utils_spell_check
return utils_spell_check.SpellChecker(settings, lang)
except Exception as e:
print("Failed to import spell_check_utils ({})".format(str(e)))
print("Failed to import utils_spell_check ({})".format(str(e)))
return None
@ -901,7 +901,7 @@ def main():
help="Override (some) default settings. Either a JSon file name, or a JSon string.")
args = parser.parse_args()
settings = i18n_settings.I18nSettings()
settings = settings_i18n.I18nSettings()
settings.from_json(args.settings)
if args.output:

@ -441,13 +441,13 @@ INTERN_PY_SYS_PATHS = ""
# Custom override settings must be one dir above i18n tools itself!
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
try:
from bl_i18n_override_settings import *
from bl_i18n_settings_override import *
except ImportError: # If no i18n_override_settings available, its no error!
pass
# Override with custom user settings, if available.
try:
from user_settings import *
from settings_user import *
except ImportError: # If no user_settings available, its no error!
pass

@ -31,7 +31,9 @@ import sys
import tempfile
#import time
from bl_i18n_utils import settings, rtl_utils
from bl_i18n_utils import (settings,
utils_rtl,
)
import bpy
@ -402,7 +404,7 @@ class I18nMessages:
for k, m in self.msgs.items():
keys.append(k)
trans.append(m.msgstr)
trans = rtl_utils.log2vis(trans, self.settings)
trans = utils_rtl.log2vis(trans, self.settings)
for k, t in zip(keys, trans):
self.msgs[k].msgstr = t