Bitmessage/PyBitmessage — pull request #733 by digital-dreamer (2014-11-12 10:53:58+00:00)
Title: Fix #417 - bad relative path breaks translations

Problem: Translations don't work when user launches bitmessagemain.py from another directory, like “src/bimessagmain.py”.

This problem was caused by incorrect fallback to an empty string when _MEIPASS is not present. This happens when bitmessage is not running from a onefile executable. In that case, PyInstaller's variable _MEIPASS is not defined, and because empty string is chosen as root path, the path to translations can only work by accident - if user happens to be in that directory.

Solution: if _MEIPASS is not present, fall back to sys.path[0] (the location of bitmessagemain.py) so that it works in both modes.