diff options
Diffstat (limited to 'scripts/lionbridge_import.py')
-rw-r--r-- | scripts/lionbridge_import.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/lionbridge_import.py b/scripts/lionbridge_import.py index 0c2c132216..83f53403ea 100644 --- a/scripts/lionbridge_import.py +++ b/scripts/lionbridge_import.py @@ -55,11 +55,13 @@ def destination_uranium() -> str: import UM except ImportError: relative_path = os.path.join(__file__, "..", "..", "..", "Uranium", "resources", "i18n", "uranium.pot") - print(os.path.abspath(relative_path)) - if os.path.exists(relative_path): - return os.path.abspath(relative_path) + absolute_path = os.path.abspath(relative_path) + if os.path.exists(absolute_path): + absolute_path = os.path.abspath(os.path.join(absolute_path, "..")) + print("Uranium is at:", absolute_path) + return absolute_path else: - raise Exception("Can't find Uranium. Please put UM on the PYTHONPATH or put the Uranium folder next to the Cura folder.") + raise Exception("Can't find Uranium. Please put UM on the PYTHONPATH or put the Uranium folder next to the Cura folder. Looked for: " + absolute_path) return os.path.abspath(os.path.join(UM.__file__, "..", "..", "resources", "i18n")) ## Merges translations from the source file into the destination file if they @@ -177,4 +179,4 @@ if __name__ == "__main__": argparser = argparse.ArgumentParser(description = "Import translation files from Lionbridge.") argparser.add_argument("source") args = argparser.parse_args() - lionbridge_import(args.source)
\ No newline at end of file + lionbridge_import(args.source) |