Skip to content

Add Spanish grade 2 braille profile - #178

Merged
krperry merged 1 commit into
mainfrom
spanish
Oct 19, 2026
Merged

krperry merged 1 commit into
mainfrom
spanish

Conversation

@krperry

@krperry krperry commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

BrailleBlaster only offered Spanish as grade 1 (SPANISH-US). This
adds grade 2 as a new profile, SPANISH-US-CONTRACTED.

Changes

  • New programData/utd/SPANISH-US-CONTRACTED.brailleSettings.xml.
    Literary text and text in math books use liblouis's Spanish grade 2
    table, es-g2.ctb, which is already bundled. Uncontracted and
    computer braille stay grade 1, the same split the UEB profiles use.
  • No code changes: the Translation settings menu and
    --braille-profile both list the brailleSettings files, so the new
    profile appears in both.
  • SPANISH-US is unchanged and stays grade 1.

Usage:

java -jar brailleblaster.jar export brf in.docx out.brf --braille-profile=SPANISH-US-CONTRACTED

Testing

  • New SpanishProfilesTest: both profiles' tables, a real grade 2
    translation ("estado de cuenta" -> $d d cu5ta), and
    --braille-profile SPANISH-US-CONTRACTED parsing and finding its
    file.
  • Exported the Spanish sample statement with both profiles. Grade 1
    output is byte-for-byte the same as before, and grade 2 output is
    contracted.
  • mvnw package with tests passes.

For review

The liblouis grade 2 table puts dot 5 (") before some capitalised
English words (".BANK1, ".BOX). That comes from the table itself
and should be checked by a Spanish braille reader.

BrailleBlaster only offered Spanish as grade 1 (SPANISH-US). The new
SPANISH-US-CONTRACTED profile uses liblouis's Spanish grade 2 table,
es-g2.ctb, which is already bundled, for literary text and for text
in math books. Uncontracted and computer braille stay grade 1, the
same split the UEB profiles use.

The Translation settings menu and the --braille-profile option both
list the brailleSettings files, so the new file is all they need.
SPANISH-US is unchanged and stays grade 1, so existing documents and
scripts keep working.

SpanishProfilesTest checks both profiles' tables, that grade 2
contracts "estado de cuenta" to "$d d cu5ta", and that
--braille-profile SPANISH-US-CONTRACTED parses and finds its file.
@krperry
krperry merged commit 8fcf47e into main Oct 19, 2026
2 checks passed
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

Successfully merging this pull request may close these issues.

1 participant