[orca] Speak "-" as "minus" when used as an operator in MathML content
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Speak "-" as "minus" when used as an operator in MathML content
- Date: Fri, 3 Jul 2015 18:56:12 +0000 (UTC)
commit a7742e160de1dbf404bbc592abe3fa0408140560
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Fri Jul 3 14:54:57 2015 -0400
Speak "-" as "minus" when used as an operator in MathML content
src/orca/chnames.py | 12 ++++++++++--
src/orca/mathsymbols.py | 4 ++++
2 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/chnames.py b/src/orca/chnames.py
index 57df0e1..230112e 100644
--- a/src/orca/chnames.py
+++ b/src/orca/chnames.py
@@ -28,6 +28,7 @@ __copyright__ = "Copyright (c) 2005-2008 Sun Microsystems Inc."
__license__ = "LGPL"
from . import mathsymbols
+from . import orca_state
from .orca_i18n import _
# chnames is a dictionary where the keys represent a unicode character
@@ -806,7 +807,14 @@ def getCharacterName(character):
"""
mathName = mathsymbols.getCharacterName(character)
- if mathName:
+ charName = chnames.get(character)
+ if not (charName or mathName):
+ return character
+ if mathName and not charName:
+ return mathName
+ if charName and not mathName:
+ return charName
+ if orca_state.activeScript and orca_state.activeScript.utilities.isInMath():
return mathName
- return chnames.get(character, character)
+ return charName
diff --git a/src/orca/mathsymbols.py b/src/orca/mathsymbols.py
index dc0f633..db480ab 100644
--- a/src/orca/mathsymbols.py
+++ b/src/orca/mathsymbols.py
@@ -1260,6 +1260,10 @@ _arrows['\u2794'] = _("right-pointing arrow")
# Translators: this is the spoken representation for the character '➢' (U+27a2)
_arrows['\u27a2'] = _("right-pointing arrowhead")
+# Translators: this is the spoken word for the character '-' (U+002d) when used
+# as a MathML operator.
+_operators["\u002d"] = C_('math symbol', 'minus')
+
# Translators: this is the spoken representation for the character '∀' (U+2200)
_operators['\u2200'] = C_('math symbol', 'for all')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]