mirror of
https://github.com/onionshare/onionshare.git
synced 2025-05-07 17:05:16 -04:00
Merge pull request #62 from enotodden/master
Add new norwegian strings and fix unicode issues.
This commit is contained in:
commit
126200c9c1
3 changed files with 26 additions and 13 deletions
|
@ -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
|
||||
|
@ -61,7 +61,7 @@ def select_file(strings, filename=None):
|
|||
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
|
||||
|
||||
|
@ -69,7 +69,7 @@ def select_file(strings, filename=None):
|
|||
|
||||
# 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…
Add table
Add a link
Reference in a new issue