Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Braille settings: Sort output/input braille tables list #6113

Closed
josephsl opened this issue Jun 27, 2016 · 3 comments
Closed

Braille settings: Sort output/input braille tables list #6113

josephsl opened this issue Jun 27, 2016 · 3 comments
Assignees
Milestone

Comments

@josephsl
Copy link
Collaborator

Hi,

Currently, output/input braille tables list shows the list of braille tables based on the order found in braille.TABLES tuple. Although it allows one to reassign braille tables via a simple index operations, it might be more desirable to allow users to go through all tables in sorted order (for example, going from English to French as opposed to English and then Spanish).

To achieve this, a new dictionary named "tables" will be used to replace two lists, with the key being the name of the table and value being filenames. For example, BrailleSettingsDialog.tables["English (U.S.) grade 1"] points to "en-us-g1.ctb".

Surrounding implementations:

  1. When loading table names, sort tables.keys.
  2. For OK button handler, look up table names.GetStringSelection and assign the value found for this key.
  3. If this is working for output tables, input tables presentation will be modified accordingly.

Possible issues/questions:

  • How about non-English locales? We can take advantage of the fact that Python is aware of Unicode, hence one can sort using this.
  • Is current approach acceptable? When one wishes to look at tables loaded with no regard to ordering, yes, as current method displays table names in the order they are declared in the braille module. The sorting part is handy if one wishes to browse through tables in a sorted order, similar to list of braille displays and synthesizers.
  • GetStringSelection versus GetSelection: GetStringSelection is better in that we can use it as the key to the dictionary. Using GetSelection means looking up the string once more based on its index.

Thanks.

@LeonarddeR
Copy link
Collaborator

I remember @Dkager has made major changes to the way braille
  table references are stored in #3304. There's also a needs code
  review on #3304 which I think might be good to finish before
  working on this.
@Dkager: your thoughts?

@josephsl
Copy link
Collaborator Author

A specific variant on #3304, addressed by @dkager in one of the external branches (depends on #2439). Thanks.

@jcsteh jcsteh reopened this Jun 15, 2017
@jcsteh
Copy link
Contributor

jcsteh commented Jun 15, 2017

Reopening this, as it will get addressed as part of #6449 (but I still think it's worth tracking separately).

@jcsteh jcsteh self-assigned this Jun 15, 2017
@nvaccessAuto nvaccessAuto added this to the 2017.3 milestone Jul 7, 2017
jcsteh added a commit that referenced this issue Jul 7, 2017
…ues #2439, #6054, #6113, #6935)

Beyond the main code in brailleInput to support uncontracted/contracted input, this includes the following changes:
* The list of braille tables has been moved out of the braille module into a separate brailleTables module. Braille tables are now added with a function rather than directly adding them to the data structure. Aside from being necessary in order to specify and check whether a table is contracted, this also makes the data about tables more extensible in future.
* As the data structure for braille tables has now changed and is no longer ordered, this was a good opportunity to sort the list of tables alphabetically when displaying them to the user.
* Updated to liblouis master shortly after release 3.2.0. The post 3.2.0 commits include some important back-translation fixes for UEB.
* brailleInput is now notified when reverting config or changing config profiles. This is necessary because brailleInput now maintains some state when the input table is changed.
* brailleInput is now initialised before braille at startup. This is because braille depends on brailleInput to get the currently untranslated input.
* Dot7 and dot8 are now universally bound to braille input specific scripts for erase and enter. Any braille display drivers that had bindings for backspace/enter for braille input have been adjusted accordingly.
* In the User Guide, a "Braille" section has been added above "Application Specific Features". The "Braille Control Types and States" section has been moved to a sub-section of this, and a sub-section on Braille Input has been added.
* Added a Unicode braille input table.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants