mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-23 05:01:24 -05:00
use the translated() function in onionshare_gui
This commit is contained in:
parent
eb69586b12
commit
10f8600e54
@ -13,7 +13,7 @@ try:
|
||||
except ImportError:
|
||||
sys.path.append(os.path.abspath(onionshare_gui_dir+"/.."))
|
||||
import onionshare
|
||||
|
||||
from onionshare import translated
|
||||
import webapp
|
||||
|
||||
window_icon = None
|
||||
@ -63,7 +63,7 @@ def select_file(strings):
|
||||
if onionshare.get_platform() == 'Tails':
|
||||
args['directory'] = '/home/amnesia'
|
||||
|
||||
filename = QFileDialog.getOpenFileName(caption=strings['choose_file'], options=QFileDialog.ReadOnly, **args)
|
||||
filename = QFileDialog.getOpenFileName(caption=translated('choose_file'), options=QFileDialog.ReadOnly, **args)
|
||||
if not filename:
|
||||
return False, False
|
||||
|
||||
@ -71,7 +71,7 @@ def select_file(strings):
|
||||
|
||||
# validate filename
|
||||
if not os.path.isfile(filename):
|
||||
alert(strings["not_a_file"].format(filename), QMessageBox.Warning)
|
||||
alert(translated("not_a_file").format(filename), QMessageBox.Warning)
|
||||
return False, False
|
||||
|
||||
filename = os.path.abspath(filename)
|
||||
|
Loading…
Reference in New Issue
Block a user