From 08069790f80828e554af35d7e1082389613ff7ac Mon Sep 17 00:00:00 2001 From: Leonard de Ruijter Date: Mon, 4 Dec 2017 15:24:56 +0100 Subject: [PATCH 01/15] * Noi longer use liblouis pass1only by default * Update liblouis to 3.4.0 * Add new Lithuanian 6 dot braille table and rename the existing Lithuanian table to Lithuanian 8 dot in the interface --- include/liblouis | 2 +- readme.md | 2 +- source/brailleTables.py | 5 ++++- source/config/configSpec.py | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/include/liblouis b/include/liblouis index 1f0ae099831..695316a0a66 160000 --- a/include/liblouis +++ b/include/liblouis @@ -1 +1 @@ -Subproject commit 1f0ae099831401a7fe5ae240fe0d0a559a72ff04 +Subproject commit 695316a0a66b572c400ff39782606dd9a3a6a47a diff --git a/readme.md b/readme.md index 4429b68fd48..ceab39b6f48 100644 --- a/readme.md +++ b/readme.md @@ -62,7 +62,7 @@ For reference, the following dependencies are included in Git submodules: * [Sonic](https://github.com/waywardgeek/sonic), commit 4f8c1d11 * [IAccessible2](http://www.linuxfoundation.org/collaborate/workgroups/accessibility/iaccessible2), version 1.3 * [ConfigObj](http://www.voidspace.org.uk/python/configobj.html), version 4.6.0 -* [liblouis](http://www.liblouis.org/), version 3.3.0 +* [liblouis](http://www.liblouis.org/), version 3.4.0 * NVDA images and sounds * System dlls not present on many systems: mfc90.dll, msvcp90.dll, msvcr90.dll, Microsoft.VC90.CRT.manifest * [Adobe Acrobat accessibility interface, version XI](http://download.macromedia.com/pub/developer/acrobat/AcrobatAccess.zip) diff --git a/source/brailleTables.py b/source/brailleTables.py index 6b4fbdbb4b1..ec0ddd3653a 100644 --- a/source/brailleTables.py +++ b/source/brailleTables.py @@ -253,7 +253,10 @@ def listTables(): addTable("ks-in-g1.utb", _("Kashmiri grade 1")) # Translators: The name of a braille table displayed in the # braille settings dialog. -addTable("lt.ctb", _("Lithuanian")) +addTable("lt.ctb", _("Lithuanian 8 dot")) +# Translators: The name of a braille table displayed in the +# braille settings dialog. +addTable("lt-6dot.utb", _("Lithuanian 6 dot")) # Translators: The name of a braille table displayed in the # braille settings dialog. addTable("Lv-Lv-g1.utb", _("Latvian grade 1")) diff --git a/source/config/configSpec.py b/source/config/configSpec.py index 9a23add3cfc..357343ceaab 100644 --- a/source/config/configSpec.py +++ b/source/config/configSpec.py @@ -64,7 +64,7 @@ readByParagraph = boolean(default=false) wordWrap = boolean(default=true) focusContextPresentation = option("changedContext", "fill", "scroll", default="changedContext") - outputPass1Only = boolean(default=true) + outputPass1Only = boolean(default=false) # Braille display driver settings [[__many__]] From dbf65c531b704a3847ef7f49d858e943e83afb15 Mon Sep 17 00:00:00 2001 From: Leonard de Ruijter Date: Thu, 7 Dec 2017 17:37:29 +0100 Subject: [PATCH 02/15] Added unit test for braille table existence --- tests/unit/test_brailleTables.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/unit/test_brailleTables.py diff --git a/tests/unit/test_brailleTables.py b/tests/unit/test_brailleTables.py new file mode 100644 index 00000000000..a1096965559 --- /dev/null +++ b/tests/unit/test_brailleTables.py @@ -0,0 +1,24 @@ +#tests/unit/test_brailleTables.py +#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) 2017 NV Access Limited, Babbage B.V. + +"""Unit tests for the brailleTables module. +""" + +import unittest +import brailleTables +import os.path + +class TestFBrailleTables(unittest.TestCase): + """Tests for braille table files and their existence.""" + + def test_tableExistence(self): + """Tests whether all defined tables exist.""" + tables = brailleTables.listTables() + for table in tables: + self.assertTrue( + os.path.isfile(os.path.join(brailleTables.TABLES_DIR, table.fileName)), + msg="{table} table not found".format(table=table.displayName) + ) \ No newline at end of file From 9a146d2d08be3eb4ba87afa05b698620a17bdd76 Mon Sep 17 00:00:00 2001 From: Leonard de Ruijter Date: Thu, 7 Dec 2017 17:42:25 +0100 Subject: [PATCH 03/15] Added a unit test to test whether all renamed braille tables are part of the actual tables list --- tests/unit/test_brailleTables.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/unit/test_brailleTables.py b/tests/unit/test_brailleTables.py index a1096965559..3c70ee12dab 100644 --- a/tests/unit/test_brailleTables.py +++ b/tests/unit/test_brailleTables.py @@ -21,4 +21,11 @@ def test_tableExistence(self): self.assertTrue( os.path.isfile(os.path.join(brailleTables.TABLES_DIR, table.fileName)), msg="{table} table not found".format(table=table.displayName) - ) \ No newline at end of file + ) + + def test_renamedTableExistence(self): + """Tests whether all renamed tables are defined as table.""" + """Tests whether all defined renamed tables are part of the actual list of tables.""" + tableNames = [table.fileName for table in brailleTables.listTables()] + for name in brailleTables.RENAMED_TABLES.itervalues(): + self.assertIn(name, tableNames) From d06b52bb8c7624507f08f016439850ecce2696d0 Mon Sep 17 00:00:00 2001 From: Leonard de Ruijter Date: Tue, 12 Dec 2017 16:21:33 +0100 Subject: [PATCH 04/15] Include Romanian braille table --- source/brailleTables.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/brailleTables.py b/source/brailleTables.py index ec0ddd3653a..ee10c9749eb 100644 --- a/source/brailleTables.py +++ b/source/brailleTables.py @@ -319,6 +319,9 @@ def listTables(): addTable("pu-in-g1.utb", _("Punjabi grade 1")) # Translators: The name of a braille table displayed in the # braille settings dialog. +addTable("ro.ctb", _("Romanian")) +# Translators: The name of a braille table displayed in the +# braille settings dialog. addTable("ru-compbrl.ctb", _("Russian braille for computer code")) # Translators: The name of a braille table displayed in the # braille settings dialog. From b7074f98e59c53da2b3f01aa4b6d8f3a9b3d6db1 Mon Sep 17 00:00:00 2001 From: Leonard de Ruijter Date: Wed, 24 Jan 2018 17:11:51 +0100 Subject: [PATCH 05/15] Update Liblouis to v3.4.1-pre1 --- include/liblouis | 2 +- readme.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/liblouis b/include/liblouis index 695316a0a66..e4c3c749beb 160000 --- a/include/liblouis +++ b/include/liblouis @@ -1 +1 @@ -Subproject commit 695316a0a66b572c400ff39782606dd9a3a6a47a +Subproject commit e4c3c749beb001110cd3720a3e3c3694196e2ace diff --git a/readme.md b/readme.md index 8c1975736c8..94e783eeeb5 100644 --- a/readme.md +++ b/readme.md @@ -62,7 +62,7 @@ For reference, the following dependencies are included in Git submodules: * [Sonic](https://github.com/waywardgeek/sonic), commit 4f8c1d11 * [IAccessible2](http://www.linuxfoundation.org/collaborate/workgroups/accessibility/iaccessible2), version 1.3 * [ConfigObj](http://www.voidspace.org.uk/python/configobj.html), version 4.6.0 -* [liblouis](http://www.liblouis.org/), version 3.4.0 +* [liblouis](http://www.liblouis.org/), version 3.4.1 * NVDA images and sounds * System dlls not present on many systems: mfc90.dll, msvcp90.dll, msvcr90.dll, Microsoft.VC90.CRT.manifest * [Adobe Acrobat accessibility interface, version XI](http://download.macromedia.com/pub/developer/acrobat/AcrobatAccess.zip) From 0211bec3e96888f93f49d8f1e527847c091d65e9 Mon Sep 17 00:00:00 2001 From: Leonard de Ruijter Date: Wed, 14 Feb 2018 08:19:47 +0100 Subject: [PATCH 06/15] Review action --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 94e783eeeb5..a7157d7adda 100644 --- a/readme.md +++ b/readme.md @@ -62,7 +62,7 @@ For reference, the following dependencies are included in Git submodules: * [Sonic](https://github.com/waywardgeek/sonic), commit 4f8c1d11 * [IAccessible2](http://www.linuxfoundation.org/collaborate/workgroups/accessibility/iaccessible2), version 1.3 * [ConfigObj](http://www.voidspace.org.uk/python/configobj.html), version 4.6.0 -* [liblouis](http://www.liblouis.org/), version 3.4.1 +* [liblouis](http://www.liblouis.org/), version 3.4.1Pre1 * NVDA images and sounds * System dlls not present on many systems: mfc90.dll, msvcp90.dll, msvcr90.dll, Microsoft.VC90.CRT.manifest * [Adobe Acrobat accessibility interface, version XI](http://download.macromedia.com/pub/developer/acrobat/AcrobatAccess.zip) From e1aa6c8d1ce3a59a1be212e9dcf6642d47849330 Mon Sep 17 00:00:00 2001 From: Leonard de Ruijter Date: Wed, 14 Feb 2018 19:36:27 +0100 Subject: [PATCH 07/15] Remove pass1only support --- source/braille.py | 2 -- source/config/configSpec.py | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/source/braille.py b/source/braille.py index f9c16894fec..00943519fef 100644 --- a/source/braille.py +++ b/source/braille.py @@ -378,8 +378,6 @@ def update(self): @postcondition: L{brailleCells}, L{brailleCursorPos}, L{brailleSelectionStart} and L{brailleSelectionEnd} are updated and ready for rendering. """ mode = louis.dotsIO - if config.conf["braille"]["outputPass1Only"]: - mode |= louis.pass1Only if config.conf["braille"]["expandAtCursor"] and self.cursorPos is not None: mode |= louis.compbrlAtCursor text=unicode(self.rawText).replace('\0','') diff --git a/source/config/configSpec.py b/source/config/configSpec.py index 262c40a5261..e164c54f364 100644 --- a/source/config/configSpec.py +++ b/source/config/configSpec.py @@ -1,6 +1,6 @@ # -*- coding: UTF-8 -*- #A part of NonVisual Desktop Access (NVDA) -#Copyright (C) 2006-2017 NV Access Limited, Babbage B.V., Davy Kager +#Copyright (C) 2006-2018 NV Access Limited, Babbage B.V., Davy Kager #This file is covered by the GNU General Public License. #See the file COPYING for more details. @@ -65,7 +65,6 @@ readByParagraph = boolean(default=false) wordWrap = boolean(default=true) focusContextPresentation = option("changedContext", "fill", "scroll", default="changedContext") - outputPass1Only = boolean(default=false) # Braille display driver settings [[__many__]] From d92b57f61dd77af712c53a7ac7c255de4aa40ac8 Mon Sep 17 00:00:00 2001 From: Leonard de Ruijter Date: Mon, 5 Mar 2018 11:05:06 +0100 Subject: [PATCH 08/15] Reflect liblouis changes with regard to Mongolian --- source/brailleTables.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/brailleTables.py b/source/brailleTables.py index ee10c9749eb..f47e985db3f 100644 --- a/source/brailleTables.py +++ b/source/brailleTables.py @@ -68,6 +68,7 @@ def listTables(): "en-us-comp8.ctb" : "en-us-comp8-ext.utb", "gr-gr-g1.utb":"el.ctb", "hr.ctb":"hr-comp8.utb", + "mn-MN.utb":"mn-MN-g1.utb", "nl-BE-g1.ctb":"nl-BE-g0.utb", "nl-NL-g1.ctb":"nl-NL-g0.utb", "no-no.ctb":"no-no-comp8.ctb", @@ -268,7 +269,10 @@ def listTables(): addTable("mn-in-g1.utb", _("Manipuri grade 1")) # Translators: The name of a braille table displayed in the # braille settings dialog. -addTable("mn-MN.utb", _("Mongolian")) +addTable("mn-MN-g1.utb", _("Mongolian grade 1")) +# Translators: The name of a braille table displayed in the +# braille settings dialog. +addTable("mn-MN-g2.ctb", _("Mongolian grade 2")) # Translators: The name of a braille table displayed in the # braille settings dialog. addTable("mr-in-g1.utb", _("Marathi grade 1")) From 7ebd691e4a78399cd3d6e7d5c6b8392a8d7bd4cc Mon Sep 17 00:00:00 2001 From: Leonard de Ruijter Date: Mon, 5 Mar 2018 16:18:18 +0100 Subject: [PATCH 09/15] Added Ukrainian braille table --- source/brailleTables.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/brailleTables.py b/source/brailleTables.py index f47e985db3f..1b3dbd06265 100644 --- a/source/brailleTables.py +++ b/source/brailleTables.py @@ -359,6 +359,9 @@ def listTables(): addTable("tr.ctb", _("Turkish grade 1")) # Translators: The name of a braille table displayed in the # braille settings dialog. +addTable("uk.utb", _("Ukrainian")) +# Translators: The name of a braille table displayed in the +# braille settings dialog. addTable("unicode-braille.utb", _("Unicode braille"), output=False) # Translators: The name of a braille table displayed in the # braille settings dialog. From ddefceaa482fcc0aa9543c6b25fcd8dd34586fcf Mon Sep 17 00:00:00 2001 From: Leonard de Ruijter Date: Mon, 5 Mar 2018 17:16:28 +0100 Subject: [PATCH 10/15] Update submodule to 3.5.0 final --- include/liblouis | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/liblouis b/include/liblouis index e4c3c749beb..0dee1fcc102 160000 --- a/include/liblouis +++ b/include/liblouis @@ -1 +1 @@ -Subproject commit e4c3c749beb001110cd3720a3e3c3694196e2ace +Subproject commit 0dee1fcc102678e8a57f59ba53f0a9784b93b4ae From eabcd8bb62c326f602166410093aad49383dacfc Mon Sep 17 00:00:00 2001 From: Leonard de Ruijter Date: Mon, 5 Mar 2018 20:41:56 +0100 Subject: [PATCH 11/15] Update readme to reflect liblouis 3.5 --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index a7157d7adda..6ad79c4afe5 100644 --- a/readme.md +++ b/readme.md @@ -62,7 +62,7 @@ For reference, the following dependencies are included in Git submodules: * [Sonic](https://github.com/waywardgeek/sonic), commit 4f8c1d11 * [IAccessible2](http://www.linuxfoundation.org/collaborate/workgroups/accessibility/iaccessible2), version 1.3 * [ConfigObj](http://www.voidspace.org.uk/python/configobj.html), version 4.6.0 -* [liblouis](http://www.liblouis.org/), version 3.4.1Pre1 +* [liblouis](http://www.liblouis.org/), version 3.5.0 * NVDA images and sounds * System dlls not present on many systems: mfc90.dll, msvcp90.dll, msvcr90.dll, Microsoft.VC90.CRT.manifest * [Adobe Acrobat accessibility interface, version XI](http://download.macromedia.com/pub/developer/acrobat/AcrobatAccess.zip) From 76daabc114519cd3e2432fb0efed577b99cb7b64 Mon Sep 17 00:00:00 2001 From: Leonard de Ruijter Date: Mon, 5 Mar 2018 20:42:47 +0100 Subject: [PATCH 12/15] Treat Mongolean grade 2 as contracted --- source/brailleTables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/brailleTables.py b/source/brailleTables.py index 1b3dbd06265..6b05aecc77a 100644 --- a/source/brailleTables.py +++ b/source/brailleTables.py @@ -272,7 +272,7 @@ def listTables(): addTable("mn-MN-g1.utb", _("Mongolian grade 1")) # Translators: The name of a braille table displayed in the # braille settings dialog. -addTable("mn-MN-g2.ctb", _("Mongolian grade 2")) +addTable("mn-MN-g2.ctb", _("Mongolian grade 2"), contracted=True) # Translators: The name of a braille table displayed in the # braille settings dialog. addTable("mr-in-g1.utb", _("Marathi grade 1")) From c772a463b661addc8abe5d6958b9d1a4e4b02c85 Mon Sep 17 00:00:00 2001 From: Leonard de Ruijter Date: Mon, 5 Mar 2018 20:47:23 +0100 Subject: [PATCH 13/15] Removed French tables and added them to renamedTables as suggested by liblouis --- source/brailleTables.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/source/brailleTables.py b/source/brailleTables.py index 6b05aecc77a..3507cd3e628 100644 --- a/source/brailleTables.py +++ b/source/brailleTables.py @@ -66,6 +66,8 @@ def listTables(): "da-dk-g16.utb":"da-dk-g16.ctb", "da-dk-g18.utb":"da-dk-g18.ctb", "en-us-comp8.ctb" : "en-us-comp8-ext.utb", + "fr-ca-g1.utb":"fr-bfu-comp6.utb", + "Fr-Ca-g2.ctb":"fr-bfu-g2.ctb", "gr-gr-g1.utb":"el.ctb", "hr.ctb":"hr-comp8.utb", "mn-MN.utb":"mn-MN-g1.utb", @@ -191,12 +193,6 @@ def listTables(): addTable("fr-bfu-g2.ctb", _("French (unified) Grade 2"), contracted=True) # Translators: The name of a braille table displayed in the # braille settings dialog. -addTable("fr-ca-g1.utb", _("French (Canada) grade 1")) -# Translators: The name of a braille table displayed in the -# braille settings dialog. -addTable("Fr-Ca-g2.ctb", _("French (Canada) grade 2"), contracted=True) -# Translators: The name of a braille table displayed in the -# braille settings dialog. addTable("ga-g1.utb", _("Irish grade 1")) # Translators: The name of a braille table displayed in the # braille settings dialog. From 54f58776304f3c5fc45c59b98030a008aa6788fb Mon Sep 17 00:00:00 2001 From: Leonard de Ruijter Date: Mon, 5 Mar 2018 20:52:27 +0100 Subject: [PATCH 14/15] Fix duplicate method doc string for unit test --- tests/unit/test_brailleTables.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/unit/test_brailleTables.py b/tests/unit/test_brailleTables.py index 3c70ee12dab..5abd1f3f89f 100644 --- a/tests/unit/test_brailleTables.py +++ b/tests/unit/test_brailleTables.py @@ -2,7 +2,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) 2017 NV Access Limited, Babbage B.V. +#Copyright (C) 2018 NV Access Limited, Babbage B.V. """Unit tests for the brailleTables module. """ @@ -24,7 +24,6 @@ def test_tableExistence(self): ) def test_renamedTableExistence(self): - """Tests whether all renamed tables are defined as table.""" """Tests whether all defined renamed tables are part of the actual list of tables.""" tableNames = [table.fileName for table in brailleTables.listTables()] for name in brailleTables.RENAMED_TABLES.itervalues(): From 033fbc85b11eae8d0ee187a2397626ff6b514092 Mon Sep 17 00:00:00 2001 From: Leonard de Ruijter Date: Mon, 5 Mar 2018 21:00:37 +0100 Subject: [PATCH 15/15] Fix inconsistent case in French grade 2 table description --- source/brailleTables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/brailleTables.py b/source/brailleTables.py index 3507cd3e628..351f50c10d8 100644 --- a/source/brailleTables.py +++ b/source/brailleTables.py @@ -190,7 +190,7 @@ def listTables(): addTable("fr-bfu-comp8.utb", _("French (unified) 8 dot computer braille")) # Translators: The name of a braille table displayed in the # braille settings dialog. -addTable("fr-bfu-g2.ctb", _("French (unified) Grade 2"), contracted=True) +addTable("fr-bfu-g2.ctb", _("French (unified) grade 2"), contracted=True) # Translators: The name of a braille table displayed in the # braille settings dialog. addTable("ga-g1.utb", _("Irish grade 1"))