[orca] Preface the page summary with "Page has"
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Preface the page summary with "Page has"
- Date: Mon, 15 Feb 2016 06:49:38 +0000 (UTC)
commit 837d87e28dd5f37ca997b1822fb9dbf7a671f3b0
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Mon Feb 15 01:48:54 2016 -0500
Preface the page summary with "Page has"
src/orca/messages.py | 7 +++++++
src/orca/scripts/web/script_utilities.py | 4 +++-
2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/messages.py b/src/orca/messages.py
index c7e5f6f..2e9cf80 100644
--- a/src/orca/messages.py
+++ b/src/orca/messages.py
@@ -1554,6 +1554,13 @@ PAGE_LOADING_END = _("Finished loading.")
# object which has just finished loading (most likely the page's title).
PAGE_LOADING_END_NAMED = _("Finished loading %s.")
+# Translators: When the user loads a new web page, they can optionally have Orca
+# automatically summarize details about the page, such as the number of elements
+# (landmarks, forms, links, tables, etc.). The following string precedes the
+# presentation of the summary. The string substitution is a list of items, such
+# as "10 headings, 1 form, 52 links".
+PAGE_SUMMARY_PREFIX = _("Page has %s.")
+
# Translators: when the user selects (highlights) or unselects text in a
# document, Orca will speak information about what they have selected or
# unselected. This message is presented when the user selects from the
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 406283c..622a3a3 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -2906,8 +2906,10 @@ class Utilities(script_utilities.Utilities):
result.append(messages.visitedLinkCount(counts.get('visitedLinks', 0), onlyIfFound))
result.append(messages.unvisitedLinkCount(counts.get('unvisitedLinks', 0), onlyIfFound))
result = filter(lambda x: x, result)
+ if not result:
+ return ""
- return ", ".join(result)
+ return messages.PAGE_SUMMARY_PREFIX % ", ".join(result)
def _getCtrlShiftSelectionsStrings(self):
"""Hacky and to-be-obsoleted method."""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]