mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-14 16:57:16 -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
|
The main() function implements all of the logic that the command-line version of
|
||||||
onionshare uses.
|
onionshare uses.
|
||||||
"""
|
"""
|
||||||
strings.load_strings()
|
strings.load_strings(helpers)
|
||||||
print(strings._('version_string').format(helpers.get_version()))
|
print(strings._('version_string').format(helpers.get_version()))
|
||||||
|
|
||||||
# onionshare CLI in OSX needs to change current working directory (#132)
|
# 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
|
import json, locale, os
|
||||||
|
|
||||||
from . import helpers
|
|
||||||
|
|
||||||
strings = {}
|
strings = {}
|
||||||
|
|
||||||
|
def load_strings(helpers, default="en"):
|
||||||
def load_strings(default="en"):
|
|
||||||
"""
|
"""
|
||||||
Loads translated strings and fallback to English
|
Loads translated strings and fallback to English
|
||||||
if the translation does not exist.
|
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.
|
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()))
|
print(strings._('version_string').format(helpers.get_version()))
|
||||||
|
|
||||||
# start the Qt app
|
# start the Qt app
|
||||||
|
Loading…
Reference in New Issue
Block a user