mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-27 08:19:41 -05:00
Pass helpers into strings.load_strings instead of importing it, so fix issue with cx_Freeze in Windows
This commit is contained in:
parent
7e8b3e1750
commit
dbf4af02ac
@ -102,7 +102,7 @@ def main(cwd=None):
|
||||
The main() function implements all of the logic that the command-line version of
|
||||
onionshare uses.
|
||||
"""
|
||||
strings.load_strings()
|
||||
strings.load_strings(helpers)
|
||||
print(strings._('version_string').format(helpers.get_version()))
|
||||
|
||||
# onionshare CLI in OSX needs to change current working directory (#132)
|
||||
|
@ -19,12 +19,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
"""
|
||||
import json, locale, os
|
||||
|
||||
from . import helpers
|
||||
|
||||
strings = {}
|
||||
|
||||
|
||||
def load_strings(default="en"):
|
||||
def load_strings(helpers, default="en"):
|
||||
"""
|
||||
Loads translated strings and fallback to English
|
||||
if the translation does not exist.
|
||||
|
@ -284,7 +284,7 @@ def main():
|
||||
"""
|
||||
The main() function implements all of the logic that the GUI version of onionshare uses.
|
||||
"""
|
||||
strings.load_strings()
|
||||
strings.load_strings(helpers)
|
||||
print(strings._('version_string').format(helpers.get_version()))
|
||||
|
||||
# start the Qt app
|
||||
|
Loading…
Reference in New Issue
Block a user