Repository: nvaccess/nvda

Issue:
browseMode.py has no translator comment on line 50
Pardon me if I am overstepping what types of issues I raise here, feel free to tell me to shut up if I shouldn't raise issues like this in the future.
In browseMode.py line 50, there is the string ui.message(_("focus mode"))
is there a reason this doesn't have a translator's comment?



Discussion:
Totally valid issue, though for trivial stuff like this, feel free to just submit a pull request with a fix if you can.

It should have a translators comment, yes. It doesn't because that string (moved from another file) pre-dates our requirement for everything to have translators comments.

Hi, and when you do submit the pull request, please reference ticket 1410 also. Thanks.

From: James Teh [mailto:notifications@github.com] 
Sent: Friday, March 18, 2016 1:17 PM
To: nvaccess/nvda nvda@noreply.github.com
Subject: Re: [nvda] browseMode.py has no translator comment on line 50 (#5822)

Totally valid issue, though for trivial stuff like this, feel free to just submit a pull request with a fix if you can.

It should have a translators comment, yes. It doesn't because that string (moved from another file) pre-dates our requirement for everything to have translators comments.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub https://github.com/nvaccess/nvda/issues/5822#issuecomment-198525660 

@derekriemer were you going to submit a PR for this?
some day

Resolving patch:
diff --git a/source/browseMode.py b/source/browseMode.py
--- a/source/browseMode.py
+++ b/source/browseMode.py
@@ -48,8 +48,11 @@ def reportPassThrough(treeInterceptor,onlyIfChanged=True):
 			nvwave.playWaveFile(sound)
 		else:
 			if treeInterceptor.passThrough:
+				# Translators: The mode to interact with controls in documents
 				ui.message(_("Focus mode"))
 			else:
+				# Translators: The mode that presents text in a flat representation
+				# that can be navigated with the cursor keys like in a text document
 				ui.message(_("Browse mode"))
 		reportPassThrough.last = treeInterceptor.passThrough
 reportPassThrough.last = False
@@ -1565,8 +1568,8 @@ def script_moveToStartOfContainer(self,gesture):
 		info.expand(textInfos.UNIT_CHARACTER)
 		container=self.getEnclosingContainerRange(info)
 		if not container:
-			# Translators: Reported when the user attempts to move to the start or end of a container (list, table, etc.) 
-			# But there is no container. 
+			# Translators: Reported when the user attempts to move to the start or end of a container
+			# (list, table, etc.) but there is no container. 
 			ui.message(_("Not in a container"))
 			return
 		container.collapse()
@@ -1583,6 +1586,8 @@ def script_movePastEndOfContainer(self,gesture):
 		info.expand(textInfos.UNIT_CHARACTER)
 		container=self.getEnclosingContainerRange(info)
 		if not container:
+			# Translators: Reported when the user attempts to move to the start or end of a container
+			# (list, table, etc.) but there is no container. 
 			ui.message(_("Not in a container"))
 			return
 		container.collapse(end=True)


Test patch:
diff --git a/tests/checkPot.py b/tests/checkPot.py
--- a/tests/checkPot.py
+++ b/tests/checkPot.py
@@ -16,7 +16,6 @@
 # Note that checkPot will fail with an unexpected success
 # if a translator comment is found for one of these messages.
 EXPECTED_MESSAGES_WITHOUT_COMMENTS = {
-	'Focus mode',
 	'%s landmark',
 	'border',
 	'filler',