Skip to content

Commit

Permalink
Fix up of: Initial support for reporting revisions (track changes) in…
Browse files Browse the repository at this point in the history
… Microsoft Word. Re nvaccess#1670.
  • Loading branch information
JulienCochuyt committed Sep 22, 2019
1 parent 0e4bb4a commit 2db5f4e
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions source/speech/__init__.py
Expand Up @@ -1495,11 +1495,13 @@ def getFormatFieldSpeech(attrs,attrsCache=None,formatConfig=None,reason=None,uni
textList.append(text)
revision=attrs.get("revision")
oldRevision=attrsCache.get("revision") if attrsCache is not None else None
if (revision or oldRevision is not None) and revision!=oldRevision:
# Translators: Reported when text is revised.
text=(_("revised %s"%revision) if revision
if (revision or oldRevision is not None) and revision != oldRevision:
if revision:
# Translators: Reported when text is revised.
text = _("revised %s") % revision
else:
# Translators: Reported when text is not revised.
else _("no revised %s")%oldRevision)
text = _("no revised %s") % oldRevision
textList.append(text)
if formatConfig["reportEmphasis"]:
# marked text
Expand Down

0 comments on commit 2db5f4e

Please sign in to comment.