Skip to content

Commit

Permalink
fix for nvaccess#7789 add apropriate messages when interacting with e…
Browse files Browse the repository at this point in the history
…mpty status bars
  • Loading branch information
lukaszgo1 committed Jul 2, 2018
1 parent c1a3b0b commit 322208a
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions source/globalCommands.py
Expand Up @@ -3,7 +3,7 @@
#A part of NonVisual Desktop Access (NVDA)
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
#Copyright (C) 2006-2018 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee, Leonard de Ruijter, Derek Riemer, Babbage B.V., Davy Kager, Ethan Holliger
#Copyright (C) 2006-2018 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee, Leonard de Ruijter, Derek Riemer, Babbage B.V., Davy Kager, Ethan Holliger, Łukasz Golonka

import time
import itertools
Expand Down Expand Up @@ -1374,11 +1374,23 @@ def script_reportStatusLine(self,gesture):
ui.message(_("No status line found"))
return
if scriptHandler.getLastScriptRepeatCount()==0:
ui.message(text)
if text == '':
# Translators: Reported when status line exist, but is empty.
ui.message(_("no status bar information"))
else:
ui.message(text)
elif scriptHandler.getLastScriptRepeatCount()==1:
speech.speakSpelling(text)
if text == '':
# Translators: Reported when status line exist, but is empty.
ui.message(_("no status bar information"))
else:
speech.speakSpelling(text)
else:
if api.copyToClip(text):
if text == '':
# Translators: Reported when user attempts to copy content of the empty status line.
ui.message(_("unable to copy status bar content to clipboard"))
else:
if api.copyToClip(text):
# Translators: The message presented when the status bar is copied to the clipboard.
ui.message(_("%s copied to clipboard")%text)
# Translators: Input help mode message for report status line text command.
Expand Down

0 comments on commit 322208a

Please sign in to comment.