|
4 | 4 | # See the file COPYING for more details. |
5 | 5 | # Copyright (C) 2006-2022 NV Access Limited, Peter Vágner, Aleksey Sadovoy, Rui Batista, Joseph Lee, |
6 | 6 | # Leonard de Ruijter, Derek Riemer, Babbage B.V., Davy Kager, Ethan Holliger, Łukasz Golonka, Accessolutions, |
7 | | -# Julien Cochuyt, Jakub Lukowicz, Bill Dengler |
| 7 | +# Julien Cochuyt, Jakub Lukowicz, Bill Dengler, Cyrille Bougot |
8 | 8 |
|
9 | 9 | import itertools |
10 | 10 |
|
@@ -667,19 +667,17 @@ def script_toggleReportTables(self,gesture): |
667 | 667 |
|
668 | 668 | @script( |
669 | 669 | # Translators: Input help mode message for toggle report table row/column headers command. |
670 | | - description=_("Toggles on and off the reporting of table row and column headers"), |
| 670 | + description=_("Cycle through the possible modes to report table row and column headers"), |
671 | 671 | category=SCRCAT_DOCUMENTFORMATTING |
672 | 672 | ) |
673 | 673 | def script_toggleReportTableHeaders(self,gesture): |
674 | | - if config.conf["documentFormatting"]["reportTableHeaders"]: |
675 | | - # Translators: The message announced when toggling the report table row/column headers document formatting setting. |
676 | | - state = _("report table row and column headers off") |
677 | | - config.conf["documentFormatting"]["reportTableHeaders"]=False |
678 | | - else: |
679 | | - # Translators: The message announced when toggling the report table row/column headers document formatting setting. |
680 | | - state = _("report table row and column headers on") |
681 | | - config.conf["documentFormatting"]["reportTableHeaders"]=True |
682 | | - ui.message(state) |
| 674 | + ReportTableHeaders = config.configFlags.ReportTableHeaders |
| 675 | + numVals = len(ReportTableHeaders) |
| 676 | + state = ReportTableHeaders((config.conf["documentFormatting"]["reportTableHeaders"] + 1) % numVals) |
| 677 | + config.conf["documentFormatting"]["reportTableHeaders"] = state.value |
| 678 | + # Translators: Reported when the user cycles through report table header modes. |
| 679 | + # {mode} will be replaced with the mode; e.g. None, Rows and columns, Rows or Columns. |
| 680 | + ui.message(_("Report table headers {mode}").format(mode=state.displayString)) |
683 | 681 |
|
684 | 682 | @script( |
685 | 683 | # Translators: Input help mode message for toggle report table cell coordinates command. |
|
0 commit comments