mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-28 16:59:35 -05:00
Merge branch '846_mac_packaging' into 406_osx_sandbox
This commit is contained in:
commit
187b7887fd
@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>onionshare-gui</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.micahflee.onionshare</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>{VERSION}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>icon.icns</string>
|
||||
</dict>
|
||||
</plist>
|
@ -35,9 +35,9 @@ import subprocess
|
||||
import requests
|
||||
|
||||
def main():
|
||||
dmg_url = 'https://archive.torproject.org/tor-package-archive/torbrowser/8.0.1/TorBrowser-8.0.1-osx64_en-US.dmg'
|
||||
dmg_filename = 'TorBrowser-8.0.1-osx64_en-US.dmg'
|
||||
expected_dmg_sha256 = 'fb1be2a0f850a65bae38747c3abbf9061742c5d7799e1693405078aaf38d2b08'
|
||||
dmg_url = 'https://archive.torproject.org/tor-package-archive/torbrowser/8.0.4/TorBrowser-8.0.4-osx64_en-US.dmg'
|
||||
dmg_filename = 'TorBrowser-8.0.4-osx64_en-US.dmg'
|
||||
expected_dmg_sha256 = '44433ee2052cf3062e0dc29e640a6ae50db2775bc8939253f5f9d81614f2db07'
|
||||
|
||||
# Build paths
|
||||
root_path = os.path.dirname(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))))
|
||||
|
@ -112,7 +112,19 @@ class Settings(object):
|
||||
|
||||
# Choose the default locale based on the OS preference, and fall-back to English
|
||||
if self._settings['locale'] is None:
|
||||
default_locale = locale.getdefaultlocale()[0][:2]
|
||||
language_code, encoding = locale.getdefaultlocale()
|
||||
|
||||
# Default to English
|
||||
if not language_code:
|
||||
language_code = 'en_US'
|
||||
|
||||
if language_code == 'pt_PT' and language_code == 'pt_BR':
|
||||
# Portuguese locales include country code
|
||||
default_locale = language_code
|
||||
else:
|
||||
# All other locales cut off the country code
|
||||
default_locale = language_code[:2]
|
||||
|
||||
if default_locale not in self.available_locales:
|
||||
default_locale = 'en'
|
||||
self._settings['locale'] = default_locale
|
||||
|
Loading…
Reference in New Issue
Block a user