added checks so that missing LOCALEDIR won't prevent gramps from starting

svn: r15020
This commit is contained in:
Raphael Ackermann 2010-04-04 09:24:15 +00:00
parent 318ffc4060
commit d3494a9429

View File

@ -143,7 +143,7 @@ def setup_windows_gettext():
# 1. See if there is a intl.dll in Windows/system # 1. See if there is a intl.dll in Windows/system
os_path = os.environ['PATH'] os_path = os.environ['PATH']
intl_path = 'c:\\WINDOWS\\system\\intl.dll' intl_path = 'c:\\WINDOWS\\system\\intl.dll'
if os.path.isfile(intl_path): if os.path.isfile(intl_path) and not LOCALEDIR is None:
libintl = init_windows_gettext(intl_path) libintl = init_windows_gettext(intl_path)
# Now check for translation. # Now check for translation.
translated = test_trans(str2translate,libintl) translated = test_trans(str2translate,libintl)
@ -153,7 +153,7 @@ def setup_windows_gettext():
#2. See if there is a libintl-8.dll in the current path #2. See if there is a libintl-8.dll in the current path
intl_path = find_intl('\\libintl-8.dll') intl_path = find_intl('\\libintl-8.dll')
if intl_path: if intl_path and not LOCALEDIR is None:
libintl = init_windows_gettext(intl_path) libintl = init_windows_gettext(intl_path)
# Now check for translation. # Now check for translation.
translated = test_trans(str2translate,libintl) translated = test_trans(str2translate,libintl)
@ -163,7 +163,7 @@ def setup_windows_gettext():
#3. See if there is another intl.dll in current path #3. See if there is another intl.dll in current path
intl_path = find_intl('\\intl.dll') intl_path = find_intl('\\intl.dll')
if intl_path: if intl_path and not LOCALEDIR is None:
libintl = init_windows_gettext(intl_path) libintl = init_windows_gettext(intl_path)
# Now check for translation. # Now check for translation.
translated = test_trans(str2translate,libintl) translated = test_trans(str2translate,libintl)